You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Don Brown <mr...@twdata.org> on 2005/03/01 00:11:15 UTC

Re: Latest build (ala Maven) [Long]

You, sir, are a build god. :)  Hey, mind sharing some tips for 
converting old Ant tasks to Maven?  For example, the webapps project has 
at least one Ant task that hasn't been migrated over to the new Maven 
build, "source".  It copies the source code for the webapp examples into 
the WEB-INF/src directory.

Also in mind, for bsf and flow, I have several ant tasks that create 
example applications.  What is the best way to move them over?

Thanks again for all the great work!

Don

James Mitchell wrote:
> For those of you following along (and some who aren't) with the 
> reorganization of Struts' source and subsequent shift (in part) to a 
> Maven-based build system, I have created a nightly build directory for 
> those eager to get all of the latest binary and/or source distributions.
> 
> The Maven-built nightly Struts subprojects are available at:
> http://cvs.apache.org/builds/struts/maven/
> 
> 
> The generated docs will be temporarily available at:
> http://cvs.apache.org/~jmitchell/latest-docs/
> 
> 
> Note - The documentation provided from the link above is also available 
> for offline viewing by downloading any of the src distributions from the 
> first link above.  Also, please be aware that these nightly builds are 
> not perfect and you are encouraged to download and try them at your 
> leisure.  We are all volunteers, so any time you can donate to provide 
> input/feedback is VERY much appreciated.
> 
> If there is anything you would like to see in these artifacts, please do 
> not hesitate to ask.
> 
> 
> For developers who wish to build from the latest (from SVN), here are 
> the steps to follow:
> 
> This assumes you have the following installed and working correctly on 
> your machine:
> - SVN client
> - Maven
> 
> ( For SVN, I use the command line client under cygwin )
>  http://subversion.tigris.org/project_packages.html
> 
> 
> 
> 1. Get the latest from svn
>    $cd path/to/where/you/want/svn/struts
>    $svn co http://svn.apache.org/repos/asf/struts/current/
> 
> 2. Change to build/
>    $cd current/build
> 
> 3. Build all
>    $maven build-all
> 
> You should see Maven building the complete distribution for each 
> subproject under Struts.
> This will take a few minutes, so be patient.
> 
> The following will be built:
> core/
> taglib/
> tiles/
> apps/
> el/
> bsf/
> flow/
> 
> You can now go under any of the above folders and look in target/ to see 
> what Maven has created for you.  The docs/ dir will have the docs as the 
> above link shows.
> 
> If there are errors and are not sure why, please don't hesitate to ask.
> 
> 
> For those of you who feel even more daring ;) and would like to 
> contribute a patch.  The easiest way to do it is to check out the source 
> (as described above) and make your changes locally, then do a 'svn diff' 
> against the subproject that you've made changes to.  The output is the 
> exact format we need to patch and commit those changes.  Simply pipe the 
> out put from your diff to a file.
> 
> For example, say I made some changes to org.apache.struts.Globals.java
> 
> Before making changes, "svn status -q" would look like this:
> 
> jmitchell@auburn ~/svn/struts/current
> $ svn status -q
> 
> Performing status on external item at 'build'
> 
> Performing status on external item at 'el'
> 
> Performing status on external item at 'el/build'
> 
> Performing status on external item at 'tiles'
> 
> Performing status on external item at 'tiles/build'
> 
> Performing status on external item at 'faces'
> 
> Performing status on external item at 'faces/build'
> 
> Performing status on external item at 'taglib'
> 
> Performing status on external item at 'taglib/build'
> 
> Performing status on external item at 'apps'
> 
> Performing status on external item at 'apps/build'
> 
> Performing status on external item at 'flow'
> 
> Performing status on external item at 'flow/build'
> 
> Performing status on external item at 'core'
> 
> Performing status on external item at 'core/build'
> 
> Performing status on external item at 'bsf'
> 
> Performing status on external item at 'bsf/build'
> 
> Performing status on external item at 'shale'
> 
> Performing status on external item at 'sandbox'
> 
> jmitchell@auburn ~/svn/struts/current
> $
> 
> 
> 
> 
> ...ok, now I add my cool new constant...now I want to see what has 
> changed...
> 
> 
> 
> 
> jmitchell@auburn ~/svn/struts/current
> $ svn status -q
> 
> Performing status on external item at 'build'
> 
> Performing status on external item at 'el'
> 
> Performing status on external item at 'el/build'
> 
> Performing status on external item at 'tiles'
> 
> Performing status on external item at 'tiles/build'
> 
> Performing status on external item at 'faces'
> 
> Performing status on external item at 'faces/build'
> 
> Performing status on external item at 'taglib'
> 
> Performing status on external item at 'taglib/build'
> 
> Performing status on external item at 'apps'
> 
> Performing status on external item at 'apps/build'
> 
> Performing status on external item at 'flow'
> 
> Performing status on external item at 'flow/build'
> 
> Performing status on external item at 'core'
> M      core/src/share/org/apache/struts/Globals.java  <== here it is
> 
> Performing status on external item at 'core/build'
> 
> Performing status on external item at 'bsf'
> 
> Performing status on external item at 'bsf/build'
> 
> Performing status on external item at 'shale'
> 
> Performing status on external item at 'sandbox'
> 
> 
> 
> ..so let's see exactly what changed under core/
> 
> 
> jmitchell@auburn ~/svn/struts/current
> $ svn diff core/
> Index: core/src/share/org/apache/struts/Globals.java
> ===================================================================
> --- core/src/share/org/apache/struts/Globals.java       (revision 155701)
> +++ core/src/share/org/apache/struts/Globals.java       (working copy)
> @@ -223,6 +223,8 @@
>      * The property under which a transaction token is reported.
>      */
>     public static final String TOKEN_KEY = TaglibPackage + ".TOKEN";
> +
> +    public static final String JAMES_COOL_NEW_CONSTANT = "foo";
> 
> 
> }
> 
> 
> ...now I pipe that to a local file...
> 
> jmitchell@auburn ~/svn/struts/current
> $ svn diff core/ > james-cool-new-constant.patch
> 
> jmitchell@auburn ~/svn/struts/current
> $ ll
> total 1
> drwsr-sr-t+  12 jmitchel None            0 Feb 28 16:40 apps
> drwsr-sr-t+   7 jmitchel None            0 Feb 28 16:43 bsf
> drwsr-sr-t+  12 jmitchel None            0 Feb 28 16:32 core
> drwsr-sr-t+  11 jmitchel None            0 Feb 28 16:40 el
> drwsr-sr-t+   9 jmitchel None            0 Feb 23 11:33 faces
> drwsr-sr-t+   7 jmitchel None            0 Feb 24 16:46 flow
> -rw-r--r--    1 jmitchel None          497 Feb 28 17:04 
> james-cool-new-constant.patch
> drwsr-sr-t+   8 jmitchel None            0 Feb 27 12:20 mock
> drwsr-sr-t+   9 jmitchel None            0 Feb 23 11:39 sandbox
> drwsr-sr-t+   7 jmitchel None            0 Feb 23 11:38 shale
> drwsr-sr-t+  10 jmitchel None            0 Feb 28 16:37 taglib
> drwsr-sr-t+   9 jmitchel None            0 Feb 28 16:39 tiles
> 
> 
> 
> Now I can attach that file as a patch on a ticket.
> 
> And after one of those awesome committers commits your patch...
> 
> Voila!  You have now contributed to the Open Source movement!!!
> 
> (I know, I know, bad example, but you get the picture ;)
> 
> 
> Getting the latest from SVN is just as easy
> 
> jmitchell@auburn ~/svn/struts/current
> $ svn up
> 
> 
> I hope this simple email will inspire some of you to go beyond lurking 
> status and help make Apache Struts even better than it is today.
> 
> 
> P.S. Since the committers are likely to -1 my "cool new constant", I'll 
> revert my changes ;)
> 
> jmitchell@auburn ~/svn/struts/current
> $ svn revert core/
> 
> 
> 
> -- 
> James Mitchell
> Software Engineer / Open Source Evangelist
> EdgeTech, Inc.
> 678.910.8017
> AIM: jmitchtx
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Applying Ant in Maven (Re: Latest build (ala Maven))

