Reputation: 665
I have to projects both contains the pom.xml , Let say Project A and Project B. In project B I added project A as dependency in its pom.xml. In project A there is a class Mirror.java, in this class I added method and then updated the Project B by right clicking on it and update project so the jar for Project A is updated with new code. Now when I try to call this method its not visible in Project B though the .class file in the Maven dependencies contains the new method
Project B pom.xml
<dependency>
<groupId>com.intel.imc.swa.jetdb</groupId>
<artifactId>mirror</artifactId>
<version>0.1.4</version>
</dependency>
Project B Test.class
new Mirror(db.getConnectionString(), "EABase_JET4_empty.eap",eap.getAbsolutePath()).webrun();
Project A Mirror.java
public Mirror(String source, String template, String target) throws SQLException, IOException {
this.sourceString=source;
this.templateFileString=template;
this.targetFileString=target;
}
public void webrun() {
System.out.print("test");
}
Why the webrun method is not available in Project B ?
Thanks
Upvotes: 1
Views: 1808
Reputation: 30548
You have to build project A
then project B
. You also have to use the -U
flag in Maven:
$ mvn clean install // in A
$ mvn clean install -U // in B to force update of snapshots
Upvotes: 2