2017-02-16 97 views

回答

3

是,能夠使用Cargo Maven Plugin,因爲它是自解釋在下面的例子:

<build> 
    <plugins> 
     <plugin> 
      <groupId>org.codehaus.cargo</groupId> 
      <artifactId>cargo-maven2-plugin</artifactId> 
      <configuration> 
       <container> 
        <containerId>glassfish4x</containerId> 
        <type>installed</type> 
        <!-- Path to directory where glassfish is installed --> 
        <home>C:/programs/glassfish4</home> 
       </container> 
       <configuration> 
        <type>existing</type> 
        <!-- Path to domains directory --> 
        <home>C:/programs/glassfish4/glassfish/domains</home> 
        <properties> 
         <!-- Domain name where application will be deployed. --> 
         <cargo.glassfish.domain.name>domain1</cargo.glassfish.domain.name> 
         <!-- Glassfish user to authenticate --> 
         <cargo.remote.username>admin</cargo.remote.username> 
         <!-- Glassfish password to authenticate --> 
         <cargo.remote.password></cargo.remote.password> 
        </properties> 
       </configuration> 
      </configuration> 
     </plugin> 
    </plugins> 
</build> 

的行家命令,使用插件上面引用部署有:

mvn clean package cargo:deploy 

clean package cargo:redeploy 
0

您需要指定插件的版本。 Maven版本3給了我一些關於這個問題的警告。

相關問題