Changes in dependent modules cannot be seen in another module in Maven Eclipse

I am working on a project with several modules with the mlclipse tag. I installed maven to solve workspace dependency problems. But when I make changes, say, in a service module, the changes are not displayed on other modules immediately. If I create a new method at the service level, it will not be visible at the WebApp level. Sometimes even Run / maven installs and updates, and Project / clean and Maven / Update Dependencies do not work. Can someone give me an idea on this issue?

My project structure is as follows:

parent module

<groupId>com.myproject</groupId> <artifactId>einvites-parent</artifactId> <modules> <module>myproject-common</module> <module>myproject-domain</module> <module>myproject-service</module> <module>myproject-web</module> </modules> 

service module

 <parent> <artifactId>myproject-parent</artifactId> <groupId>com.myproject</groupId> <version>1.0</version> </parent> <groupId>com.myproject</groupId> <artifactId>myproject-service</artifactId> 

web module

 <parent> <artifactId>myproject-parent</artifactId> <groupId>com.myproject</groupId> <version>1.0</version> </parent> <groupId>com.myproject</groupId> <artifactId>myproject-web</artifactId> <version>1.0</version> <packaging>war</packaging> <name>myproject-web</name> <dependencies> <dependency> <groupId>com.myproject</groupId> <artifactId>myproject-service</artifactId> <version>1.0</version> <type>jar</type> <scope>compile</scope> </dependency> </dependencies> 
+2
source share
1 answer

This should work; and this is for me. I'm really not sure if this will fix the problem, but may try to change your POM to use the SNAPSHOT version, i.e. something like 1.0-SNAPSHOT (you should use SNAPSHOT versions anyway for active modules).

By the way, there are a lot of unnecessary and unnecessary things in your POMs. They should look like this:

service module

 <project> ... <parent> <artifactId>myproject-parent</artifactId> <groupId>com.myproject</groupId> <version>1.0-SNAPSHOT</version> </parent> <!--groupId>com.myproject</groupId--> <!-- no need, you inherit it --> <artifactId>myproject-service</artifactId> ... </project> 

web module

 <project> ... <parent> <artifactId>myproject-parent</artifactId> <groupId>com.myproject</groupId> <version>1.0-SNAPSHOT</version> </parent> <!--groupId>com.myproject</groupId--> <!-- no need, you inherit it --> <artifactId>myproject-web</artifactId> <!--version>1.0</version--> <!-- no need, you inherit it --> <packaging>war</packaging> <name>myproject-web</name> <dependencies> <dependency> <groupId>${project.groupId}</groupId> <!-- use the built-in properties instead --> <artifactId>myproject-service</artifactId> <version>${project.version}</version> <!-- use the built-in properties instead --> <!--type>jar</type--> <!-- no need, that the default --> <!--scope>compile</scope--> <!-- no need, that the default --> </dependency> </dependencies> ... </project> 
0
source

All Articles