else you could have initdb depend on a property, that you would set in
projectA to ${maven.build.dest} and in projectB project.properties you
would change it to something else. would it work ? If initbd is called
from projectB probably.


On Mon, 28 Mar 2005 15:20:50 -0800, dan tran <[EMAIL PROTECTED]> wrote:
> http://maven.apache.org/using/bestpractices.html#Refactor_Your_Build
> 
> -D
> 
> On Mon, 28 Mar 2005 18:02:44 -0500, Jubenville, Russ
> <[EMAIL PROTECTED]> wrote:
> > We have a project, "ProjectA", that contains some JUnit tests, where
> > those tests require our database to be initialized with data.  We have a
> > goal called initdb that loads that data, but it needs to use our java
> > classes within ProjectA to accomplish its task.
> >
> > The problem occurs when we need to run the initdb goal both within
> > Project A's normal compile-test-build cycle, as well as on its own,
> > perhaps as a pregoal to another goal in ProjectB.
> >
> > So the classpath for initdb in ProjectA needs to include ProjectA's
> > ${maven.build.dest}, in order to ensure that ProjectA's data load is
> > using the current versions of the classes comprising ProjectA.  However,
> > when running the initdb goal from ProjectB, we need it to pick up
> > ProjectA's jar file artifact instead.
> >
> > initdb is a goal in our parent project (which is parent to both ProjectA
> > and ProjectB).  We're struggling with trying to determine how to
> > dynamically set the classpath to include the ${maven.build.dest} if
> > we're in the middle of a ProjectA build (including reactor builds, etc.)
> > but to use ProjectA's artifact in the classpath when running initdb from
> > ProjectB.
> >
> > Any help will be greatly appreciated.
> >
> > > Russ Jubenville, Senior Technical Consultant
> > Consulting Services, EDS Canada
> > 177 Lake Shore Blvd. E.  *  Toronto, ON  M5A 1B7
> > > (416) 673-6210 ext. 5338
> > > [EMAIL PROTECTED]
> > [EMAIL PROTECTED]
> >
> > #####################################################################################
> > This e-mail message has been scanned for Viruses and Content and cleared
> > by NetIQ MailMarshal
> > #####################################################################################
> >
> >
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to