NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

how can I deploy my maven web application build (hudson)

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
janne postilista
Posted via mailing list.





PostPosted: Thu Jul 29, 2010 2:20 pm    Post subject: how can I deploy my maven web application build (hudson) Reply with quote

I have a maven web application project. I can build it and deploy it from netbeans to my local application server fine.

I use hudson continuous integration server with Netbeans hudson integration. I try to run the build there, and get it to deploy the web application to the application server that is in the hudson server.


The hudson build compiles and executes tests fine, but does not deploy the created war anywhere. What do I need to do to make it deploy?


Output from the hudson build:


Started by upstream project "WebApplicationMavenProject" build number 13
$ /usr/java/default/bin/java -cp /home/fobar/.hudson/plugins/maven-plugin/WEB-INF/lib/maven-agent-1.360.jar:/home/fobar/.hudson/tools/boot/classworlds-1.1.jar hudson.maven.agent.Main /home/fobar/.hudson/tools /home/fobar/.hudson/war/WEB-INF/lib/remoting-1.360.jar /home/fobar/.hudson/plugins/maven-plugin/WEB-INF/lib/maven-interceptor-1.360.jar 60100 /home/fobar/.hudson/plugins/maven-plugin/WEB-INF/lib/maven2.1-interceptor-1.2.jar
<===[HUDSON REMOTING CAPACITY]===>
Back to top
Milos Kleint
Posted via mailing list.





PostPosted: Thu Jul 29, 2010 2:22 pm    Post subject: how can I deploy my maven web application build (hudson) Reply with quote

the deployment part is done by netbeans *after* the maven build finishes. If you want hudson to deploy stuff, you will need to configure some kind of maven plugin (eg. cargo-maven-plugin)

Milos

On Thu, Jul 29, 2010 at 4:19 PM, janne postilista <address-removed ([email]address-removed[/email])> wrote:
Quote:
I have a maven web application project. I can build it and deploy it from netbeans to my local application server fine.

I use hudson continuous integration server with Netbeans hudson integration. I try to run the build there, and get it to deploy the web application to the application server that is in the hudson server.


The hudson build compiles and executes tests fine, but does not deploy the created war anywhere. What do I need to do to make it deploy?


Output from the hudson build:


Started by upstream project "WebApplicationMavenProject" build number 13
$ /usr/java/default/bin/java -cp /home/fobar/.hudson/plugins/maven-plugin/WEB-INF/lib/maven-agent-1.360.jar:/home/fobar/.hudson/tools/boot/classworlds-1.1.jar hudson.maven.agent.Main /home/fobar/.hudson/tools /home/fobar/.hudson/war/WEB-INF/lib/remoting-1.360.jar /home/fobar/.hudson/plugins/maven-plugin/WEB-INF/lib/maven-interceptor-1.360.jar 60100 /home/fobar/.hudson/plugins/maven-plugin/WEB-INF/lib/maven2.1-interceptor-1.2.jar
<===[HUDSON REMOTING CAPACITY]===>   channel started
Executing Maven:  -N -B -f /home/fobar/.hudson/jobs/WebApplicationMavenProject/workspace/pom.xml -Dnetbeans.deploy=true -Dnetbeans.execution=true clean package -P ci
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building WebApplicationMavenProject Java EE 6 Webapp
[INFO]    task-segment: [clean, package]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 1 source file to /home/fobar/.hudson/jobs/WebApplicationMavenProject/workspace/target/classes
[INFO] [resources:testResources {execution: default-testResources}]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/fobar/.hudson/jobs/WebApplicationMavenProject/workspace/src/test/resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Compiling 1 source file to /home/fobar/.hudson/jobs/WebApplicationMavenProject/workspace/target/test-classes
[INFO] [surefire:test {execution: default-test}]
[INFO] Surefire report directory: /home/fobar/.hudson/jobs/WebApplicationMavenProject/workspace/target/surefire-reports


