committing MPECLIPSE-101 - aggregate patch for the following MPECLIPSE issues:

MPECLIPSE-96 classpathentry contains trailing pipe character that confuses Eclipse 3.1
MPECLIPSE-80 Generate .wtpmodules files
MPECLIPSE-78 avoid duplicated builders/natures
MPECLIPSE-63 don't want the hardcoded org.eclipse.jdt.core.javabuilder
MPECLIPSE-92 Setting relative path value to "maven.eclipse.output.dir" generates wrong absolute classpath entry
MPECLIPSE-72 Failing use cases for projects with just resources
MPECLIPSE-57 Make sourcepath more flexible



git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@310226 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
fgiust 2005-10-09 16:50:48 +00:00
parent 4fda1a9e01
commit 888d258c82
27 changed files with 1018 additions and 315 deletions

View File

@ -24,7 +24,8 @@
xmlns:test="test"
xmlns:util="jelly:util"
xmlns:define="jelly:define"
xmlns:maven="jelly:maven">
xmlns:maven="jelly:maven"
>
<define:taglib uri="eclipse">
@ -38,17 +39,41 @@
<j:if test='${relativePathCheck == "X"}'>
<j:set var="relativePath" value="${groupId}/jars/${artifactId}-${version}.jar" />
</j:if>
<!--
should be (m1 repo layout):
${groupId}/java-sources/${artifactId}-${version}-sources.jar
-->
<!-- deprecated: check it first and use it if available, elsewhere set the new path -->
<j:set var="mappedsrc" value="${groupId}/src/${artifactId}-${version}.${maven.eclipse.src.extension}"/>
<util:file var="checkSrcExist" name="${maven.repo.local}/${mappedsrc}" />
<util:file var="srcFile" name="${maven.repo.local}/${mappedsrc}"/>
<j:choose>
<j:when test="${checkSrcExist.exists()}">
<classpathentry kind="var" path="MAVEN_REPO/${relativePath}" sourcepath="MAVEN_REPO/${mappedsrc}" />
<j:when test="${srcFile.exists()}">
<ant:echo>deprecated: java sources for ${artifactId} found at MAVEN_REPO/${mappedsrc}, please use the path MAVEN_REPO/${groupId}/java-sources/${artifactId}-${version}-sources.jar</ant:echo>
</j:when>
<j:otherwise>
<classpathentry kind="var" path="MAVEN_REPO/${relativePath}" />
<j:set var="mappedsrc" value="${groupId}/java-sources/${artifactId}-${version}-sources.jar"/>
<util:file var="srcFile" name="${maven.repo.local}/${mappedsrc}"/>
<j:if test="${!srcFile.exists()}">
<ant:echo>Place java sources for ${artifactId} at ${maven.repo.local}/${mappedsrc} for javadoc and debugging support in Eclipse</ant:echo>
</j:if>
</j:otherwise>
</j:choose>
<j:set var="jdocs" value="${groupId}/javadoc.jars/${artifactId}-${version}.javadoc.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/${relativePath}" sourcepath="MAVEN_REPO/${mappedsrc}">
<!-- javadoc need to be an absolute path in eclipse 3.1, the MAVEN_REPO var will not work
<attributes>
<attribute value="jar:file:/${maven.repo.local}/${jdocs}!/" name="javadoc_location"/>
</attributes>
-->
</classpathentry>
</define:tag>
</define:taglib>
<!--==================================================================-->
@ -57,9 +82,20 @@
<goal name="eclipse"
description="Generate Eclipse project files"
prereqs="eclipse:generate-project">
<j:if test="${sourcesPresent}">
<j:if test="${sourcesPresent or !pom.build.resources.isEmpty()}">
<attainGoal name="eclipse:generate-classpath" />
</j:if>
<!-- jelly trick, you can't use "-1" in comparisons -->
<j:set var="indexnotfound" value="${0-1}" />
<!-- another jelly trick, you can't call methods on variables with a dot -->
<j:set var="mepn" value="${maven.eclipse.projectnatures}x" />
<j:if test="${mepn.indexOf('org.eclipse.wst.common.modulecore.ModuleCoreNature') != indexnotfound}">
<attainGoal name="eclipse:generate-wtpmodules" />
</j:if>
<ant:echo>Now refresh your project in Eclipse (right click on the project and select "Refresh")</ant:echo>
</goal>
@ -67,6 +103,7 @@
description="Generate Eclipse .project file">
<ant:echo>Creating ${basedir}/.project ...</ant:echo>
<j:file name="${basedir}/.project" prettyPrint="true" xmlns="dummy">
<j:import file="${plugin.resources}/templates/project.jelly" inherit="true"/>
</j:file>
@ -88,6 +125,19 @@
</goal>
<!--==================================================================-->
<!-- Generate Eclipse .wtpmodules file -->
<!--==================================================================-->
<goal name="eclipse:generate-wtpmodules"
description="Generate Eclipse .wtpmodules file">
<ant:echo>Creating ${basedir}/.wtpmodules ...</ant:echo>
<j:file name="${basedir}/.wtpmodules" prettyPrint="true" outputMode="xml" xmlns="dummy">
<j:import file="${plugin.resources}/templates/wtpmodules.jelly" inherit="true"/>
</j:file>
</goal>
<!--==================================================================-->
<!-- Generate Eclipse mappings for Maven goals -->
<!--==================================================================-->
@ -262,9 +312,11 @@
description="Clean eclipse generated files">
<j:set var="projectFileName" value="${basedir}/.project"/>
<j:set var="classpathFileName" value="${basedir}/.classpath"/>
<j:set var="wtpmodulesFileName" value="${basedir}/.wtpmodules"/>
<ant:delete file="${projectFileName}"/>
<ant:delete file="${classpathFileName}"/>
<ant:delete file="${wtpmodulesFileName}"/>
<ant:echo>Cleaned up eclipse generated files</ant:echo>
</goal>

