This sounds more like a profile solution, where the developer picks
which one they want to use.

m2 --profile=CDC package
m2 --profile=j2se package

You said earlier you wanted to have a parent project that would build
both, though. Can you elaborate on that? This is the part that is not
currently supported, the profile executions must be separate.

Thanks,
Brett

On 6/17/05, Shane Isbell <[EMAIL PROTECTED]> wrote:
> Hi Brett,
> 
> The use case is as follows: Each sub project has a single set of
> source files. The developer sets a target flag to CDC or J2SE.
> Depending on the flag, the build tool compiles the Java source files
> under either CDC or J2SE. In the case of CDC, the build tool uses a
> different bootclasspath during compilation. Next. the build tool
> packages the classes within a jar file, appending
> <myfile>-<platform>.jar, where platform is either CDC or J2SE,
> depending on the target. End.
> 
> The reason that I do not want to split these into separate projects is
> that the source files are the same. If a developer modifies, say the
> CDC source, it is not reflected in the J2SE source, which leads to
> versioning problems. Given that I am compiling with different
> bootclasspaths, I do not believe that the solution that you outlined
> below would work. I will however, look into it.
> 
> Regards,
> Shane
> 
> On 6/16/05, Brett Porter <[EMAIL PROTECTED]> wrote:
> > In Maven, a POM is a unit of work, so a project must have just one.
> > Usually, targetting multiple platforms involves setting up multiple
> > projects.
> >
> > pom.xml - parent that has <modules/> for the following:
> > +- foo-common/pom.xml - shared information
> > +- foo-j2se/pom.xml - j2se specific build, depends on foo-common
> > +- foo-cdc/pom.xml - CDC specific build, depends on foo-common
> >
> > Does this suit your situation? What are the actual differences between
> > the two platforms?
> >
> > We currently have a new solution for environmental specifics in
> > alpha-3 (profiles), however these are not intended to be used to build
> > multiple artifacts from a single build, but rather building
> > differently in separate environments. You may have justification for
> > allowing them to be incorporated into a single build, so I'd like to
> > walk through the use case with you.
> >
> > Cheers,
> > Brett
> >
> > On 6/17/05, Shane Isbell <[EMAIL PROTECTED]> wrote:
> > > For my current project, I am testing a migration from ANT to Maven 2.0
> > > (alpha 2). I have encountered an issue that I am unable to resolve. I
> > > have a single source tree, but I need  to compile and package a JAR
> > > for two different platforms: J2SE and CDC. I have built two separate
> > > pom.xml files: pom-J2SE.xml and pom-CDC.xml, within the same
> > > directory. I was hoping there would be a command similar to ant: ant
> > > -buildfile <myfile> but I have been unable to find it. If this is a
> > > possible solution, I also need to manage the entire platform build
> > > from a master pom.xml, which propagates target platform information
> > > down to the sub projects. Is there a feasible solution in Maven 2.0?
> > >
> > > Thanks,
> > > Shane
> > >
> > > ---------------------------------------------------------------------
> > > 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