-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.mycompany.webapplicationmavenproject.DummyTest
getOne
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.079 sec


Results :


Tests run: 1, Failures: 0, Errors: 0, Skipped: 0


[HUDSON] Recording test results
[INFO] [war:war {execution: default-war}]
[INFO] Packaging webapp
[INFO] Assembling webapp[WebApplicationMavenProject] in [/home/fobar/.hudson/jobs/WebApplicationMavenProject/workspace/target/WebApplicationMavenProject]
[INFO] Processing war project
[INFO] Copying webapp resources[/home/fobar/.hudson/jobs/WebApplicationMavenProject/workspace/src/main/webapp]
[INFO] Webapp assembled in [54 msecs]
[INFO] Building war: /home/fobar/.hudson/jobs/WebApplicationMavenProject/workspace/target/WebApplicationMavenProject.war
[HUDSON] Archiving /home/fobar/.hudson/jobs/WebApplicationMavenProject/workspace/pom.xml to /home/fobar/.hudson/jobs/WebApplicationMavenProject/modules/com.mycompany$WebApplicationMavenProject/builds/2010-07-29_17-14-08/archive/com.mycompany/WebApplicationMavenProject/1.0-SNAPSHOT/pom.xml
[HUDSON] Archiving /home/fobar/.hudson/jobs/WebApplicationMavenProject/workspace/target/WebApplicationMavenProject.war to /home/fobar/.hudson/jobs/WebApplicationMavenProject/modules/com.mycompany$WebApplicationMavenProject/builds/2010-07-29_17-14-08/archive/com.mycompany/WebApplicationMavenProject/1.0-SNAPSHOT/WebApplicationMavenProject.war
Finished: SUCCESS



Same output when I run the build inside Netbeans:


(first part is the same)




Results :


Tests run: 1, Failures: 0, Errors: 0, Skipped: 0


[war:war]
Packaging webapp
Assembling webapp[WebApplicationMavenProject] in [D:\projects\fobar\svn\proto\trunk\buildproto\WebApplicationMavenProject\target\WebApplicationMavenProject]
Processing war project
Copying webapp resources[D:\projects\fobar\svn\proto\trunk\buildproto\WebApplicationMavenProject\src\main\webapp]
Webapp assembled in [58 msecs]
Building war: D:\projects\fobar\svn\proto\trunk\buildproto\WebApplicationMavenProject\target\WebApplicationMavenProject.war
------------------------------------------------------------------------
BUILD SUCCESSFUL
------------------------------------------------------------------------
Total time: 4 seconds
Finished at: Thu Jul 29 16:45:56 EEST 2010
Final Memory: 25M/91M
------------------------------------------------------------------------
NetBeans: Deploying on GlassFish Server 3 - fobar 3.3
    profile mode: false
    debug mode: false
    force redeploy: true
Undeploying ...
Initializing...
In-place deployment at D:\projects\valtimo\svn\proto\trunk\buildproto\WebApplicationMavenProject\target\WebApplicationMavenProject
Initializing...



The "NetBeans: Deploying on GlassFish Server 3 - fobar 3.3" does not get executed when run outside of Netbeans


Back to top
janne postilista
Posted via mailing list.





PostPosted: Fri Jul 30, 2010 6:26 am    Post subject: how can I deploy my maven web application build (hudson) Reply with quote

Wouldn't that mess up the build / deploy when it's done inside Netbeans? As in, application gets deployed twice?

When I look at the maven build that's executed from inside Netbeans, it's:


NetBeans: Executing 'mvn.bat -Dnetbeans.deploy=true -Dnetbeans.execution=true package'


It sure looks like Netbeans is giving maven properties such as
Back to top
janne postilista
Posted via mailing list.





PostPosted: Fri Jul 30, 2010 6:39 am    Post subject: how can I deploy my maven web application build (hudson) Reply with quote

Also, what is stuff like