View File

@ -27,3 +27,4 @@ maven.eclipse.goals = plugins
maven.gen.src=${maven.build.dir}/generated-sources
maven.eclipse.src.extension = zip
maven.eclipse.resources.addtoclasspath=false
maven.eclipse.servletapilist=servletapi:servletapi,geronimo-spec:geronimo-spec-servlet

View File

@ -28,6 +28,62 @@
<classpath>
<j:if test="${sourcesPresent}">
<maven:makeRelativePath var="srcDir" basedir="${basedir}" path="${pom.build.sourceDirectory}" separator="/"/>
<j:set var="excluding" value=""/>
<j:forEach var="sm" items="${pom.build.sourceModifications}">
<ant:available property="classPresent" classname="${sm.className}"/>
<j:if test="${classPresent != 'true'}">
<j:forEach var="exclude" items="${sm.excludes}">
<j:choose>
<j:when test="${excluding.length() == 0}">
<j:set var="excluding" value="${exclude}"/>
</j:when>
<j:otherwise>
<j:set var="excluding" value="${excluding},${exclude}"/>
</j:otherwise>
</j:choose>
</j:forEach>
</j:if>
</j:forEach>
<classpathentry kind="src" path="${srcDir}" excluding="${excluding}" />
</j:if>
<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:choose>
<j:when test="${includingAsString.length() == 0}">
<j:set var="includingAsString" value="${res}"/>
</j:when>
<j:otherwise>
<j:set var="includingAsString" value="${includingAsString}|${res}"/>
</j:otherwise>
</j:choose>
</j:forEach>
<j:set var="excludingAsString" value="" />
<j:forEach var="res" items="${resource.excludes}">
<j:choose>
<j:when test="${excludingAsString.length() == 0}">
<j:set var="excludingAsString" value="${res}"/>
</j:when>
<j:otherwise>
<j:set var="excludingAsString" value="${excludingAsString}|${res}"/>
</j:otherwise>
</j:choose>
</j:forEach>
<maven:makeRelativePath var="resourceDirectory" basedir="${basedir}" path="${resource.directory}" separator="/"/>
<u:file var="resourceDirectoryFile" name="${resource.directory}"/>
<!-- don't add duplicate directories -->
<j:if test="${resourceDirectoryFile.exists() and !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 test="${unitTestSourcesPresent}">
<ant:echo>Contains JUnit tests</ant:echo>
<maven:makeRelativePath var="testSrcDir" basedir="${basedir}" path="${pom.build.unitTestSourceDirectory}" separator="/"/>
@ -48,7 +104,7 @@
<ant:echo>Setting compile of ${testSrcDir} to ${testOutputDir}</ant:echo>
<classpathentry kind="src" path="${testSrcDir}" output="${testOutputDir}"/>
<u:tokenize var="conclasspaths" delim=",">${maven.eclipse.conclasspath}</u:tokenize>
<u:tokenize var="conclasspaths" delim=",">org.eclipse.jdt.launching.JRE_CONTAINER,${maven.eclipse.conclasspath}</u:tokenize>
<j:forEach var="conclasspath" items="${conclasspaths}" trim="true">
<classpathentry kind="con" path="${conclasspath}"/>
</j:forEach>
@ -80,6 +136,7 @@
<eclipse:write-classpath-entry groupId="junit" artifactId="junit" version="${depVersion}" relativePath="" />
<j:set var="ignoreJUnit" value="true" />
</j:if>
</j:if>
<j:if test="${pom.build.unitTest != null}">
<j:if test="${maven.eclipse.resources.addtoclasspath}">
@ -87,22 +144,28 @@
<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="${includingAsString.length() &gt; 0}">
<j:set var="includingAsString" value="${includingAsString}|" />
</j:if>
<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:if test="${excludingAsString.length() &gt; 0}">
<j:set var="excludingAsString" value="${excludingAsString}|" />
</j:if>
<j:set var="excludingAsString" value="${excludingAsString}${res}" />
</j:forEach>
<maven:makeRelativePath var="resourceDirectory" basedir="${basedir}" path="${resource.directory}" separator="/"/>
<u:file var="resourceDirectoryFile" name="${resource.directory}"/>
<!-- don't add duplicate directories -->
<j:if test="${!resourceDirectory.equals(testSrcDir) and (!resourceDirectory.equals(srcDir) or !sourcesPresent)}">
<j:if test="${resourceDirectoryFile.exists() and !resourceDirectory.equals(testSrcDir) and (!resourceDirectory.equals(srcDir) or !sourcesPresent)}">
<classpathentry kind="src" path="${resourceDirectory}" output="${testOutputDir}" including="${includingAsString}" excluding="${excludingAsString}"/>
</j:if>
</j:forEach>
</j:if>
</j:if>
</j:if>
</j:if>
<!-- Add any generated source directories as seperate src directories -->
<u:available file="${maven.gen.src}">
@ -113,46 +176,6 @@
</j:forEach>
</u:available>
<j:if test="${sourcesPresent}">
<maven:makeRelativePath var="srcDir" basedir="${basedir}" path="${pom.build.sourceDirectory}" separator="/"/>
<j:set var="excluding" value=""/>
<j:forEach var="sm" items="${pom.build.sourceModifications}">
<ant:available property="classPresent" classname="${sm.className}"/>
<j:if test="${classPresent != 'true'}">
<j:forEach var="exclude" items="${sm.excludes}">
<j:choose>
<j:when test="${excluding.length() == 0}">
<j:set var="excluding" value="${exclude}"/>
</j:when>
<j:otherwise>
<j:set var="excluding" value="${excluding},${exclude}"/>
</j:otherwise>
</j:choose>
</j:forEach>
</j:if>
</j:forEach>
<classpathentry kind="src" path="${srcDir}" excluding="${excluding}" />
<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:if>
</j:if>
</j:if>
<!-- Add the list of additional directories for the classpath from ${maven.eclipse.classpath.include}-->
<u:tokenize var="maven.eclipse.classpath.include.split" delim=",">${maven.eclipse.classpath.include}</u:tokenize>
@ -179,10 +202,6 @@
<j:set var="ignoreCactus" value="true" />
</j:if>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<j:forEach var="lib" items="${pom.artifacts}">
<j:set var="eclipseDependency"
value="${lib.dependency.getProperty('eclipse.dependency')}"/>
@ -224,8 +243,8 @@
<j:set var="outputDir" value="${maven.eclipse.output.dir}"/>
<j:if test="${empty outputDir}">
<j:set var="outputDir" value="${maven.build.dest}"/>
</j:if>
<maven:makeRelativePath var="outputDir" basedir="${basedir}" path="${outputDir}" separator="/"/>
</j:if>
<classpathentry kind="output" path="${outputDir}"/>
<ant:echo>Setting default output directory to ${outputDir}</ant:echo>
</classpath>

