Maven/Websphere Deploy/Integration testing

2008-01-24 Thread David Bock
I was a Maven 1 user on a couple of project a long time ago - I'm now  
upgrading my skills to Maven 2, and also managing the build process  
for a straightforward web app deploying into WebSphere.


I have a top-level project with a bunch of sub-projects...  one of  
which is a set of functional tests.  I want to drop my ear into  
websphere, run the tests, and undeploy.  This blog has been very  
helpful:


http://sdudzin.blogspot.com/2007/09/maven-2-and-websphere-automated-build.html

The setup in that blog with a test project deploy attached to the pre- 
integration-test phase is similar to the code example from the BBWM  
book.


My problem is in the intersection of Maven lifecycle, profiles, and  
functional tests.


Most of the time, we don't want to run the functional tests - so we  
have the project that runs the tests in a profile, so we can start up  
as -P functional.  Conceptually, I find it bad form that we first  
have to run up to mvn install, then run mvn install -P functional,  
but if we don't do it this way, the pre-integration-test phase (where  
we deploy to websphere), will be using the artifact from an unknown  
build - that is, the pre-integration-test phase is well before the  
install goal has been run for the things I want to deploy and test.



Am I missing something?  Conceptually, it seems to me that in addition  
to running all goals in the lifecycle across the projects, I should be  
able to run through the lifecycle multiple times with 'sets' of  
projects, varying that set each time.


Can someone educate me with the Maven2 way?  Is there a better way to  
be doing this?


-db

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Maven/Websphere Deploy/Integration testing

2008-01-24 Thread David Bock
Um, ignore my last email - I realize now I was just making a bad  
assumption based on the lifecycle concept.  The contents of that blog  
do pretty much exactly what I want.


-db

On Jan 24, 2008, at 5:26 PM, David Bock wrote:

I was a Maven 1 user on a couple of project a long time ago - I'm  
now upgrading my skills to Maven 2, and also managing the build  
process for a straightforward web app deploying into WebSphere.


I have a top-level project with a bunch of sub-projects...  one of  
which is a set of functional tests.  I want to drop my ear into  
websphere, run the tests, and undeploy.  This blog has been very  
helpful:


http://sdudzin.blogspot.com/2007/09/maven-2-and-websphere-automated-build.html

The setup in that blog with a test project deploy attached to the  
pre-integration-test phase is similar to the code example from the  
BBWM book.


My problem is in the intersection of Maven lifecycle, profiles, and  
functional tests.


Most of the time, we don't want to run the functional tests - so we  
have the project that runs the tests in a profile, so we can start  
up as -P functional.  Conceptually, I find it bad form that we  
first have to run up to mvn install, then run mvn install -P  
functional, but if we don't do it this way, the pre-integration- 
test phase (where we deploy to websphere), will be using the  
artifact from an unknown build - that is, the pre-integration-test  
phase is well before the install goal has been run for the things I  
want to deploy and test.



Am I missing something?  Conceptually, it seems to me that in  
addition to running all goals in the lifecycle across the projects,  
I should be able to run through the lifecycle multiple times with  
'sets' of projects, varying that set each time.


Can someone educate me with the Maven2 way?  Is there a better way  
to be doing this?


-db

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



passing property values to subprojects?

2004-10-07 Thread David Bock
I have a number of subprojects I am invoking via the reactor.  I have a
property defined in the same goal as the reactor, and the property seems
to be set at that time, but the property does not seem to be set when
the subprojects goals are invoked.

Is there a way I can set a property and pass the value down to the goals
of subprojects?

-db


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: passing property values to subprojects?

2004-10-07 Thread David Bock
I have just been trying to use ant's property tag in the goal I have
defined in maven.xml... I now think that might not be the way to do
this...

I found the maven:property tag, which seems to RETRIEVE a property
from the MavenjellyContext context.  If I knew how to SET a property in
that context, I might be good to go.

-db

 On Thu, 2004-10-07 at 10:17, dan tran wrote:
 David,
 
 I am seeing the same problem that you see, i think.
 http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]msgNo=16633
 
 -D
 
 
 On Thu, 07 Oct 2004 09:39:41 -0400, David Bock [EMAIL PROTECTED] wrote:
  I have a number of subprojects I am invoking via the reactor.  I have a
  property defined in the same goal as the reactor, and the property seems
  to be set at that time, but the property does not seem to be set when
  the subprojects goals are invoked.
  
  Is there a way I can set a property and pass the value down to the goals
  of subprojects?
  
  -db
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Checkstyle - Jalopy settings

