All good points Jeff, I'm going to give M2 a try with my workaround, but if
even one other thing gets in my way, I'll be reverting my build to Maven 1.x

On 12/5/05, Jeff Jensen <[EMAIL PROTECTED]> wrote:
>
> Quoting Matthew Wheaton <[EMAIL PROTECTED]>:
>
> > Jeff,
> >
> > I added a comment to that issue.
> > If they take systemPath away, as he says, then that'll break me again,
> for
> > sure.
> > I'm really contemplating NOT using M2.
>
> Agreed.  I am concerned about seemingly narrowly-focused use cases of
> M2.  If
> not buying into "repo only" references, then a product cannot use
> it.  Well,
> there are plenty of customers I have that it won't work at.  Flexibility
> is
> key, not one mantra.
>
> The outcome of accessing source-controlled artifacts will play a part in
> our
> decision as well.
>
> Another reason I have stopped the migration to M2 for us is there are too
> many
> JIRAs that prevent a build from happening (we have a large system under
> development [over 7300 .java files to date across all components excluding
> test
> classes, with another year of development to go on about 70 developers],
> and M2
> can't do it yet, but M1 works fine [has quirks but gets the job done
> nicely]).
>
>
> > In any case, my workaround to make it truly dynamic, is my build.batfile
> > first calls an ANT script that compiles a DependencyBuilder class, which
> > iterates through the jar files in my "lib" directory, and creates a
> string
> > that has all the <dependency> entries in it. Then, I have a pom that
> lives
> > in my "lib" project called pom-template.xml, that, while still in ANT, I
> > copy to the same directory renaming to pom.xml. I filter the file using
> the
> > ANT filter mechanism to ADD the string I just created in the
> > DependencyBuilder class, giving a psuedo-dynamic discovery of
> dependencies.
> >
> > Then, I reference the "libs" project in each of the sub-projects.
> >
> > A little complicated, but then I don't have to manually add JARs to the
> > build when the developers add them.
>
> What a PITA!!  :-|
>
>
> > I'll add this commentary to the issue you referenced as well.
>
> Thanks for your comments.  I appreciate understanding your thoughts.
>
>
> > mw
> >
> > On 12/5/05, Jeff Jensen <[EMAIL PROTECTED]> wrote:
> > >
> > > Yes, we do the same thing.  How to solve changed with M2.  Now, use
> > > <scope>system</scope> and <systemPath>.
> > >
> > > I think this JIRA discusses what your issue is.  Brett described the
> > > un-recommended workaround.
> > >
> > > http://jira.codehaus.org/browse/MNG-1471
> > >
> > > I look forward to reading your comments on this... :-)
> > >
> > >
> > > Quoting Matthew Wheaton <[EMAIL PROTECTED]>:
> > >
> > > > Hi all,
> > > >
> > > > In Maven 1.x, I could get a list of the jars in my version control
> > > > repository, and dynamically add them to the Maven build path using
> an
> > > ant
> > > > task.
> > > > What's important to note, is that I have all my dependency jars in a
> > > few,
> > > > KNOWN directories. I would like to be able to include all those
> jars,
> > > > without having to reference each one of them explicitly in a POM, or
> a
> > > > parent POM. Below is how I do this in Maven 1.x with the ANT task.
> Note
> > > > below, that I can create the ant goal, however, the last line in the
> > > goal,
> > > > seems to be only an Maven 1.x feature and not possible in Maven 2.x.
> > > >
> > > > In our environment, we may have totally different people developing
> that
> > > the
> > > > people doing the build. When a developer adds new JARs to version
> > > control,
> > > > it will break the build, unless we manually add the reference in all
> the
> > > > associated POMs (or parent POMs). We're trying to avoid this, any
> ideas
> > > ?
> > > >
> > > > Below is my Maven 1.x ANT goal.
> > > >
> > > >     <goal
> > > >         name="build:SetClasspath"
> > > >         description="Sets the classpath">
> > > >
> > > >     <echo message="Setting the compile classpath . . ." />
> > > >
> > > >     <ant:path id="all.libs.path">
> > > >
> > > >       <!-- get all the deployment libs -->
> > > >       <ant:fileset dir="${build.deployLibs}">
> > > >         <ant:include name="**/*.*" />
> > > >       </ant:fileset>
> > > >
> > > >       <!-- get all the compile only libs -->
> > > >       <ant:fileset dir="${build.compileLibs}">
> > > >         <ant:include name="**/*.*" />
> > > >       </ant:fileset>
> > > >     </ant:path>
> > > >
> > > >     <m:addPath id="maven.dependency.classpath" refid="all.libs.path"
> />
> > > >
> > > >
> > > >   </goal>
>
>
>
>

Reply via email to