lundi 9 novembre 2015

test integration phase including jetty:run-war

I am still in a phase to create a POM.xml file. The basic is to start jetty plugin during the build life cycle. So far I have to enter

mvn package

mvn jetty:run-war

I do not want to do it manually. I prefer the way where a war file is created and jetty plugin started using the one command.

Here is my POM.xml

<plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>9.2.11.v20150529</version>
                <configuration>
                    <scanIntervalSeconds>10</scanIntervalSeconds>
                    <webApp>
                        <contextPath>/hellojavaworld</contextPath>           
                    </webApp>    
                    <war>c:\apache-tomcat-7.0.64\webapps\hellojavaworld.war</war>
                </configuration>
                <executions>
                    <execution>
                        <id>start-jetty</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <!--configuration>
                            <daemon>true</daemon>
                        </configuration-->
                    </execution>
                    <execution>
                        <id>stop-jetty</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>stop</goal>
                        </goals>
                    </execution>
                </executions>
</plugin>

Why the jetty plugin is not started when inserted the following command?

mvn pre-integrate-test

What is the problem? The jetty plugin starts only when used the command

mvn jetty:run-war

Aucun commentaire:

Enregistrer un commentaire