Back to top
Milos Kleint
Posted via mailing list.





PostPosted: Fri Jul 30, 2010 8:09 am    Post subject: how can I deploy my maven web application build (hudson) Reply with quote

it makes sure it's shared across multiple devs and lets you put the value in the parent pom and have all your apps inherit the value.



if the hudson/ci deploy is done in a profile not activated from netbeans, you are safe.


Milos

On Fri, Jul 30, 2010 at 8:38 AM, janne postilista <address-removed ([email]address-removed[/email])> wrote:
Quote:
Also, what is stuff like

    <properties>
        <netbeans.hint.deploy.server>gfv3ee6</netbeans.hint.deploy.server>
    </properties>


doing in the pom.xml if the maven build does not deploy the application?


Just trying to understand what's going on.




On Fri, Jul 30, 2010 at 9:26 AM, janne postilista <address-removed ([email]address-removed[/email])> wrote:
Quote:
Wouldn't that mess up the build / deploy when it's done inside Netbeans? As in, application gets deployed twice?

When I look at the maven build that's executed from inside Netbeans, it's:


NetBeans: Executing 'mvn.bat -Dnetbeans.deploy=true -Dnetbeans.execution=true package'


It sure looks like Netbeans is giving maven properties such as Dnetbeans.deploy=true. What does the maven build do with that property, are you sure the maven build does not deploy the application?





On Thu, Jul 29, 2010 at 5:22 PM, Milos Kleint <address-removed ([email]address-removed[/email])> wrote:
Quote:
the deployment part is done by netbeans *after* the maven build finishes. If you want hudson to deploy stuff, you will need to configure some kind of maven plugin (eg. cargo-maven-plugin)

Milos


On Thu, Jul 29, 2010 at 4:19 PM, janne postilista <address-removed ([email]address-removed[/email])> wrote:
Quote:
I have a maven web application project. I can build it and deploy it from netbeans to my local application server fine.

I use hudson continuous integration server with Netbeans hudson integration. I try to run the build there, and get it to deploy the web application to the application server that is in the hudson server.


The hudson build compiles and executes tests fine, but does not deploy the created war anywhere. What do I need to do to make it deploy?


Output from the hudson build:


Started by upstream project "WebApplicationMavenProject" build number 13
$ /usr/java/default/bin/java -cp /home/fobar/.hudson/plugins/maven-plugin/WEB-INF/lib/maven-agent-1.360.jar:/home/fobar/.hudson/tools/boot/classworlds-1.1.jar hudson.maven.agent.Main /home/fobar/.hudson/tools /home/fobar/.hudson/war/WEB-INF/lib/remoting-1.360.jar /home/fobar/.hudson/plugins/maven-plugin/WEB-INF/lib/maven-interceptor-1.360.jar 60100 /home/fobar/.hudson/plugins/maven-plugin/WEB-INF/lib/maven2.1-interceptor-1.2.jar
<===[HUDSON REMOTING CAPACITY]===>   channel started
Executing Maven:  -N -B -f /home/fobar/.hudson/jobs/WebApplicationMavenProject/workspace/pom.xml -Dnetbeans.deploy=true -Dnetbeans.execution=true clean package -P ci
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building WebApplicationMavenProject Java EE 6 Webapp
[INFO]    task-segment: [clean, package]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 1 source file to /home/fobar/.hudson/jobs/WebApplicationMavenProject/workspace/target/classes
[INFO] [resources:testResources {execution: default-testResources}]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/fobar/.hudson/jobs/WebApplicationMavenProject/workspace/src/test/resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Compiling 1 source file to /home/fobar/.hudson/jobs/WebApplicationMavenProject/workspace/target/test-classes
[INFO] [surefire:test {execution: default-test}]
[INFO] Surefire report directory: /home/fobar/.hudson/jobs/WebApplicationMavenProject/workspace/target/surefire-reports