2004-05-28 Thread David Bock
After reformatting my source code with the Jalopy goal (using the style
defaults), there are a bunch of checkstyle errors - the kind of stuff
that Jalopy can easily fix with the right settings.

I have my own settings xml file for Jalopy I'm using now, so this
problem is solved for me... but it seems odd that the default settings
of one goal contradict the default settings of another.  Are there any
plans to reconcile this?

-db


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



dependency on tools.jar?

2004-05-12 Thread David Bock
I am converting a project to maven, and I have some classes that depend
on com.sun.javadoc package, which lives in the tools.jar file in a java
install.

My maven build is complaining because it can't find that dependency... I
would have expected this to be automatically provided by maven, since it
is part of the java install.

How can I adjust my build to find this jar file?

-db


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Odd Code Generation Scenario

2004-05-12 Thread David Bock
Maven Mavens,

  (Thanks for the earlier help Jason)

  I have a scenario that is a little over my head, probably involves
converting a python script to jelly, and might be contrary to some maven
build philosophy, (if it is, I want to know how to adjust my thinking).

  I am currently converting part of an internal project to use Maven as
its build system.  This is simply a 'util' package that is useful
outside of this project, and we would like to open source it.  The final
output is a single jar file.

  We have properties files that contain things like country names,
currency names, ISO country codes, some generic terms, etc, that have
been translated into French, Russian, German, Hungarian, Polish,
Japanese, etc... a total of about 12 languages.  All these are part of
the jar file, and the jar also contains some classes that use these
properties in various interesting ways.

  Part of our current build process for this jar file takes the
'default' properties files, runs a python script on them, and generates
a class that extends ListResourceBundle.  This step is useful for
several arcane reasons having to do with i18n/l10n (one of which is
being able to use the property names as static strings for compile-time
checking).

  I want to replicate this step in our new maven build.  So, I have the
following questions:

1) Where exactly, will I 'hook' this generation script into the build? 
My nose is pointing me to custom goals with the reactor, but I quickly
reach my clueless level when researching this.

2) This is really a 'templating' problem; the info in the default
property file is predictably transformed via a template... is this a
problem for Jelly?  Should I be looking at Velocity?  Or could I just
keep using the python script I already have?

3) Where is the proper place for these properties files to live in my
project structure?  I currently have them in src/resources/properties...
It doesn't seem appropriate to have them under 'java', as they are not
java classes.

4) How do I modify my build so that the properties files are included in
the generated jar file?

5) and the 'philosophical' problem - my generated .java file has to be
compiled and included in the jar file... does this violate Maven's goal
of 'one artifact per build'?  The final .java file doesn't have to end
up anyplace, but should be included in javadoc output, etc.

I appreciate the help.  Maven is an amazing piece of the puzzle for our
in-house documentation standards.

-db




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



generate jar ANDshell script?

2004-04-23 Thread David Bock
I want the output of a project to be a jar file and a shell script that
will execute that jar file.

I have found it amazingly trivial to generate a jar file, but have not
found any good information on generating a shell script (or any text
file) that would accompany it.

If I were in straight Ant, I would just copy an existing file into the
target directory, using a filterset to replace the name of the jar file
within the file(since that can change, depending on the properties in
the POM.

How can I do something similar in Maven?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



newbie question on project structure

2003-12-06 Thread David Bock
I have been looking at maven in my spare time for the last week or so,
and I am very impressed.  I'm using it to build a couple of 'trivial'
projects, where the final output is a jar file used in another project.

I'm now using multiproject to build a more complex project consisting of
several of these smaller projects.  I have searched the archives, but
can't find an answer for a couple of organizational questions.  If
someone could point me to an existing project as an example I could rip
apart, I would be very appreciative.

The project I want to build will have this final structure, that will be
the structure I would like to deploy (this is not a J2EE app... it is a
swing app with an embeded database and several command-line utilities.:

deployed-project-directory
  |
  |--lib  // contains all the jar files
  |
  |--bin  // contains several bash script tools used as command
  |   // line utilities, as well as the startup for the
  |   // swing client/
  |
  |--sbin // contains several other command-line tools

So, my first question is a philosophical one - how can I build multiple
command-line scripts when the pom should just be generating one
artifact?

My other questions have to do with the structure - during my subprojects
build, how do I 'install' them into the lib directory? Is there a way I
can user the dependency tags in the pom to generate the classpath that
the shell scripts will contain?

A link to a project that does similar things will be enough to answer my
questions... I'll enjoy ripping it apart for the discovery.

Thanks,

-db


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]