Posted by Joe Germuska <Jo...@Germuska.com>.
At 3:11 PM -0800 2/28/05, Don Brown wrote:
>Hey, mind sharing some tips for converting old Ant tasks to Maven?


In general, you can simply copy them into "maven.xml", wrapped in a 
<goal>,<preGoal>, or <postGoal> tag.  The only change is that you 
must qualify each element with a namespace: as James set it up, the 
namespace would be "ant", so
<echo>Hello World</echo>
becomes
<ant:echo>Hello World</ant:echo>

If its a task to be attained directly, wrap it in a "goal" tag with a 
name attribute: for an example, see build/maven.xml: <goal 
name="build-all">

If it is a task which is to be attained before or after some other 
goal, use <preGoal> or <postGoal> accordingly, with a "name" 
attribute whose name is the goal relative to which you want your 
block executed.

Obviously, for this you can use any goal which you specify as an 
argument to maven ("clean", "jar", etc), but sometimes you want to 
get in the middle of an operation.  In that case, sometimes a 
plugin's homepage will list intermediate goals, or sometimes you have 
to poke through the jelly script which drives the plugin.

Hope that helps.

Joe

-- 
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com    
"Narrow minds are weapons made for mass destruction"  -The Ex

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Latest build (ala Maven) [Long]