-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.mycompany.webapplicationmavenproject.DummyTest
getOne
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.079 sec


Results :


Tests run: 1, Failures: 0, Errors: 0, Skipped: 0


[HUDSON] Recording test results
[INFO] [war:war {execution: default-war}]
[INFO] Packaging webapp
[INFO] Assembling webapp[WebApplicationMavenProject] in [/home/fobar/.hudson/jobs/WebApplicationMavenProject/workspace/target/WebApplicationMavenProject]
[INFO] Processing war project
[INFO] Copying webapp resources[/home/fobar/.hudson/jobs/WebApplicationMavenProject/workspace/src/main/webapp]
[INFO] Webapp assembled in [54 msecs]
[INFO] Building war: /home/fobar/.hudson/jobs/WebApplicationMavenProject/workspace/target/WebApplicationMavenProject.war
[HUDSON] Archiving /home/fobar/.hudson/jobs/WebApplicationMavenProject/workspace/pom.xml to /home/fobar/.hudson/jobs/WebApplicationMavenProject/modules/com.mycompany$WebApplicationMavenProject/builds/2010-07-29_17-14-08/archive/com.mycompany/WebApplicationMavenProject/1.0-SNAPSHOT/pom.xml
[HUDSON] Archiving /home/fobar/.hudson/jobs/WebApplicationMavenProject/workspace/target/WebApplicationMavenProject.war to /home/fobar/.hudson/jobs/WebApplicationMavenProject/modules/com.mycompany$WebApplicationMavenProject/builds/2010-07-29_17-14-08/archive/com.mycompany/WebApplicationMavenProject/1.0-SNAPSHOT/WebApplicationMavenProject.war
Finished: SUCCESS



Same output when I run the build inside Netbeans:


(first part is the same)




Results :


Tests run: 1, Failures: 0, Errors: 0, Skipped: 0


[war:war]
Packaging webapp
Assembling webapp[WebApplicationMavenProject] in [D:\projects\fobar\svn\proto\trunk\buildproto\WebApplicationMavenProject\target\WebApplicationMavenProject]
Processing war project
Copying webapp resources[D:\projects\fobar\svn\proto\trunk\buildproto\WebApplicationMavenProject\src\main\webapp]
Webapp assembled in [58 msecs]
Building war: D:\projects\fobar\svn\proto\trunk\buildproto\WebApplicationMavenProject\target\WebApplicationMavenProject.war
------------------------------------------------------------------------
BUILD SUCCESSFUL
------------------------------------------------------------------------
Total time: 4 seconds
Finished at: Thu Jul 29 16:45:56 EEST 2010
Final Memory: 25M/91M
------------------------------------------------------------------------
NetBeans: Deploying on GlassFish Server 3 - fobar 3.3
    profile mode: false
    debug mode: false
    force redeploy: true
Undeploying ...
Initializing...
In-place deployment at D:\projects\valtimo\svn\proto\trunk\buildproto\WebApplicationMavenProject\target\WebApplicationMavenProject
Initializing...



The "NetBeans: Deploying on GlassFish Server 3 - fobar 3.3" does not get executed when run outside of Netbeans

















Back to top
janne postilista
Posted via mailing list.





PostPosted: Fri Jul 30, 2010 9:41 am    Post subject: how can I deploy my maven web application build (hudson) Reply with quote

OK, I guess I will configure cargo plugin then.

Thanks for the help.

On Fri, Jul 30, 2010 at 11:09 AM, Milos Kleint <address-removed ([email]address-removed[/email])> wrote:
Quote:
it makes sure it's shared across multiple devs and lets you put the value in the parent pom and have all your apps inherit the value.



if the hudson/ci deploy is done in a profile not activated from netbeans, you are safe.


Milos


On Fri, Jul 30, 2010 at 8:38 AM, janne postilista <address-removed ([email]address-removed[/email])> wrote:
Quote:
Also, what is stuff like

Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo