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/classesclassesDirectory但它不起作用。

这是我得到的输出:

[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我的课程时,服务器上没有更新,没有检测到更改

任何帮助将不胜感激,谢谢

4

0 回答 0