Hi, i got the same 'problem' with Maven 1.X. I need to install all my local projects before generating .project and .classpath files.

It is really annoying because the generated files does not refers to the libs in my repo.

It looks like even if the property "eclipse.dependency" is set or not, the eclipse plugin will try to find it in the repo, but after that it will write the correct entry in the .classpath and .project files.

In my case, I don't commit these files, and tell to my dev squad to do maven install before use Eclipse...

Cheers,


Gordon Henriksen a écrit :
Hi everyone,

Bit of a problem. There's a workaround, but the workaround is precisely the problem. Here goes…

mvn eclipse:eclipse requires that I install my local projects before it will generate the .project and .classpath files for Eclipse. This makes total sense for external dependencies; the .classpath needs to reference an .jar file somewhere, so putting them in ~/.m2/repository makes a lot of sense. Fine and dandy. But for a project like such:

    my-root-project/ { packaging: pom }
       my-lib/ { packaging: jar }
       my-webapp/ { packaging: war, dependencies: { my-lib } }

When I run mvn eclipse:eclipse, the Eclipse .classpath file references the adjacent my-lib project, not my-lib that resides in the ~/.m2/repository. Therefore, the install doesn't seem as if it should be necessary for the local projects. Yet the Eclipse plugin insists upon it. Further, it is damaging to our workflow, since we have to make sure our code compiles before we can add a dependency to pom.xml and successfully push those to Eclipse. Besides that, forcing the install of a project before we can even get our IDE set up seems very backwards; by definition, the projects in question are under development, so publishing them to even the per-user repository is premature.

In fact, since I prefer not to have the possibility of out-of-sync .classpath and .project files, I've prohibited checking these files in. So our checkout directions look like this:

    mkdir my-enterprise
    cd my-enterprise
    svn co svn+ssh://my.host/my-enterprise/trunk .
    mvn install  # <-- !!!!
    mvn eclipse:eclipse

Is there a reason this is the case? Or should I file an RFE and look into making a patch?

Other Eclipse+Maven users:
Should I allow checkin of .classpath and .project, even at the risk of them falling out of sync with pom.xml?
Does it sound like I'm missing the zen of making these tools cooperate?

— G


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Stéphane Bouchet
http://sbouchet.blogspot.com

Architecte Logiciel du projet CASTORE
http://www.castore.org

EMN - CRITE
La chantrerie
4, rue Alfred Kastler
44300 NANTES

02.51.85.82.29

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to