Hello Eugene

Here is why I like using m2eclipse:

- it downloads dependencies, so anything which is in a public m2
repository, i do not need to store in SVN lib/

- it adds those dependencies to eclipse's build path

- (but for this bug) they are added to build.xml generated by Eclipse ant export

I could use ant's ivy to do some of this, but its Eclipse integration
doesn't seem to be as mature as m2's.

I need to be able to use the project's lib dir for any jars not in a
maven repository.   (Out of interest, for the 2 projects under
discussion here, for Project A: 16 jars are maven dependencies, 9 jars
are in lib/;  for project B, 10 jars are maven dependencies, 11 are in
lib/).  I don't want to have to make maven artifacts out of them -
that adds no value for me, since I never use maven from the command
line (except dependency:tree).  (Maybe m2eclipse can list them as
artifacts automatically?  I'm not sure, but even then i'd want it to
dynamically update the pom as i added/removed a lib from eclipse's
build path)

For any given jar, I like to be able to flip easily between using a
third party jar (whether in m2 repository or lib dir), and making it a
dependent project (so i can add debug, patch it etc).

Why would I export my project as an ant build?  Because I use the
antjnlpwar to build a Java Web Start distribution, and it needs to
package the 46 jars on the build path.

Another reason - I have a project that has to participate in
Alfresco's ant based build system, so it is convenient to enable it to
be build via ant, even though it uses maven for dependency management.

Now, i suppose you'll tell me i can do everything in maven.

And that's probably true :)

But my comfort zone is maven for dependency management (and then, only
from within eclipse), and ant (from the command line) for whatever
else may come up.

I've found this mix has worked very well for me.

When you say the artifact corresponding to project B should be listed
in the pom.xml for project A or else there isn't much value to use
Maven dependency management for those projects, well, I have found
sufficient value using maven the way I am.  It might not be the full
value maven can provide (i'm sure it isn't), but it is all I have been
looking for, and doesn't require me or other developers to have a
sophisticated understanding of maven.

I guess i'm wondering whether m2eclipse will continue to support this
sort of usage, or force users such as me down the path of an
increasing commitment to maven.  Obviously i hope the former, and i
think easy adoption by this class of user is important since some %
will become fully committed over time.

I hope this is useful in giving you a picture of how m2eclipse is used
(abused?) in the real world.

kind regards

Jason

ps i will open a jira issue (with test case), thanks.


> > I have an Eclipse project A which has an eclipse project B on its build
> path.
> > Both Eclipse projects have their own Maven Dependencies.
> >
> >
>   First of all, you shouldn't have project B in the build path of project A,
> but artifact corresponding to project B should be listed in the pom.xml for
> project A or else there isn't much value to use Maven dependency management
> for those projects.
>
>
> > I am finding that when I use Eclipse (File > Export) to generate an
> > ant build.xml for project A, the resulting build file defines a
> > <path id="Maven Dependencies.libraryclasspath"> which contains the
> > Maven Dependencies for project B, not project A.
> >
> > This behaviour occurs with both the current plug in, and the old 0.01x
> series.
> >
> > If I remove Project B from Project A's build path, the generated
> > build.xml does contain Project A's Maven Dependencies (as you'd
> > expect).
> >
> > So the manual workaround is to do that, and cut/paste the resulting
> > dependencies.
> >
> > Has anyone else encountered this?
> >
>   It is not exactly clear to me how your projects actually look like, but I
> could be an issue with Ant script generation provided by Eclipse Platform.
> If you want us to investigate this, please open jira issue and attach test
> Eclipse projects that would allow us to reproduce this.
>
>   regards,
>   Eugene
>
>  PS: by the way, why would you want to export Maven project as an Ant
> script?
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to