View File

@ -23,37 +23,51 @@
xmlns:ant="jelly:ant"
xmlns="dummy"
trim="true">
<projectDescription>
<j:set var="fullprojectnatures" value="${maven.eclipse.projectnatures}" />
<j:set var="fullbuildcommands" value="${maven.eclipse.buildcommands}" />
<!-- add java nature/builder only if sources are present. Avoid duplicates -->
<!-- jelly trick, you can't use "-1" in comparisons -->
<j:set var="indexnotfound" value="${0-1}" />
<!-- another jelly trick, you can't call methods on variables with a dot -->
<j:set var="mepn" value="${maven.eclipse.projectnatures}x" />
<j:set var="mebc" value="${maven.eclipse.buildcommands}x" />
<j:if test="${sourcesPresent or !pom.build.resources.isEmpty()}">
<j:if test="${mepn.indexOf('org.eclipse.jdt.core.javanature') == indexnotfound}">
<j:set var="fullprojectnatures" value="org.eclipse.jdt.core.javanature,${maven.eclipse.projectnatures}" />
</j:if>
<j:if test="${mebc.indexOf('org.eclipse.jdt.core.javabuilder') == indexnotfound}">
<j:set var="fullbuildcommands" value="org.eclipse.jdt.core.javabuilder,${maven.eclipse.buildcommands}" />
</j:if>
</j:if>
<name>${pom.artifactId}</name>
<comment>${pom.description}</comment>
<projects>
<j:forEach var="lib" items="${pom.artifacts}">
<j:set var="eclipseDependency"
value="${lib.dependency.getProperty('eclipse.dependency')}"/>
<j:set var="eclipseDependency" value="${lib.dependency.getProperty('eclipse.dependency')}"/>
<j:if test="${eclipseDependency == 'true'}">
<project>${lib.dependency.artifactId}</project>
</j:if>
</j:forEach>
</projects>
<j:if test="${sourcesPresent}">
<j:if test="${sourcesPresent or !pom.build.resources.isEmpty()}">
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<util:tokenize var="commands" delim=",">${maven.eclipse.buildcommands}</util:tokenize>
<util:tokenize var="commands" delim=",">${fullbuildcommands}</util:tokenize>
<j:forEach var="command" items="${commands}" trim="true">
<buildCommand>
<name>${command}</name>
<arguments/>
<arguments></arguments>
</buildCommand>
</j:forEach>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<util:tokenize var="natures" delim=",">${maven.eclipse.projectnatures}</util:tokenize>
<util:tokenize var="natures" delim=",">${fullprojectnatures}</util:tokenize>
<j:forEach var="nature" items="${natures}" trim="true">
<nature>${nature}</nature>
</j:forEach>

View File

