Hi Charles, Charles N. Harvey III wrote on Friday, March 19, 2004 5:46 PM: > What doesn't work is when you run "maven eclipse" from the command > line maven re-writes your .classpath and .project files. If you run: > "maven -Dgoal=eclipse multiproject:goal" it will supposedly > look into each directory and then build the .classpath based > on each sub project's project.xml file. What it winds up > doing is creating a .classpath and > .project file in each sub project. What it should do is add all of > the dependencies to the top level .classpath file.
Multiproject just runs arbitrary goals for each subproject. For most of the goals it has no idea, what it is doing. This applies to the "eclipse" goal also. There is no concept for a merge mechanism of .classpath files. And if you've set your dependencies in the POM correctly, each Eclipse project file in the single subdirectory builds without problem (it contains the same classpaths, that Maven has for its compilation too). > So, if you run "maven eclipse" on a normal project, every > class you open up will be able to see all necessary jars from > the project.xml. In a multiproject, it won't. You will open > up a java file and get a page full of errors because it won't > be able to see the correct jars. Calling the eclipse goal for the top level project does not make too much sense, the Eclipse plugin is not aware of multiproject either. > The way around it is to manually edit the .classpath file and > check it in, so it is the same no matter where you check it > out. All the jar files will be pointing to "MAVEN_REPO" > anyway, so it won't change per developer. Only if you insist to have one single big Eclipse project for all of your subprojects. Regards, J�rg --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
