Yes, the problem with using the classpath method is some tools (specifically jrules) has its own plugin editor using eclipse and it uses the <project></project> reference tags to define its own project dependencies. i'm not sure if i remove these, and add in a classpath entry to a jar, whether it will be able to locate the resources it needs...
Thanks, -Jeff Salman Moghal wrote: > > If I'm not mistaken, in Eclipse, you are trying to build the "Java Build > Path" by referencing additional projects under the "Projects" tab for a > given Java Project? If that's what you are trying to do.. then yes, the > dependancy can be established by listing additional projects under the > <projects></projects> XML block of .project file. > > Given MyProject1 and MyProject2, and MyProject1 depends on MyProject2, > .project file may look like below: > > <?xml version="1.0" encoding="UTF-8"?> > <projectDescription> > <name>MyProject1</name> > <projects>MyProject2</projects> > </projectDescription> > > Unfortunately, I don't know if there is a way to do add project > references > using maven-eclipse-plugin. > > However, the correct way, IMHO, would be to use a classpath entry to > establish inter-project dependancies. WTP resource .classpath defines > these > daependencies, e.g. for MyProject1, .classpath will look something like > this: > > <?xml version="1.0" encoding="UTF-8"?> > <classpath> > <classpathentry combineaccessrules="false" kind="src" > path="/MyProject2"/> > </classpath> > > If you have properly constructed the Maven project dependancies in > pom.xml, > maven-eclipse-plugin will generate the correct depedancy in .classpath > file > for you. So given MyProject1 and MyProject2 and corresponding POM files > below, .classpath for MyProject1 should contain a dependancy reference for > MyProject2: > > MyProject1 > pom.xml: > <project> > <modelVersion>4.0.0</modelVersion> > <groupId>org.mytest</groupId> > <artifactId>MyProject1</artifactId> > <version>1.0</version> > <packaging>jar</packaging> > <build> > <plugins> > <plugin> > <!-- Configure Maven JAR plugin --> > <artifactId>maven-jar-plugin</artifactId> > <configuration> > <archive> > <manifestEntries></manifestEntries> > </archive> > </configuration> > </plugin> > </plugins> > </build> > </project> > > MyProject2 > pom.xml: > <project> > <modelVersion>4.0.0</modelVersion> > <groupId>org.mytest</groupId> > <artifactId>MyProject2</artifactId> > <version>1.0</version> > <packaging>jar</packaging> > <dependencies> > <dependency> > <groupId>org.mytest</groupId> > <artifactId>MyProject1</artifactId> > <version>1.0version> > </dependency> > </dependencies> > <build> > <plugins> > <plugin> > <!-- Configure Maven JAR plugin --> > <artifactId>maven-jar-plugin</artifactId> > <configuration> > <archive> > <manifestEntries></manifestEntries> > </archive> > </configuration> > </plugin> > </plugins> > </build> > </project> > > > -- > Salman Moghal > > ----- Original Message ----- > From: "jeffpuro" <[EMAIL PROTECTED]> > To: <users@maven.apache.org> > Sent: Thursday, March 06, 2008 1:38 PM > Subject: Re: Adding additional information using MVN eclipse:eclipse > > >> >> Thanks for the quick response. Specifically, is there a way to add in >> project references using additional configuration? I do not see a way to >> do >> this. >> >> Thanks, >> >> Jeff >> >> >> Salman Moghal wrote: >>> >>> There is a pretty comprehensive list of additional configs that you can >>> add >>> as documented on maven-eclipse-plugin page: >>> http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html >>> >>> I would suggest that you start by adding maven-eclipse-plugin config in >>> the >>> root POM. It would be carried over to all of your sub maven projects. >>> Then >>> if you want to overwrite certain maven-eclipse-plugin configs for >>> particular >>> maven projects, i.e. WAR or EARs may need additional eclipse facet >>> configs, >>> you could simply override maven-eclipse-config for that particular pom. >>> >>> Here's a sample for the maven-eclipse-plugin for root POM. Note that >>> it's >>> specifically targetted for Eclipse 3.2 based environment (will also work >>> for >>> RAD 6.x/RAD 7). Use "eclipse:rad" mojo to generate RAD WTP resources >>> ,and >>> "eclipse:eclipse" if you are working in Eclipse 3.2.x or higher >>> environment. >>> Hope this helps. >>> >>> <!-- maven-eclipse-plugin config for generating WTP 1.5 settings for >>> WAR >>> and EARs properly --> >>> <plugin> >>> >>> <groupId>org.apache.maven.plugins</groupId> >>> <artifactId>maven-eclipse-plugin</artifactId> >>> <configuration> >>> >>> <manifest> >>> ${basedir}/src/main/resources/META-INF/MANIFEST.MF >>> </manifest> >>> >>> <addVersionToProjectName>true</addVersionToProjectName> >>> <useProjectReferences>false</useProjectReferences> >>> >>> <wtpmanifest>true</wtpmanifest> >>> <wtpapplicationxml>true</wtpapplicationxml> >>> <wtpversion>1.5</wtpversion> >>> >>> <additionalBuildcommands> >>> >>> <buildcommand>com.ibm.etools.common.migration.MigrationBuilder</buildcommand> >>> <buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand> >>> >>> <buildcommand>org.eclipse.wst.common.project.facet.core.builder</buildcommand> >>> >>> <buildcommand>org.eclipse.wst.validation.validationbuilder</buildcommand> >>> </additionalBuildcommands> >>> <additionalProjectnatures> >>> >>> <projectnature>org.eclipse.wst.common.project.facet.core.nature</projectnature> >>> <projectnature>org.eclipse.jdt.core.javanature</projectnature> >>> >>> <projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature</projectnature> >>> >>> <projectnature>org.eclipse.jem.workbench.JavaEMFNature</projectnature> >>> </additionalProjectnatures> >>> <classpathContainers> >>> >>> <classpathContainer>org.eclipse.jst.j2ee.internal.module.container</classpathContainer> >>> </classpathContainers> >>> >>> </configuration> >>> >>> </plugin> >>> <!-- maven-eclipse-plugin --> >>> >>> -- >>> Salman Moghal >>> >>> ----- Original Message ----- >>> From: "jeffpuro" <[EMAIL PROTECTED]> >>> To: <users@maven.apache.org> >>> Sent: Thursday, March 06, 2008 12:10 PM >>> Subject: Adding additional information using MVN eclipse:eclipse >>> >>> >>>> >>>> I need to add additional information into my project files that >>>> "eclipse:eclipse" generates. Is this possible to do using the eclipse >>>> plugin for maven? >>>> >>>> Thanks, >>>> >>>> Jeff >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/Adding-additional-information-using-MVN-eclipse%3Aeclipse-tp15878724s177p15878724.html >>>> Sent from the Maven - Users mailing list archive at Nabble.com. >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Adding-additional-information-using-MVN-eclipse%3Aeclipse-tp15878724s177p15880947.html >> Sent from the Maven - Users mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Adding-additional-information-using-MVN-eclipse%3Aeclipse-tp15878724s177p15884213.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]