Posted by James Mitchell <jm...@apache.org>.
Sure, I'll take a look.



--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx

----- Original Message ----- 
From: "Don Brown" <mr...@twdata.org>
To: "Struts Developers List" <de...@struts.apache.org>
Sent: Monday, February 28, 2005 6:11 PM
Subject: Re: Latest build (ala Maven) [Long]


> You, sir, are a build god. :)  Hey, mind sharing some tips for converting 
> old Ant tasks to Maven?  For example, the webapps project has at least one 
> Ant task that hasn't been migrated over to the new Maven build, "source". 
> It copies the source code for the webapp examples into the WEB-INF/src 
> directory.
>
> Also in mind, for bsf and flow, I have several ant tasks that create 
> example applications.  What is the best way to move them over?
>
> Thanks again for all the great work!
>
> Don
>
> James Mitchell wrote:
>> For those of you following along (and some who aren't) with the 
>> reorganization of Struts' source and subsequent shift (in part) to a 
>> Maven-based build system, I have created a nightly build directory for 
>> those eager to get all of the latest binary and/or source distributions.
>>
>> The Maven-built nightly Struts subprojects are available at:
>> http://cvs.apache.org/builds/struts/maven/
>>
>>
>> The generated docs will be temporarily available at:
>> http://cvs.apache.org/~jmitchell/latest-docs/
>>
>>
>> Note - The documentation provided from the link above is also available 
>> for offline viewing by downloading any of the src distributions from the 
>> first link above.  Also, please be aware that these nightly builds are 
>> not perfect and you are encouraged to download and try them at your 
>> leisure.  We are all volunteers, so any time you can donate to provide 
>> input/feedback is VERY much appreciated.
>>
>> If there is anything you would like to see in these artifacts, please do 
>> not hesitate to ask.
>>
>>
>> For developers who wish to build from the latest (from SVN), here are the 
>> steps to follow:
>>
>> This assumes you have the following installed and working correctly on 
>> your machine:
>> - SVN client
>> - Maven
>>
>> ( For SVN, I use the command line client under cygwin )
>>  http://subversion.tigris.org/project_packages.html
>>
>>
>>
>> 1. Get the latest from svn
>>    $cd path/to/where/you/want/svn/struts
>>    $svn co http://svn.apache.org/repos/asf/struts/current/
>>
>> 2. Change to build/
>>    $cd current/build
>>
>> 3. Build all
>>    $maven build-all
>>
>> You should see Maven building the complete distribution for each 
>> subproject under Struts.
>> This will take a few minutes, so be patient.
>>
>> The following will be built:
>> core/
>> taglib/
>> tiles/
>> apps/
>> el/
>> bsf/
>> flow/
>>
>> You can now go under any of the above folders and look in target/ to see 
>> what Maven has created for you.  The docs/ dir will have the docs as the 
>> above link shows.
>>
>> If there are errors and are not sure why, please don't hesitate to ask.
>>
>>
>> For those of you who feel even more daring ;) and would like to 
>> contribute a patch.  The easiest way to do it is to check out the source 
>> (as described above) and make your changes locally, then do a 'svn diff' 
>> against the subproject that you've made changes to.  The output is the 
>> exact format we need to patch and commit those changes.  Simply pipe the 
>> out put from your diff to a file.
>>
>> For example, say I made some changes to org.apache.struts.Globals.java
>>
>> Before making changes, "svn status -q" would look like this:
>>
>> jmitchell@auburn ~/svn/struts/current
>> $ svn status -q
>>
>> Performing status on external item at 'build'
>>
>> Performing status on external item at 'el'
>>
>> Performing status on external item at 'el/build'
>>
>> Performing status on external item at 'tiles'
>>
>> Performing status on external item at 'tiles/build'
>>
>> Performing status on external item at 'faces'
>>
>> Performing status on external item at 'faces/build'
>>
>> Performing status on external item at 'taglib'
>>
>> Performing status on external item at 'taglib/build'
>>
>> Performing status on external item at 'apps'
>>
>> Performing status on external item at 'apps/build'
>>
>> Performing status on external item at 'flow'
>>
>> Performing status on external item at 'flow/build'
>>
>> Performing status on external item at 'core'
>>
>> Performing status on external item at 'core/build'
>>
>> Performing status on external item at 'bsf'
>>
>> Performing status on external item at 'bsf/build'
>>
>> Performing status on external item at 'shale'
>>
>> Performing status on external item at 'sandbox'
>>
>> jmitchell@auburn ~/svn/struts/current
>> $
>>
>>
>>
>>
>> ...ok, now I add my cool new constant...now I want to see what has 
>> changed...
>>
>>
>>
>>
>> jmitchell@auburn ~/svn/struts/current
>> $ svn status -q
>>
>> Performing status on external item at 'build'
>>
>> Performing status on external item at 'el'
>>
>> Performing status on external item at 'el/build'
>>
>> Performing status on external item at 'tiles'
>>
>> Performing status on external item at 'tiles/build'
>>
>> Performing status on external item at 'faces'
>>
>> Performing status on external item at 'faces/build'
>>
>> Performing status on external item at 'taglib'
>>
>> Performing status on external item at 'taglib/build'
>>
>> Performing status on external item at 'apps'
>>
>> Performing status on external item at 'apps/build'
>>
>> Performing status on external item at 'flow'
>>
>> Performing status on external item at 'flow/build'
>>
>> Performing status on external item at 'core'
>> M      core/src/share/org/apache/struts/Globals.java  <== here it is
>>
>> Performing status on external item at 'core/build'
>>
>> Performing status on external item at 'bsf'
>>
>> Performing status on external item at 'bsf/build'
>>
>> Performing status on external item at 'shale'
>>
>> Performing status on external item at 'sandbox'
>>
>>
>>
>> ..so let's see exactly what changed under core/
>>
>>
>> jmitchell@auburn ~/svn/struts/current
>> $ svn diff core/
>> Index: core/src/share/org/apache/struts/Globals.java
>> ===================================================================
>> --- core/src/share/org/apache/struts/Globals.java       (revision 155701)
>> +++ core/src/share/org/apache/struts/Globals.java       (working copy)
>> @@ -223,6 +223,8 @@
>>      * The property under which a transaction token is reported.
>>      */
>>     public static final String TOKEN_KEY = TaglibPackage + ".TOKEN";
>> +
>> +    public static final String JAMES_COOL_NEW_CONSTANT = "foo";
>>
>>
>> }
>>
>>
>> ...now I pipe that to a local file...
>>
>> jmitchell@auburn ~/svn/struts/current
>> $ svn diff core/ > james-cool-new-constant.patch
>>
>> jmitchell@auburn ~/svn/struts/current
>> $ ll
>> total 1
>> drwsr-sr-t+  12 jmitchel None            0 Feb 28 16:40 apps
>> drwsr-sr-t+   7 jmitchel None            0 Feb 28 16:43 bsf
>> drwsr-sr-t+  12 jmitchel None            0 Feb 28 16:32 core
>> drwsr-sr-t+  11 jmitchel None            0 Feb 28 16:40 el
>> drwsr-sr-t+   9 jmitchel None            0 Feb 23 11:33 faces
>> drwsr-sr-t+   7 jmitchel None            0 Feb 24 16:46 flow
>> -rw-r--r--    1 jmitchel None          497 Feb 28 17:04 
>> james-cool-new-constant.patch
>> drwsr-sr-t+   8 jmitchel None            0 Feb 27 12:20 mock
>> drwsr-sr-t+   9 jmitchel None            0 Feb 23 11:39 sandbox
>> drwsr-sr-t+   7 jmitchel None            0 Feb 23 11:38 shale
>> drwsr-sr-t+  10 jmitchel None            0 Feb 28 16:37 taglib
>> drwsr-sr-t+   9 jmitchel None            0 Feb 28 16:39 tiles
>>
>>
>>
>> Now I can attach that file as a patch on a ticket.
>>
>> And after one of those awesome committers commits your patch...
>>
>> Voila!  You have now contributed to the Open Source movement!!!
>>
>> (I know, I know, bad example, but you get the picture ;)
>>
>>
>> Getting the latest from SVN is just as easy
>>
>> jmitchell@auburn ~/svn/struts/current
>> $ svn up
>>
>>
>> I hope this simple email will inspire some of you to go beyond lurking 
>> status and help make Apache Struts even better than it is today.
>>
>>
>> P.S. Since the committers are likely to -1 my "cool new constant", I'll 
>> revert my changes ;)
>>
>> jmitchell@auburn ~/svn/struts/current
>> $ svn revert core/
>>
>>
>>
>> -- 
>> James Mitchell
>> Software Engineer / Open Source Evangelist
>> EdgeTech, Inc.
>> 678.910.8017
>> AIM: jmitchtx
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org