Deploy after M2 Build acts like -N flag present

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Deploy after M2 Build acts like -N flag present

Lee Meador-3
Below is a bit of output from a Maven2 build under Hudson (Hudson ver. 1.309) which I am 
playing with to see how it will work for us. The build is a M2 build with that option chosen
when setting up the job. The stuff preceeding the output below shows it:

* updating from SVN all of the projects including the parent (rtiBuild) and all the children
which are in folders that are siblings of the parent's folder. The <modules> tag uses .. for each
of the children.
* doing a 'clean install site' build which takes an hour and a half.

And then using the plugin that allows things to be added after the M2 build I tell it to run Maven
again with the site:deploy target. Notice the command listed after the $ on the first line below
should work.

Instead it acts like there was a -N in the command so it does not recurse to the child projects
and deploy their sites. The one parent site does get deployed correctly.

A couple more bits of info. 1) Doing a 'clean install site' and then a 'site:deploy' on the same
workspace does work on Continuum on the same machine with the same copy of Maven and the same
SVN. That machine is a VMWare VM with Red Hat Linux. 2) Doing this from my desktop machine also
works just fine though I have to use SCP instead of 'file:' URL. My desktop is a HP box running
Windows XP.

[3.05.x-Site] $ /opt/maven/apache-maven-2.1.0/bin/mvn -f rtiBuild/pom.xml -PdistByFile site:deploy
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'site'.
[INFO] org.apache.maven.plugins: checking for updates from Codehaus Repository
[INFO] org.codehaus.mojo: checking for updates from Codehaus Repository
[INFO] ------------------------------------------------------------------------
[INFO] Building RTI Build
[INFO] task-segment: [site:deploy]
[INFO] ------------------------------------------------------------------------
[INFO] [site:deploy]
file:///var/www/html/realtime-integration/rtiBuild/ - Session: Opened
file:///var/www/html/realtime-integration/rtiBuild/ - Session: Disconnecting
file:///var/www/html/realtime-integration/rtiBuild/ - Session: Disconnected
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
So ... though it says "successful" it only deployed the site for the parent project.

I can't use the 'site' link that Hudson provides. The bug is already in the list about how multi-module site builds do not work right. They just put all the 'site' output in a single folder, one on top of the other, with the last child module to be built ending up in there.

Any ideas how to get this to build the site and deploy it.

(The only idea I have had is to add about 15 more 'post' tasks to deploy each of the children's sites one by one. A daunting taks to add all that ... I hope there is an easier way.)

Thanks.

-- Lee Meador

Reply | Threaded
Open this post in threaded view
|

Re: Deploy after M2 Build acts like -N flag present

Lee Meador-3
It seems the problem was not with Hudson.

I had added in a couple of profiles with different modules in them. In the situation where Hudson was doing a mvn site:deploy it seems the "default" profile doesn't get activated. So I added a -P and it deployed all the child projects' sites too.

Thanks.

-- Lee

On Tue, Jun 16, 2009 at 3:15 PM, Lee Meador <[hidden email]> wrote:
Below is a bit of output from a Maven2 build under Hudson (Hudson ver. 1.309) which I am 
playing with to see how it will work for us. The build is a M2 build with that option chosen
when setting up the job. The stuff preceeding the output below shows it:

* updating from SVN all of the projects including the parent (rtiBuild) and all the children
which are in folders that are siblings of the parent's folder. The <modules> tag uses .. for each
of the children.
* doing a 'clean install site' build which takes an hour and a half.

And then using the plugin that allows things to be added after the M2 build I tell it to run Maven
again with the site:deploy target. Notice the command listed after the $ on the first line below
should work.

Instead it acts like there was a -N in the command so it does not recurse to the child projects
and deploy their sites. The one parent site does get deployed correctly.

A couple more bits of info. 1) Doing a 'clean install site' and then a 'site:deploy' on the same
workspace does work on Continuum on the same machine with the same copy of Maven and the same
SVN. That machine is a VMWare VM with Red Hat Linux. 2) Doing this from my desktop machine also
works just fine though I have to use SCP instead of 'file:' URL. My desktop is a HP box running
Windows XP.

[3.05.x-Site] $ /opt/maven/apache-maven-2.1.0/bin/mvn -f rtiBuild/pom.xml -PdistByFile site:deploy
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'site'.
[INFO] org.apache.maven.plugins: checking for updates from Codehaus Repository
[INFO] org.codehaus.mojo: checking for updates from Codehaus Repository
[INFO] ------------------------------------------------------------------------
[INFO] Building RTI Build
[INFO] task-segment: [site:deploy]
[INFO] ------------------------------------------------------------------------
[INFO] [site:deploy]
file:///var/www/html/realtime-integration/rtiBuild/ - Session: Opened
file:///var/www/html/realtime-integration/rtiBuild/ - Session: Disconnecting
file:///var/www/html/realtime-integration/rtiBuild/ - Session: Disconnected
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
So ... though it says "successful" it only deployed the site for the parent project.

I can't use the 'site' link that Hudson provides. The bug is already in the list about how multi-module site builds do not work right. They just put all the 'site' output in a single folder, one on top of the other, with the last child module to be built ending up in there.

Any ideas how to get this to build the site and deploy it.

(The only idea I have had is to add about 15 more 'post' tasks to deploy each of the children's sites one by one. A daunting taks to add all that ... I hope there is an easier way.)

Thanks.

-- Lee Meador




--
-- Lee Meador
Sent from gmail. My real email address is lee AT leemeador.com