简体   繁体   中英

Maven multi modules tomcat deployment , module missing

I have two module in parent pom. A project depends on B project. I followed here

In A project , i added B project as dependency. Its ok in build path, I see my B project under maven dependencies.

<dependency>
    <groupId>mygroup</groupId>
    <artifactId>B</artifactId>
</dependency>

But when I deploy A project into Tomcat(mvn tomcat7:deploy ,or redeploy) , A project was deployed successfully but B project(packaging as jar) wasn't deployed. (Also I tried to system scope and target the jar file with systemPath)

I didn't understand where is the issue, Did i miss something? (Using Tomcat8 , no eclipse specific answer please.)

Can you try mvn install and manually copy the generated war to tomcat7 folder. Maybe something is wrong with tomcat7 maven plugin.

Additional Information: In .m2 repository there wasn't project B's jar , installed it and changed tomcat7 plugin as this solution alternetive to maven war plugin and configured outputfolder tomcat8's webapps folder, now it works like a charm.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM