GlassFish 3 + Maven + remote deploy

后端 未结 2 1542
眼角桃花
眼角桃花 2021-02-06 05:39

I couldn\'t find any clear answer about how to deploy simple Maven based project to remote GlassFish server via maven like

mvn package xxx:deploy
2条回答
  •  既然无缘
    2021-02-06 06:32

    As far as I know and could find around, only Cargo delivers (or deploys, in this case).

    This is an example tested as working on a Maven OSGi WAR project:

    
         
            ...
            
                org.codehaus.cargo
                cargo-maven2-plugin
                1.1.2
                
                    
                        glassfish3x
                        remote
                    
                    
                        runtime
                        
                            myhostname
                            myusername
                            mypassword
                        
                     
                
                
                    
                        org.glassfish.deployment
                        deployment-client
                        3.2-b06
                    
                
            
        
    
    

    As you can see, the trick lies in the deployment-client dependency.

    For the sake of completeness, you then just mvn package cargo:deploy and Bob's your uncle.

提交回复
热议问题