@ -0,0 +1,130 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
/*
* Copyright 2001-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<j:whitespace xmlns:j="jelly:core" xmlns:maven="jelly:maven" xmlns:u="jelly:util" xmlns:eclipse="eclipse" xmlns="dummy" trim="true">
<project-modules id="moduleCoreId">
<j:set var="deployDir" value="/" />
<j:set var="moduletype" value="jst.utility" />
<j:set var="deployname" value="${pom.artifactId}" />
<j:set var="mmpt" value="${maven.multiproject.type}" trim="true" />
<j:choose>
<j:when test="${mmpt == 'war'}">
<!-- war -->
<j:set var="moduletype" value="jst.web" />
<j:set var="deployDir" value="/WEB-INF/classes" />
</j:when>
</j:choose>
<wb-module deploy-name="${deployname}">
<j:choose>
<j:when test="${moduletype == 'jst.web'}">
<!-- war -->
<maven:get var="warPath" plugin='maven-war-plugin' property='maven.war.src' />
<maven:makeRelativePath var="relWarPath" basedir="${basedir}" path="${warPath}" separator="/" />
<module-type module-type-id="jst.web">
<version>
<!-- try to detect servlet dependency, maven.eclipse.servletapilist can hold different names -->
<j:set var="moduleversion" value="x" />
<u:tokenize var="servletapilist" delim=",">${maven.eclipse.servletapilist}</u:tokenize>
<j:forEach var="servletapi" items="${servletapilist}" trim="true">
<j:if test="${pom.getDependency(servletapi) != null}">
<j:set var="moduleversion" value="${pom.getDependency(servletapi).getVersion()}" />
</j:if>
</j:forEach>
<!-- defaults to 2.2 -->
<j:choose>
<j:when test="${moduleversion.startsWith('2.4')}">2.4</j:when>
<j:when test="${moduleversion.startsWith('2.3')}">2.3</j:when>
<j:otherwise>2.2</j:otherwise>
</j:choose>
</version>
<property name="context-root" value="${pom.artifactId}" />
</module-type>
<wb-resource deploy-path="/" source-path="/${relWarPath}" />
</j:when>
<j:otherwise>
<!-- jar -->
<module-type module-type-id="jst.utility" />
</j:otherwise>
</j:choose>
<j:set var="srcDir" value="" />
<!-- main src dir -->
<j:if test="${sourcesPresent}">
<maven:makeRelativePath var="srcDir" basedir="${basedir}" path="${pom.build.sourceDirectory}" separator="/" />
<wb-resource deploy-path="${deployDir}" source-path="/${srcDir}" />
</j:if>
<!-- resources -->
<j:if test="${maven.eclipse.resources.addtoclasspath}">
<j:if test="${!pom.build.resources.isEmpty()}">
<j:forEach var="resource" items="${pom.build.resources}">
<maven:makeRelativePath var="resourceDirectory" basedir="${basedir}" path="${resource.directory}" separator="/" />
<!-- don't add duplicate directories -->
<j:if test="${!resourceDirectory.equals(srcDir)}">
<wb-resource deploy-path="${deployDir}" source-path="/${resourceDirectory}" />
</j:if>
</j:forEach>
</j:if>
</j:if>
<!-- generated source directories -->
<u:available file="${maven.gen.src}">
<u:file var="genSrcRootDir" name="${maven.gen.src}" />
<j:forEach var="genSrcDir" items="${genSrcRootDir.listFiles()}">
<maven:makeRelativePath var="srcDir" basedir="${basedir}" path="${genSrcDir}" separator="/" />
<wb-resource deploy-path="${deployDir}" source-path="/${srcDir}" />
</j:forEach>
</u:available>
<j:if test="${moduletype == 'jst.web'}">
<j:forEach var="lib" items="${pom.artifacts}">
<j:set var="eclipseDependency" value="${lib.dependency.getProperty('eclipse.dependency')}" />
<j:choose>
<j:when test="${eclipseDependency == 'true'}">
<dependent-module deploy-path="/WEB-INF/lib"
handle="module:/resource/${lib.dependency.artifactId}/${lib.dependency.artifactId}">
<dependency-type>uses</dependency-type>
</dependent-module>
</j:when>
<j:otherwise>
<!-- make sure it's a webapp library -->
<j:if test="${lib.dependency.getProperty('war.bundle')=='true'}">
<maven:makeRelativePath var="relativePath" basedir="${maven.repo.local}" path="${lib.path}" separator="/" />
<u:file var="checkExist" name="${maven.repo.local}/${relativePath}" />
<j:choose>
<j:when test="${checkExist.exists()}">
<j:set var="relativePathCheck" value="${relativePath}X" />
<j:if test='${relativePathCheck == "X"}'>
<j:set var="relativePath"
value="${lib.dependency.groupId}/jars/${lib.dependency.artifactId}-${lib.dependency.version}.jar" />
</j:if>
<dependent-module deploy-path="/WEB-INF/lib"
handle="module:/classpath/var/MAVEN_REPO/${relativePath}">
<dependency-type>uses</dependency-type>
</dependent-module>
</j:when>
<j:otherwise>
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/${lib.path}">
<dependency-type>uses</dependency-type>
</dependent-module>
</j:otherwise>
</j:choose>
</j:if>
</j:otherwise>
</j:choose>
</j:forEach>
</j:if>
</wb-module>
</project-modules>
</j:whitespace>

View File

@ -0,0 +1,66 @@
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<project xmlns:j="jelly:core"
xmlns:assert="assert"
xmlns:u="jelly:util"
xmlns:maven="jelly:maven"
xmlns:x="jelly:xml">
<goal name="testPlugin" prereqs="test-duplicatednatures,test-duplicatedbuilders">
</goal>
<goal name="test-init">
<j:set var="dotProject" value="${basedir}/.project"/>
<j:set var="dotClasspath" value="${basedir}/.classpath"/>
<attainGoal name="eclipse:clean"/>
<attainGoal name="eclipse"/>
<assert:assertFileExists file="${dotProject}" />
<assert:assertFileExists file="${dotClasspath}" />
</goal>
<goal name="test-duplicatednatures" prereqs="test-init">
<u:file var="projectFile" name="${dotProject}"/>
<x:parse var="projectDoc" xml="${projectFile.toURL()}" />
<x:set var="natures" select="$projectDoc/projectDescription/natures/nature"/>
<assert:assertEquals expected="${3}" value="${size(natures)}" msg="Wrong number of natures generated"/>
<assert:assertEquals expected="org.eclipse.jst.j2ee.web.WebNature" value="${natures[0].text}" msg="Nature 0 is not what expected"/>
<assert:assertEquals expected="org.eclipse.jdt.core.javanature" value="${natures[1].text}" msg="Nature 1 is not what expected"/>
<assert:assertEquals expected="org.eclipse.wst.common.modulecore.ModuleCoreNature" value="${natures[2].text}" msg="Nature 2 is not what expected"/>
</goal>
<goal name="test-duplicatedbuilders" prereqs="test-init">
<u:file var="projectFile" name="${dotProject}"/>
<x:parse var="projectDoc" xml="${projectFile.toURL()}" />
<x:set var="builders" select="$projectDoc/projectDescription/buildSpec/buildCommand/name"/>
<assert:assertEquals expected="${3}" value="${size(builders)}" msg="Wrong number of builders generated"/>
<assert:assertEquals expected="org.eclipse.wst.common.modulecore.ComponentStructuralBuilder" value="${builders[0].text}" msg="Builder 0 is not what expected"/>
<assert:assertEquals expected="org.eclipse.jdt.core.javabuilder" value="${builders[1].text}" msg="Builder 0 is not what expected"/>
<assert:assertEquals expected="org.eclipse.jst.j2ee.web.LibDirBuilder" value="${builders[2].text}" msg="Builder 0 is not what expected"/>
</goal>
</project>

View File

@ -0,0 +1,3 @@
maven.eclipse.resources.addtoclasspath=true
maven.eclipse.projectnatures=org.eclipse.jst.j2ee.web.WebNature,org.eclipse.jdt.core.javanature,org.eclipse.wst.common.modulecore.ModuleCoreNature
maven.eclipse.buildcommands=org.eclipse.wst.common.modulecore.ComponentStructuralBuilder,org.eclipse.jdt.core.javabuilder,org.eclipse.jst.j2ee.web.LibDirBuilder

View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<project>
<pomVersion>3</pomVersion>
<extend>${basedir}/../project.xml</extend>
<id>test-maven-eclipse-duplicatebuilderstest-plugin</id>
<name>Test project for Maven Eclipse Plugin (duplicate builders)</name>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
</dependency>
<dependency>
<groupId>cactus</groupId>
<artifactId>cactus</artifactId>
<version>13-1.6.1</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main</sourceDirectory>
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
<unitTest>
<includes>
<include>**/TestAll.java</include>
</includes>
<resources>
<resource>
<directory>src/test-resources</directory>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main</directory>
</resource>
</resources>
</unitTest>
<resources>
<resource>
<directory>src/main</directory>
</resource>
<resource>
<directory>src/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/test</directory>
</resource>
</resources>
</build>
</project>

