Maven multi-module web application (Hot swap) -


i have multi module web application.

the structure is:

parent | | - - child 1 | - - child 2 | - - web 

and web project depends on 2 child modules

when using ide build project used ide building classes in web-inf/classes folder. nice web server noticed new classes , either restarted or hot deployed these files. maven seems have package whole thing scratch every time.

i find way in maven such can avoid running mvn:clean mvn:install mvn:war:inplace. instead mvn:comile, , stuff there.

i hope understand mean. testing web app extremely slow when have build project jars , run som war command before things updated.

the web apps pom:

<project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"          xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">     <modelversion>4.0.0</modelversion>     <parent>        ...    </parent>     <artifactid>web</artifactid>    <packaging>war</packaging>     <dependencies>       <dependency>          <groupid>bla.bla.bla</groupid>          <artifactid>bla_child1</artifactid>          <version>1.0-snapshot</version>       </dependency>       <dependency>          <groupid>bla.bla.bla</groupid>          <artifactid>bla_child2</artifactid>          <version>1.0-snapshot</version>       </dependency>    </dependencies>     <build>       <plugins>          <plugin>             <groupid>org.apache.maven.plugins</groupid>             <artifactid>maven-war-plugin</artifactid>             <version>2.4</version>          </plugin>          <plugin>             <groupid>org.eclipse.jetty</groupid>             <artifactid>jetty-maven-plugin</artifactid>             <version>9.0.4.v20130625</version>             <configuration>                <scanintervalseconds>30</scanintervalseconds>                <webapp>                   <contextpath>/blabla</contextpath>                </webapp>             </configuration>          </plugin>       </plugins>    </build> </project> 

a possible solution problem build skinny war maven-war-plugin (or @ least exclude child1 , child2 if have other dependencies well) , add target/classes folders of child-projects classpath. done build helper maven plugin's add-resource goal.

disclaimer: didn't try myself in theory work :)


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo