NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
janne postilista Posted via mailing list.
|
Posted: Thu Jul 29, 2010 2:20 pm Post subject: how can I deploy my maven web application build (hudson) |
|
|
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.
|
Posted: Thu Jul 29, 2010 2:22 pm Post subject: how can I deploy my maven web application build (hudson) |
|
|
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.
|
Posted: Fri Jul 30, 2010 6:26 am Post subject: how can I deploy my maven web application build (hudson) |
|
|
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.
|
Posted: Fri Jul 30, 2010 6:39 am Post subject: how can I deploy my maven web application build (hudson) |
|
|
Also, what is stuff like
|
|
| Back to top |
|
 |
Milos Kleint Posted via mailing list.
|
Posted: Fri Jul 30, 2010 8:09 am Post subject: how can I deploy my maven web application build (hudson) |
|
|
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.
|
Posted: Fri Jul 30, 2010 9:41 am Post subject: how can I deploy my maven web application build (hudson) |
|
|
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 |
|
 |
|
|
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
|
|
|
|