1

私は屋外で作業しており、そのようなマルチモジュールプロジェクトがあります:

- parentModule
- alfrescoModule
- shareModule
- ampAlfrescoModule (contains java classes)
- ampShareModule
- runnerModule

変更したクラスを ampAlfrescoModule からホット再デプロイしたい

runnerModule の pom の内容は次のとおりです。

<profiles>
    <profile>
        <id>run</id>
        <activation>
            <property>
                <name>run</name>
            </property>
        </activation>
        <properties>

            <runner.host>127.0.0.1</runner.host>
            <runner.port>8080</runner.port>
        </properties>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.mortbay.jetty</groupId>
                    <artifactId>maven-jetty-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>run</id>
                            <goals>
                                <goal>run</goal>
                            </goals>
                            <phase>integration-test</phase>
                        </execution>
                    </executions>
                    <configuration>

//this is what i've tested but it doesn't work  
                    <scanIntervalSeconds>5</scanIntervalSeconds>
                <classesDirectory>../ampAlfrescoProject/target/classes</classesDirectory>


                        <!-- Following 3 properties set an empty ROOT context, which is mandatory 
                            to run jetty:run plugin -->
                        <contextPath>/</contextPath>
                        <webAppSourceDirectory>.</webAppSourceDirectory>
                        <webXml>jetty/root-web.xml</webXml>
                        <contextHandlers>
                            <contextHandler implementation="org.mortbay.jetty.webapp.WebAppContext">
                                <war>${project.basedir}/../alfrescoProject/target/alfrescoProject.war</war>
                                <contextPath>/alfresco</contextPath>
                            </contextHandler>
                            <contextHandler implementation="org.mortbay.jetty.webapp.WebAppContext">
                                <war>${alfresco.solr.dir}/apache-solr-1.4.1-overlay.war</war>
                                <contextPath>/solr</contextPath>
                            </contextHandler>
                            <contextHandler implementation="org.mortbay.jetty.webapp.WebAppContext">
                                <war>${project.basedir}/../shareProject/target/shareProject.war</war>
                                <contextPath>/share</contextPath>
                            </contextHandler>
                        </contextHandlers>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </profile>
</profiles>

桟橋に3つの戦争を展開します。ampAlfrescoModule/target/classesを指さなければclassesDirectoryなりませんが、うまくいきません。

これは私が得る出力です:

[INFO] restarting org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@986d0e{/,C:\Users\..\workspace\AllInOneAdvancedSearch\runnerProject}
[INFO] Webapp source directory = C:\Users\..\workspace\AllInOneAdvancedSearch\runnerProject
[INFO] Reload Mechanic: automatic
[INFO] Classes directory    C:\Users\..\workspace\AllInOneAdvancedSearch\ampAlfrescoProject\target\classes 
[INFO] Context path = /
[INFO] Tmp directory =  determined at runtime
[INFO] Web defaults = org/mortbay/jetty/webapp/webdefault.xml
[INFO] Web overrides =  none
[INFO] web.xml file = C:\Users\..\workspace\AllInOneAdvancedSearch\runnerProject\jetty\root-web.xml
[INFO] Webapp directory = C:\Users\..\workspace\AllInOneAdvancedSearch\runnerProject
[INFO] Reconfiguring scanner after change to pom.xml ...
2013-05-27 10:30:51.956:INFO::No Transaction manager found - if your webapp requires one, please configure one.
[INFO] Restart completed at Mon May 27 10:30:51 CEST 2013  

クラスを実行mvn compileしても、サーバー上で更新されず、変更が検出されません

任意の助けをいただければ幸いです、thx

4

0 に答える 0