View File

@ -0,0 +1 @@
needed for plugin test

View File

@ -0,0 +1,86 @@
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<project xmlns:j="jelly:core"
xmlns:assert="assert"
xmlns:ant="jelly:ant"
xmlns:u="jelly:util"
xmlns:maven="jelly:maven"
xmlns:x="jelly:xml">
<goal name="testPlugin" prereqs="test-default, test-classpath, test-project">
</goal>
<goal name="test-init">
<j:set var="dotProject" value="${basedir}/.project"/>
<j:set var="dotClasspath" value="${basedir}/.classpath"/>
<attainGoal name="eclipse:clean"/>
</goal>
<goal name="test-default">
<attainGoal name="test-init"/>
<j:set var="maven.eclipse.resources.addtoclasspath" value="true"/>
<attainGoal name="eclipse"/>
<assert:assertFileExists file="${dotClasspath}" />
<assert:assertFileExists file="${dotProject}" />
</goal>
<goal name="test-classpath">
<attainGoal name="test-init"/>
<j:set var="maven.eclipse.resources.addtoclasspath" value="true"/>
<attainGoal name="eclipse:generate-classpath"/>
<assert:assertFileExists file="${dotClasspath}" />
<u:file var="classpathFile" name="${dotClasspath}"/>
<x:parse var="classpathDoc" xml="${classpathFile.toURL()}" />
<x:set var="countResources" select="count($classpathDoc/classpath/classpathentry[contains(@path,'src/main/resources')])"/>
<assert:assertEquals expected="1" value="${countResources.intValue().toString()}" msg="resources entry not found"/>
<x:set var="countNoresources" select="count($classpathDoc/classpath/classpathentry[contains(@path,'src/main/noresources')])"/>
<assert:assertEquals expected="0" value="${countNoresources.intValue().toString()}" msg="noresources entry found"/>
<x:set var="countSources" select="count($classpathDoc/classpath/classpathentry[contains(@path,'src/main/java')])"/>
<assert:assertEquals expected="0" value="${countSources.intValue().toString()}" msg="sources entry found"/>
</goal>
<goal name="test-project">
<attainGoal name="test-init"/>
<j:set var="maven.eclipse.resources.addtoclasspath" value="true"/>
<attainGoal name="eclipse:generate-project"/>
<assert:assertFileExists file="${dotProject}" />
<u:file var="projectFile" name="${dotProject}"/>
<x:parse var="projectDoc" xml="${projectFile.toURL()}" />
<x:set var="natures" select="$projectDoc/projectDescription/natures/nature"/>
<x:set var="countNatures" select="count($natures)"/>
<assert:assertEquals expected="1" value="${countNatures.intValue().toString()}" msg="expected 1 nature"/>
<assert:assertEquals expected="org.eclipse.jdt.core.javanature" value="${natures[0].text}" msg="expected the nature to be the java one"/>
<x:set var="builders" select="$projectDoc/projectDescription/buildSpec/buildCommand/name"/>
<x:set var="countBuilders" select="count($builders)"/>
<assert:assertEquals expected="1" value="${countBuilders.intValue().toString()}" msg="expected 1 builder"/>
<assert:assertEquals expected="org.eclipse.jdt.core.javabuilder" value="${builders[0].text}" msg="expected the builder to be the java one"/>
</goal>
</project>

