eclipse .classpath generation in a multiproject with eclipse:eclipse
hello, i have a question concerning the usage of eclipse in a multiproject build. i have a project that has the following structure : + project + ear + ejb + web The project contains a pom.xml with the defined modules: modules moduleear/module moduleejb/module moduleweb/module /modules each of the modules contains a pom.xml of its own, well the usual stuff. in the standalone version (without eclipse) everything works fine. the problem occurs when i import that project into eclipse and try to compile the project. after creating the .classpath and .project files with mvn eclipse:eclipse from the project directory i have a .classpath and a .project file in each of my module directories, not in my project directory ! however eclipse ignores the created files in the modules directories, it expects one file to be created in the project directory (root of the project). so is there a way to tell the plugin to create a proper classpath and project file for the root directory (the parent). the file .classpath content is supposed to look something like : classpath classpathentry output=ear/target/classes kind=src path=ear/src/main/java/ classpathentry output=ejb/target/classes kind=src path=ejb/src/main/java/ classpathentry output=ejb/target/classes kind=src path=ejb/target/generated-sources/xdoclet/ classpathentry output=web/target/classes kind=src path=web/src/main/java/ . classpathentry kind=con path=org.eclipse.jdt.launching.JRE_CONTAINER/ classpathentry kind=output path=bin/ /classpath basically i need for the source files of each module a specific output directory (usually the classes in the target directory). so what is needed is a kind of merged .classpath file in my project directory that contains the individual .classpath file information from the mdules, so the eclipse ide can compile the java classes and put them into the correct (module) output folders. i can provide a testcase on request. thanks in advance, andy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: eclipse .classpath generation in a multiproject with eclipse:eclipse
i have seen the guide, but it did not really convice me. so this guide tells me that i need at least two eclipse instances. one that only servers as a cvs client, and one which is used as java ide. i can't see the disadvantage of having a .project and a .classpath created in the parent, with properly set src and output folders. correct me if i am wrong, but the only disadvantage would be the fact, that it might be complicated to collect all the data and create the correct paths, or do i miss something ? once the src and output folders are set correctly everything is supposed to work fine, no need for two eclipse instances and inconvenient importing actions. The maven eclipse plugin creates eclipse .project and .classpath files for each maven project ( : pom.xml file). You should read this guide : http://maven.apache.org/guides/mini/guide-ide-eclipse.html 2006/11/22, AndreasWuest [EMAIL PROTECTED]: hello, i have a question concerning the usage of eclipse in a multiproject build. i have a project that has the following structure : + project + ear + ejb + web The project contains a pom.xml with the defined modules: modules moduleear/module moduleejb/module moduleweb/module /modules each of the modules contains a pom.xml of its own, well the usual stuff. in the standalone version (without eclipse) everything works fine. the problem occurs when i import that project into eclipse and try to compile the project. after creating the .classpath and .project files with mvn eclipse:eclipse from the project directory i have a .classpath and a .project file in each of my module directories, not in my project directory ! however eclipse ignores the created files in the modules directories, it expects one file to be created in the project directory (root of the project). so is there a way to tell the plugin to create a proper classpath and project file for the root directory (the parent). the file .classpath content is supposed to look something like : classpath classpathentry output=ear/target/classes kind=src path=ear/src/main/java/ classpathentry output=ejb/target/classes kind=src path=ejb/src/main/java/ classpathentry output=ejb/target/classes kind=src path=ejb/target/generated-sources/xdoclet/ classpathentry output=web/target/classes kind=src path=web/src/main/java/ . classpathentry kind=con path=org.eclipse.jdt.launching.JRE_CONTAINER/ classpathentry kind=output path=bin/ /classpath basically i need for the source files of each module a specific output directory (usually the classes in the target directory). so what is needed is a kind of merged .classpath file in my project directory that contains the individual .classpath file information from the mdules, so the eclipse ide can compile the java classes and put them into the correct (module) output folders. i can provide a testcase on request. thanks in advance, andy - 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]
[PATCH] add correct ejb-client to war if configured in dependency
Hello, attached you will find a patch that will allow the maven-war-plugin to add a ejb-client created by the maven-ejb-plugin. With the latest cvs snapshot it is not possible to add the ejb client to the war, always the ejb.jar will be added to the war file what is not really inteded. this dependency will only add the ejb(server).jar to the war file. What i really want is that the created ejb-client.jar is added to the war. adding the ejb(server).jar to the war file does not make sense for the war file. (the maven-ejb-plugin created a server and client version for the de.blubb.project_name.ejb projekt, which is actually another module of my project) dependency groupIdde.blubb.project_name/groupId artifactIdejb/artifactId version1.0/version typeejb-client/type /dependency If the patch is obsolete, i was wondering if there is anybody out there who is using the maven-ejb-plugin in combination with the maven-war-plugin and is actually adding the created ejb-client to the created war file successfully. As far as i can tell the maven-ejb-plugin creates a client (if requested) with the name artifcat-version-client.jar. however the maven-war-plugin does not respect the -client in the client's name. even if i set the type of the dependency to ejb-client it is still getting the ejb.jar, not the ejb-client.jar. My patch fixes this problem. i can provide a testcase that shows the current problem, if requested. feedback is really appreciated. regards, Andy Index: D:/WSAD/DefaultWorkspace/maven-war-plugin/src/test/java/org/apache/maven/plugin/war/WarExplodedMojoTest.java === --- D:/WSAD/DefaultWorkspace/maven-war-plugin/src/test/java/org/apache/maven/plugin/war/WarExplodedMojoTest.java (revision 430070) +++ D:/WSAD/DefaultWorkspace/maven-war-plugin/src/test/java/org/apache/maven/plugin/war/WarExplodedMojoTest.java (working copy) @@ -478,7 +478,7 @@ File expectedWebSourceFile = new File( webAppDirectory, pansit.jsp ); File expectedWebSource2File = new File( webAppDirectory, org/web/app/last-exile.jsp ); // final name form is artifactId-version.type -File expectedEJBArtifact = new File( webAppDirectory, WEB-INF/lib/ejbclientartifact-0.0-Test.jar ); +File expectedEJBArtifact = new File( webAppDirectory, WEB-INF/lib/ejbclientartifact-0.0-Test-client.jar ); assertTrue( source files not found: + expectedWebSourceFile.toString(), expectedWebSourceFile.exists() ); assertTrue( source files not found: + expectedWebSource2File.toString(), expectedWebSource2File.exists() ); @@ -488,7 +488,7 @@ expectedWebSourceFile.delete(); expectedWebSource2File.delete(); expectedEJBArtifact.delete(); -} +} /** * @throws Exception Index: D:/WSAD/DefaultWorkspace/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java === --- D:/WSAD/DefaultWorkspace/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java (revision 430070) +++ D:/WSAD/DefaultWorkspace/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java (working copy) @@ -1022,8 +1022,15 @@ */ private String getDefaultFinalName( Artifact artifact ) { -return artifact.getArtifactId() + - + artifact.getVersion() + . + -artifact.getArtifactHandler().getExtension(); +String type = artifact.getType(); +if (ejb-client.equals( type )) { + return artifact.getArtifactId() + - + artifact.getVersion() + - + client + + . + + artifact.getArtifactHandler().getExtension(); +} else { + return artifact.getArtifactId() + - + artifact.getVersion() + . + + artifact.getArtifactHandler().getExtension(); +} } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]