On 2009-09-27, at 6:59 AM, Nayan Hajratwala wrote:

if you're using the m2eclipse plugin, building project b will force a build of project a... but all the jar files will be installed into and resolved from your local maven repository (~/.m2/repository), not the target directory.


The JARs will not be resolved from the local repository by default if you are using M2Eclipse. They are resolved from the workspace which is one of the primary reasons for using M2Eclipse: the live management of your dependencies and being able to work with them as you would expect in Eclipse. It's when you use the maven-eclipse-plugin that you get this un-live connection to the local repository which is an extremely inefficient way to work.

From the M2Eclipse side we are soon just going to raise a huge warning to people using the maven-eclipse-plugin basically saying we don't support any interoperability between files generated with the maven-eclipse-plugin and properly importing projects into Eclipse using M2Eclipse. It's just causing too many support issues.

We are also not going to support the N:1 mapping of many Maven projects to a single Eclipse project because that just destroys the natural mapping of Maven to Eclipse projects. It also causes seriously problems because if you N Maven project where different plugins are used in different projects we can't accurately run the lifecycle correctly for each of those projects if you merge them all together. In this case we have to run everything for all projects, or have to do some very unnatural things to preserve this mapping ourselves which we decided not to do. We decided to go the path of having one Eclipse project for every Maven project and we'll correct any problems with that model.

Now that we have M2Eclipse synced up with Maven 3.x trunk and 3.x is compatible with 2.x this is the way forward. At least if you want to use M2Eclipse. We are now in a position to fix problems in Maven 3.x, turn around and absorb those changes in M2Eclipse and patch anything wrong in M2Eclipse

Not sure why you would want the jar files in your target directory... is there some sort of project specific reason for this?


---
Nayan Hajratwala
http://agileshrugged.com
http://twitter.com/nhajratw
734.658.6032

On Sep 25, 2009, at 6:41 PM, Piyush Gupta wrote:

I have configured Multiple project in my eclipse workspace and each project
has its own POM.XML . I have worked with the dependencies with single
eclipse project with multiple modules in that single project and it works fine when build with Maven but when working with Different projects is there any possibility to build the all the project with one single parent project? I do not want to build all the dependent project and install the JAR in local repository and than build the parent project I know that will work fine. What I want to achieve is with out building the dependent project I will just build the Parent Project and it will build all the dependent project plus all the Third party JAR's which every project is having and put it into the local repo and every project's respective target directory.



The project structure in eclipse is like this



C:\eclipse\workspace

                \ ProjectA

                |

                pom.xml

                |

                src.com.javasource



            \ ProjectB (Child)

                |

                pom.xml

                |

                src.com.javasource



           \ ProjectC

                |

                pom.xml

                |

                src.com.javasource



So when I will compile or run the command on ProjectA 's pom.xml it should build the ProjectB and ProjectC and create the projectb.jar and projectc.jar
and put those jar's into the respective projects target directory.





Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
----------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to