View File

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<project>
<pomVersion>3</pomVersion>
<extend>${basedir}/../project.xml</extend>
<id>test-maven-eclipse-nosourcetest-plugin</id>
<name>Test project for Maven Eclipse Plugin (resources only)</name>
<dependencies>
<dependency>
<id>maven</id>
<version>beta-8</version>
<jar>maven.jar</jar>
</dependency>
<dependency>
<groupId>commons-jelly</groupId>
<artifactId>commons-jelly-tags-xml</artifactId>
<version>20030211.142705</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<unitTestSourceDirectory>src/test/java</unitTestSourceDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/noresources</directory>
<includes>
<include>**/*.properties</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>
</project>

View File

@ -0,0 +1 @@
avalue=somevalue

View File

@ -21,7 +21,7 @@
xmlns:maven="jelly:maven"
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,test-classpath-con-entry,test-classpath-no-resources">
<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,test-classpath-no-resources,MPECLIPSE-96,MPECLIPSE-92">
</goal>
<goal name="test-init">
@ -187,4 +187,36 @@
<assert:assertEquals expected="0" value="${count.intValue().toString()}" msg="The src/test-resources dir should not be imported"/>
</goal>
<goal name="MPECLIPSE-96">
<attainGoal name="test-init"/>
<j:set var="maven.eclipse.resources.addtoclasspath" value="true"/>
<attainGoal name="eclipse"/>
<assert:assertFileExists file="${dotClasspath}" />
<u:file var="classpathFile" name="${dotClasspath}"/>
<x:parse var="classpathDoc" xml="${classpathFile.toURL()}" />
<x:set var="including" select="$classpathDoc/classpath/classpathentry[contains(@path,'src/resources')]/@including"/>
<x:set var="excluding" select="$classpathDoc/classpath/classpathentry[contains(@path,'src/resources')]/@excluding"/>
<assert:assertEquals expected="**/*.properties|**/*.xml" value="${including[0].value}" msg="Including is not set correctly"/>
<assert:assertEquals expected="**/*.log|**/*.txt" value="${excluding[0].value}" msg="Excluding is not set correctly"/>
</goal>
<goal name="MPECLIPSE-92">
<attainGoal name="test-init"/>
<j:set var="maven.eclipse.output.dir" value="web-content/WEB-INF/classes"/>
<attainGoal name="eclipse"/>
<assert:assertFileExists file="${dotClasspath}" />
<u:file var="classpathFile" name="${dotClasspath}"/>
<x:parse var="classpathDoc" xml="${classpathFile.toURL()}" />
<x:set var="path" select="$classpathDoc/classpath/classpathentry[@kind = 'output']/@path"/>
<assert:assertEquals expected="web-content/WEB-INF/classes" value="${path[0].value}" msg="Output path not set correctly"/>
</goal>
</project>

View File

@ -21,7 +21,7 @@
<project>
<pomVersion>3</pomVersion>
<extend>${basedir}/../project.xml</extend>
<id>test-maven-eclipse-maintest-plugin</id>
<id>test-maven-eclipse-maintest-plugin (main)</id>
<name>Test project for Maven Eclipse Plugin</name>
<dependencies>
@ -34,7 +34,7 @@
</dependency>
<dependency>
<id>maven</id>
<version>beta-8</version>
<version>1.0.2</version>
<jar>maven.jar</jar>
</dependency>
<dependency>
@ -80,6 +80,10 @@
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<excludes>
<exclude>**/*.log</exclude>
<exclude>**/*.txt</exclude>
</excludes>
<filtering>false</filtering>
</resource>
<resource>

View File

@ -0,0 +1 @@
needed for plugin test

View File

@ -0,0 +1 @@
needed for plugin test

View File

@ -51,9 +51,10 @@
<u:file var="projectFile" name="${dotProject}"/>
<x:parse var="projectDoc" xml="${projectFile.toURL()}" />
<x:set var="natures" select="$projectDoc/projectDescription/natures/nature"/>
<x:set var="countNatures" select="count($projectDoc/projectDescription/natures/nature)"/>
<x:set var="countBuilder" select="count($projectDoc/projectDescription/buildSpec/buildCommand/name)"/>
<assert:assertEquals expected="0" value="${countBuilder.intValue().toString()}" msg="Shouldn't find any builders."/>
<assert:assertEquals expected="${0}" value="${countBuilder.intValue()}" msg="Shouldn't find any builders."/>
<assert:assertEquals expected="${0}" value="${countNatures.intValue()}" msg="Shouldn't find any natures."/>
</goal>

View File

@ -22,19 +22,9 @@
<pomVersion>3</pomVersion>
<extend>${basedir}/../project.xml</extend>
<id>test-maven-eclipse-nosourcetest-plugin</id>
<name>Test project for Maven Eclipse Plugin</name>
<name>Test project for Maven Eclipse Plugin (nosource)</name>
<dependencies>
<dependency>
<id>maven</id>
<version>beta-8</version>
<jar>maven.jar</jar>
</dependency>
<dependency>
<groupId>commons-jelly</groupId>
<artifactId>commons-jelly-tags-xml</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>

View File

@ -0,0 +1,59 @@
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<project xmlns:j="jelly:core"
xmlns:assert="assert"
xmlns:u="jelly:util"
xmlns:maven="jelly:maven"
xmlns:x="jelly:xml"
xmlns:ant="jelly:ant">
<goal name="testPlugin" prereqs="test-defaultgoal,test-wtpmodules,test-nowtpmodules">
</goal>
<goal name="test-init">
<j:set var="dotWtpmodules" value="${basedir}/.wtpmodules"/>
<attainGoal name="eclipse:clean"/>
</goal>
<goal name="test-defaultgoal">
<attainGoal name="test-init"/>
<attainGoal name="eclipse"/>
</goal>
<goal name="test-nowtpmodules">
<attainGoal name="test-init"/>
<j:set var="maven.eclipse.projectnatures" value="" />
<attainGoal name="eclipse" />
<u:available file="${dotWtpmodules}">
<ant:fail>The .wtpmodules file was created, and shouldn't have been.</ant:fail>
</u:available>
</goal>
<goal name="test-wtpmodules">
<attainGoal name="test-init"/>
<attainGoal name="eclipse"/>
<assert:assertFileExists file="${dotWtpmodules}" />
<u:file var="wtpmodulesFile" name="${dotWtpmodules}"/>
<x:parse var="wtpmodulesDoc" xml="${wtpmodulesFile.toURL()}" />
</goal>
</project>

View File

@ -0,0 +1,6 @@
maven.eclipse.resources.addtoclasspath=true
maven.multiproject.type=war
maven.eclipse.projectnatures=org.eclipse.jdt.core.javanature,org.eclipse.wst.common.modulecore.ModuleCoreNature
maven.eclipse.buildcommands=org.eclipse.wst.common.modulecore.ComponentStructuralBuilder,org.eclipse.jdt.core.javabuilder,org.eclipse.wst.common.modulecore.ComponentStructuralBuilderDependencyResolver
maven.eclipse.conclasspath=org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v5.5,org.eclipse.jst.j2ee.internal.web.container/wtptest

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<project>
<pomVersion>3</pomVersion>
<extend>${basedir}/../project.xml</extend>
<id>test-maven-eclipse-wtptest-plugin</id>
<name>Test project for Maven Eclipse Plugin (wtp)</name>
<dependencies>
<dependency>
<groupId>geronimo-spec</groupId>
<artifactId>geronimo-spec-servlet</artifactId>
<version>2.4-rc4</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main</sourceDirectory>
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
<unitTest>
<includes>
<include>**/TestAll.java</include>
</includes>
<resources>
<resource>
<directory>src/test-resources</directory>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main</directory>
</resource>
</resources>
</unitTest>
<resources>
<resource>
<directory>src/main</directory>
</resource>
<resource>
<directory>src/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>
</project>

