cvs commit: maven-plugins/eclipse/xdocs changes.xml properties.xml
epugh 2004/10/26 00:57:06 Modified:eclipse plugin.properties eclipse/src/plugin-resources/templates classpath.jelly eclipse/src/plugin-test project.properties maven.xml eclipse/xdocs changes.xml properties.xml Log: added maven.eclipse.resources.addtoclasspath switch to provide backwards compatibilty with older project structures using the plugin. Revision ChangesPath 1.9 +1 -0 maven-plugins/eclipse/plugin.properties Index: plugin.properties === RCS file: /home/cvs/maven-plugins/eclipse/plugin.properties,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- plugin.properties 20 Oct 2004 18:23:11 - 1.8 +++ plugin.properties 26 Oct 2004 07:57:06 - 1.9 @@ -26,3 +26,4 @@ maven.eclipse.goals = plugins maven.gen.src=${maven.build.dir}/generated-sources maven.eclipse.src.extension = zip +maven.eclipse.resources.addtoclasspath=false 1.31 +35 -32 maven-plugins/eclipse/src/plugin-resources/templates/classpath.jelly Index: classpath.jelly === RCS file: /home/cvs/maven-plugins/eclipse/src/plugin-resources/templates/classpath.jelly,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- classpath.jelly 22 Oct 2004 05:40:54 - 1.30 +++ classpath.jelly 26 Oct 2004 07:57:06 - 1.31 @@ -59,23 +59,24 @@ /j:if /j:forEach classpathentry kind=src path=${srcDir} excluding=${excluding} / - -j:if test=${!pom.build.resources.isEmpty()} - j:forEach var=resource items=${pom.build.resources} -j:set var=includingAsString value= / -j:forEach var=res items=${resource.includes} - j:set var=includingAsString value=${includingAsString}${res}| / +j:if test=${maven.eclipse.resources.addtoclasspath} + j:if test=${!pom.build.resources.isEmpty()} +j:forEach var=resource items=${pom.build.resources} + j:set var=includingAsString value= / + j:forEach var=res items=${resource.includes} +j:set var=includingAsString value=${includingAsString}${res}| / + /j:forEach + j:set var=excludingAsString value= / + j:forEach var=res items=${resource.excludes} +j:set var=excludingAsString value=${excludingAsString}${res}| / + /j:forEach + maven:makeRelativePath var=resourceDirectory basedir=${basedir} path=${resource.directory} separator=// + !-- don't add duplicate directories -- + j:if test=${!resourceDirectory.equals(srcDir) and (!resourceDirectory.equals(testSrcDir) or !unitTestSourcesPresent)} +classpathentry kind=src path=${resourceDirectory} including=${includingAsString} excluding=${excludingAsString} / + /j:if /j:forEach - j:set var=excludingAsString value= / -j:forEach var=res items=${resource.excludes} - j:set var=excludingAsString value=${excludingAsString}${res}| / -/j:forEach -maven:makeRelativePath var=resourceDirectory basedir=${basedir} path=${resource.directory} separator=// -!-- don't add duplicate directories -- -j:if test=${!resourceDirectory.equals(srcDir) and (!resourceDirectory.equals(testSrcDir) or !unitTestSourcesPresent)} - classpathentry kind=src path=${resourceDirectory} including=${includingAsString} excluding=${excludingAsString} / -/j:if - /j:forEach + /j:if /j:if /j:if @@ -136,24 +137,26 @@ /j:if j:if test=${pom.build.unitTest != null} - j:if test=${!pom.build.unitTest.resources.isEmpty()} -j:forEach var=resource items=${pom.build.unitTest.resources} - j:set var=includingAsString value= / - j:forEach var=res items=${resource.includes} -j:set var=includingAsString value=${includingAsString}${res}| / + j:if test=${maven.eclipse.resources.addtoclasspath} +j:if test=${!pom.build.unitTest.resources.isEmpty()} + j:forEach var=resource items=${pom.build.unitTest.resources} +j:set var=includingAsString value= / +j:forEach var=res items=${resource.includes} + j:set var=includingAsString value=${includingAsString}${res}| / +/j:forEach + j:set var=excludingAsString value= / +j:forEach var=res items=${resource.excludes} + j:set var=excludingAsString value=${excludingAsString}${res}| / +/j:forEach +maven:makeRelativePath var=resourceDirectory basedir=${basedir} path=${resource.directory} separator=// +!-- don't add duplicate directories -- +
cvs commit: maven-plugins/eclipse/xdocs changes.xml properties.xml
epugh 2004/10/19 04:55:28 Modified:eclipse/src/plugin-resources/templates classpath.jelly eclipse/src/plugin-test maven.xml eclipse/xdocs changes.xml properties.xml Log: MPECLIPSE-50 Support for Eclipse-Plugin maven projects (or kind=con classpath) Revision ChangesPath 1.27 +4 -0 maven-plugins/eclipse/src/plugin-resources/templates/classpath.jelly Index: classpath.jelly === RCS file: /home/cvs/maven-plugins/eclipse/src/plugin-resources/templates/classpath.jelly,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- classpath.jelly 15 Oct 2004 18:08:29 - 1.26 +++ classpath.jelly 19 Oct 2004 11:55:28 - 1.27 @@ -92,6 +92,10 @@ ant:echoSetting compile of ${testSrcDir} to ${testOutputDir}/ant:echo classpathentry kind=src path=${testSrcDir} output=${testOutputDir}/ +u:tokenize var=conclasspaths delim=,${maven.eclipse.conclasspath}/u:tokenize +j:forEach var=conclasspath items=${conclasspaths} trim=true + classpathentry kind=con path=${conclasspath}/ +/j:forEach !-- Here are the rules: If the project has maven.eclipse.junit property, add that ver of junit 1.15 +14 -1 maven-plugins/eclipse/src/plugin-test/maven.xml Index: maven.xml === RCS file: /home/cvs/maven-plugins/eclipse/src/plugin-test/maven.xml,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- maven.xml 15 Oct 2004 13:48:11 - 1.14 +++ maven.xml 19 Oct 2004 11:55:28 - 1.15 @@ -20,7 +20,7 @@ xmlns:u=jelly:util xmlns:x=jelly:xml - goal name=testPlugin prereqs=test-eclipse,test-natures,test-builders,test-natures-and-builders,test-classpath-has-generated-source,test-classpath-has-overridden-jar,test-noduplicates + goal name=testPlugin prereqs=test-eclipse,test-natures,test-builders,test-natures-and-builders,test-classpath-has-generated-source,test-classpath-has-overridden-jar,test-noduplicates,test-classpath-con-entry /goal goal name=test-init @@ -141,5 +141,18 @@ x:set var=countUniqueSrc select=count($classpathDoc/classpath/classpathentry[contains(@path,'src/main')])/ assert:assertEquals expected=1 value=${countUniqueSrc.intValue().toString()} msg=Src directory should be added only once/ /goal + + goal name=test-classpath-con-entry + attainGoal name=test-init/ + j:set var=maven.eclipse.conclasspath value=org.eclipse.pde.core.requiredPlugins/ +attainGoal name=eclipse/ + +assert:assertFileExists file=${dotClasspath} / + +u:file var=classpathFile name=${dotClasspath}/ +x:parse var=classpathDoc xml=${classpathFile.toURL()} / +x:set var=countConEntries select=count($classpathDoc/classpath/classpathentry[contains(@kind,'con')])/ +assert:assertEquals expected=2 value=${countConEntries.intValue().toString()} msg=Classpath entry kind='con' should be added twice, once mandatory, other variable/ + /goal /project 1.34 +1 -0 maven-plugins/eclipse/xdocs/changes.xml Index: changes.xml === RCS file: /home/cvs/maven-plugins/eclipse/xdocs/changes.xml,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- changes.xml 15 Oct 2004 09:45:05 - 1.33 +++ changes.xml 19 Oct 2004 11:55:28 - 1.34 @@ -25,6 +25,7 @@ /properties body release version=1.9 date=in cvs + action dev=epugh type=add issue=MPECLIPSE-50 due-to=Simon RinguetteSupport for Eclipse-Plugin maven projects (or kind=con classpath)./action action dev=epugh type=fix issue=MPECLIPSE-49 due-to=Fabrizio Giustinaduplicate build path added if resouce directory is the same as java source dir./action action dev=epugh type=fix issue=MPECLIPSE-48 due-to=Fabrizio GiustinaSimple implementation of handling source artifacts./action action dev=evenisse type=fix issue=MPECLIPSE-47Add resources directories and test resources directories to .classpath./action 1.13 +10 -1 maven-plugins/eclipse/xdocs/properties.xml Index: properties.xml === RCS file: /home/cvs/maven-plugins/eclipse/xdocs/properties.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- properties.xml15 Oct 2004 09:45:05 - 1.12 +++ properties.xml19 Oct 2004 11:55:28 - 1.13 @@ -77,8 +77,17 @@ tdmaven.eclipse.classpath.include/td tdYes/td td -Comma delimited list of additional directories