View File

@ -0,0 +1 @@
needed for plugin test

View File

@ -0,0 +1 @@
needed for plugin test

View File

@ -24,12 +24,26 @@
<author email="dion@multitask.com.au">dIon Gillard</author>
</properties>
<body>
<release version="1.10" date="IN CVS">
<release version="1.10" date="IN SVN">
<action dev="carlos" type="fix">Moved test classpath before main so test classpath resources override main ones</action>
<action dev="epugh" type="fix" issue="MPECLIPSE-68">eclipse:add-maven-repo doesn't update correct Eclipse property file for Eclipse 3.x</action>
<action dev="epugh" type="fix" issue="MPECLIPSE-67">add-maven-repo fails if Eclipse hasn't been started yet. Property file needs to be created
by the plugin.</action>
by the plugin.
</action>
<action dev="epugh" type="fix" issue="MPECLIPSE-56" due-to="Archimedes Trajano">Only create .classpath and javabuilder if sources are present</action>
<action dev="fgiust" type="fix" issue="MPECLIPSE-78" due-to="Fabrizio Giustina">Don't add duplicate java natures/builders if already specified using
<code>maven.eclipse.projectnatures</code> and <code>maven.eclipse.buildcommands</code>
</action>
<action dev="fgiust" type="fix" issue="MPECLIPSE-63" due-to="Fabrizio Giustina">Only add javanature if sources are present</action>
<action dev="fgiust" type="add" issue="MPECLIPSE-80" due-to="Fabrizio Giustina">Generates a .wtpmodules file for eclipse webtools (wtp 0.7 required)</action>
<action dev="fgiust" type="fix" issue="MPECLIPSE-96" due-to="Fabrizio Giustina">classpathentry contains trailing pipe character that confuses Eclipse 3.1</action>
<action dev="fgiust" type="update" due-to="Fabrizio Giustina">Java source location now defaults to
<code>MAVEN_REPO${groupId}/java-sources/${artifactId}-${version}-sources.jar</code> (standard location where source artifacts are deployed by the m2 source plugin in
a legacy/m1 repository layout). The path <code>${groupId}/src/${artifactId}-${version}.${maven.eclipse.src.extension}</code> is still supported for backward compatibility
and it will be used only if a file already exists at that location.
</action>
<action dev="fgiust" type="fix" issue="MPECLIPSE-92" due-to="Yang Li">Setting relative path value to "maven.eclipse.output.dir" generates wrong absolute classpath entry</action>
<action dev="fgiust" type="fix" issue="MPECLIPSE-72" due-to="Kristopher Brown">Failing use cases for projects with just resources</action>
</release>
<release version="1.9" date="2004-10-30">
<action dev="epugh" type="fix" issue="MPECLIPSE-53">Add property
@ -78,7 +92,7 @@
<release version="1.3" date="Unknown">
<action dev="michal" type="add">Smarter generation of .classpath file. ${basedir} prefix is cut off if present in any path. Default Maven location of source and destination folder are used.</action>
<action dev="evenisse" type="add">Added dependency functionality between projects</action>
<action dev="bwalding" type="update">Split eclispe goal in two goals : eclipse:generate-project and eclipse:generate-classpath</action>
<action dev="bwalding" type="update">Split eclipse goal in two goals : eclipse:generate-project and eclipse:generate-classpath</action>
</release>
<release version="1.2" date="Unknown">
<action dev="dion" type="add">Added more documentation</action>

View File

@ -32,13 +32,15 @@
The default goal. This goal simply executes the
<a href="#eclipse:generate-project">eclipse:generate-project</a> and
<a href="#eclipse:generate-classpath">eclipse:generate-classpath</a> goals.
If the <code>maven.multiproject.type</code> is set to <code>war</code> also calls the
<a href="#eclipse:generate-wtpmodules">eclipse:generate-wtpmodules</a> goal.
</description>
</goal>
<goal>
<name>eclipse:clean</name>
<description>
Deletes the <code>.project</code> and <code>.classpath</code> files.
Deletes the <code>.project</code>, <code>.classpath</code> and <code>.wtpmodules</code> files.
</description>
</goal>
@ -69,6 +71,14 @@
</description>
</goal>
<goal>
<name>eclipse:generate-wtpmodules</name>
<description>
Generates a <code>.wtpmodules</code> file for eclipse wtp marking the project as a j2ee module.
Project with the <code>maven.multiproject.type</code> set to <code>war</code> are configured as web modules.
</description>
</goal>
<goal>
<name>eclipse:external-tools</name>
<description>

View File

@ -75,17 +75,14 @@
with debugging.
</p>
<p>
The plugin will check if the file specified is located in <code>MAVEN_REPO/${groupId}/src/</code> directory
and ending in <code>maven.eclipse.src.extension</code> exists and will add it as a source attachment.
Using default values the dependency <code>MAVEN_REPO/eclipse/<em>jars</em>/eclipse-ui-3.0.0.<em>jar</em></code>
will be mapped to <code>MAVEN_REPO/eclipse/<em>src</em>/eclipse-ui-3.0.0.<em>zip</em></code>
The plugin will check if the file located at <code>MAVEN_REPO${groupId}/java-sources/${artifactId}-${version}-sources.jar</code>
exists and will add it as a source attachment.
As an example, the source archive for the dependency <code>MAVEN_REPO/eclipse/<em>jars</em>/eclipse-ui-3.0.0<em>.jar</em></code>
will be mapped to <code>MAVEN_REPO/eclipse/<em>java-sources</em>/eclipse-ui-3.0.0<em>-sources.jar</em></code>
</p>
<p>
While this implementation isn't the perfect solution, for example no downloading of
source .zip files, it is a minimal solution that will work now. Future versions
of Maven will have more sophisticated solutions for dealing with source code. There is
no guarantee that this implementation will remain in later versions of Maven and this
plugin.
For backward compatibility the plugin still accepts source archives located at
<code>MAVEN_REPO/${groupId}/src/${artifactId}-${version}.${maven.eclipse.src.extension}</code>.
</p>
</subsection>
<subsection name="Generated Source Code">

View File

@ -103,7 +103,8 @@
<td>Yes</td>
<td>
Comma delimited list of additional build commands
to include in the project description file.
to include in the project description file. The java builder will automatically be added if a java source
dir is set (if not already specified in the list).
</td>
</tr>
<tr>
@ -112,7 +113,7 @@
<td>
Comma delimited list of additional project natures
to include in the project description file. These natures
will be added after the java nature.
will be added after the java nature (if the java nature is not already specified in the list).
</td>
</tr>
<tr>
@ -130,6 +131,8 @@
<td>Yes (default=<code>zip</code>)</td>
<td>
The extension used for source attachments.
Deprecated, source attachment are expected now at
<code>MAVEN_REPO${groupId}/java-sources/${artifactId}-${version}-sources.jar</code>
</td>
</tr>
</table>