Hi Fabrizio, Can you update the changes file and the goals documentation please ?
Arnaud > -----Message d'origine----- > De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Envoyé : samedi 5 novembre 2005 19:44 > À : commits@maven.apache.org > Objet : svn commit: r331014 - > /maven/maven-1/plugins/trunk/eclipse/plugin.jelly > > Author: fgiust > Date: Sat Nov 5 10:44:25 2005 > New Revision: 331014 > > URL: http://svn.apache.org/viewcvs?rev=331014&view=rev > Log: > adding an "eclipse:eclipse" alias for the "eclipse" goal > (same name as mvn). > > Reformatting the whole file - sorry for all these > modifications in the diff but the formatting was wrong and > manually adjusted, now the file can be formatted automatically > > Modified: > maven/maven-1/plugins/trunk/eclipse/plugin.jelly > > Modified: maven/maven-1/plugins/trunk/eclipse/plugin.jelly > URL: > http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/ecli > pse/plugin.jelly?rev=331014&r1=331013&r2=331014&view=diff > ============================================================== > ================ > --- maven/maven-1/plugins/trunk/eclipse/plugin.jelly (original) > +++ maven/maven-1/plugins/trunk/eclipse/plugin.jelly Sat Nov > 5 10:44:25 > +++ 2005 > @@ -1,183 +1,158 @@ > <?xml version="1.0"?> > <!-- > -/* > - * 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:ant="jelly:ant" > - xmlns:test="test" > - xmlns:util="jelly:util" > - xmlns:define="jelly:define" > - xmlns:maven="jelly:maven" > - > > - > + /* > + * 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. > + */ > +--> > +<project xmlns:j="jelly:core" xmlns:ant="jelly:ant" > xmlns:test="test" xmlns:util="jelly:util" > + xmlns:define="jelly:define" xmlns:maven="jelly:maven"> > > <define:taglib uri="eclipse"> > <define:tag name="write-classpath-entry"> > - <maven:param-check value="${groupId}" fail="true" > message="'groupId' must be specified"/> > - <maven:param-check value="${artifactId}" fail="true" > message="'artifactId' must be specified"/> > - <maven:param-check value="${version}" fail="false" > message="'version' should be specified for artifact > ${groupId}.${artifactId}"/> > + <maven:param-check value="${groupId}" fail="true" > message="'groupId' must be specified" /> > + <maven:param-check value="${artifactId}" fail="true" > message="'artifactId' must be specified" /> > + <maven:param-check value="${version}" fail="false" > + message="'version' should be specified for artifact > + ${groupId}.${artifactId}" /> > <!-- relativePath is optional, used for jar override --> > - > <j:set var="relativePathCheck" value="${relativePath}X" /> > <j:if test='${relativePathCheck == "X"}'> > - <j:set var="relativePath" > value="${groupId}/jars/${artifactId}-${version}.jar" /> > + <j:set var="relativePath" > + value="${groupId}/jars/${artifactId}-${version}.jar" /> > </j:if> > - > <!-- > - should be (m1 repo layout): > - > ${groupId}/java-sources/${artifactId}-${version}-sources.jar > - --> > + 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="srcFile" > name="${maven.repo.local}/${mappedsrc}"/> > + <j:set var="mappedsrc" > value="${groupId}/src/${artifactId}-${version}.${maven.eclipse .src.extension}" /> > + <util:file var="srcFile" > name="${maven.repo.local}/${mappedsrc}" > + /> > <j:choose> > <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}-so urces.jar</ant:echo> > + <j:set var="msg" trim="true"> > + <![CDATA[ > + deprecated: java sources for ${artifactId} found > at MAVEN_REPO/${mappedsrc}, > + please use the path > MAVEN_REPO/${groupId}/java-sources/${artifactId}-${version}-so urces.jar > + ]]> > + </j:set> > + <ant:echo>${msg}</ant:echo> > </j:when> > <j:otherwise> > - <j:set var="mappedsrc" > value="${groupId}/java-sources/${artifactId}-${version}-sources.jar"/> > - <util:file var="srcFile" > name="${maven.repo.local}/${mappedsrc}"/> > + <j:set var="mappedsrc" > value="${groupId}/java-sources/${artifactId}-${version}-source s.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:set var="msg" trim="true"> > + Place java sources for ${artifactId} at > ${srcFile} for javadoc and debugging support in Eclipse > + </j:set> > + <ant:echo>${msg}</ant:echo> > </j:if> > </j:otherwise> > </j:choose> > - > - > - <j:set var="jdocs" > value="${groupId}/javadoc.jars/${artifactId}-${version}.javadoc.jar"/> > - > + <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> > - --> > + <!-- 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> > > > <!--========================================================== > ========--> > <!-- Generate Eclipse .project and .classpath files > --> > > <!--========================================================== > ========--> > - <goal name="eclipse" > - description="Generate Eclipse project files" > - prereqs="eclipse:generate-project"> > + <goal name="eclipse:eclipse" description="Generate Eclipse project > + files" prereqs="eclipse:generate-project"> > <j:if test="${sourcesPresent or !pom.build.resources.isEmpty()}"> > - <attainGoal name="eclipse:generate-classpath" /> > + <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 --> > + <!-- 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.Module > CoreNature') != indexnotfound}"> > - <attainGoal name="eclipse:generate-wtpmodules" /> > + <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> > > - <goal name="eclipse:generate-project" > - description="Generate Eclipse .project file"> > + > <!--========================================================== > ========--> > + <!-- Alias for eclipse:eclipse > --> > + > + > <!--================================================================== > + --> <goal name="eclipse" description="Generate Eclipse > project files" > + prereqs="eclipse:eclipse"></goal> > > + > <!--========================================================== > ========--> > + <!-- Generate Eclipse .project file > --> > + > + > <!--================================================================== > + --> <goal name="eclipse:generate-project" 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:import file="${plugin.resources}/templates/project.jelly" > + inherit="true" /> > </j:file> > - > </goal> > > - > > <!--========================================================== > ========--> > <!-- Generate Eclipse .classpath file > --> > > <!--========================================================== > ========--> > - <goal name="eclipse:generate-classpath" > - description="Generate Eclipse .classpath file"> > - > + <goal name="eclipse:generate-classpath" > description="Generate Eclipse > + .classpath file"> > <ant:echo>Creating ${basedir}/.classpath ...</ant:echo> > <j:file name="${basedir}/.classpath" prettyPrint="true" > outputMode="xml" xmlns="dummy"> > - <j:import > file="${plugin.resources}/templates/classpath.jelly" inherit="true"/> > + <j:import file="${plugin.resources}/templates/classpath.jelly" > + inherit="true" /> > </j:file> > - > </goal> > > - > > <!--========================================================== > ========--> > <!-- Generate Eclipse .wtpmodules file > --> > > <!--========================================================== > ========--> > - <goal name="eclipse:generate-wtpmodules" > - description="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:import > file="${plugin.resources}/templates/wtpmodules.jelly" > + inherit="true" /> > </j:file> > </goal> > > - > > <!--========================================================== > ========--> > <!-- Generate Eclipse mappings for Maven goals > --> > > <!--========================================================== > ========--> > - <goal name="eclipse:external-tools" > - description="Generate an Eclipse external tool > for each goal"> > - <ant:mkdir dir="${maven.build.dir}/eclipse/"/> > + <goal name="eclipse:external-tools" description="Generate > an Eclipse external tool for each goal"> > + <ant:mkdir dir="${maven.build.dir}/eclipse/" /> > <j:set var="toolFile" > value="${maven.build.dir}/eclipse/externaltools.xml" /> > - > <ant:echo>Creating ${toolFile}</ant:echo> > - > <j:set var="os" value="${os.name}" /> > - <j:set var="windows" > value="${os.toLowerCase().indexOf('windows') != '-1'}"/> > + <j:set var="windows" > value="${os.toLowerCase().indexOf('windows') > + != '-1'}" /> > <ant:echo>Adapting the generated file for a ${os} box.</ant:echo> > - > <!-- Strangely, j:file inserts a space between > ${maven.home} and /bin/maven ... --> > - <j:set var="tool.loc" > value="${maven.home}${file.separator}bin${file.separator}maven"/> > + <j:set var="tool.loc" > + value="${maven.home}${file.separator}bin${file.separator}maven" /> > <j:if test="${windows}"> > - <j:set var="tool.loc" value="${tool.loc}.bat"/> > + <j:set var="tool.loc" value="${tool.loc}.bat" /> > </j:if> > - > <j:file name="${toolFile}" prettyPrint="true" xmlns="dummy"> > <externaltools> > - <j:set var="project" > value="${org.apache.commons.jelly.werkz.Project}"/> > - > - <j:set var="session" value="${maven.session}"/> > + <j:set var="project" > value="${org.apache.commons.jelly.werkz.Project}" /> > + <j:set var="session" value="${maven.session}" /> > <j:forEach var="goal" items="${session.allGoalNames}"> > - > - <j:set var="maven.eclipse.generate" value="false"/> > + <j:set var="maven.eclipse.generate" value="false" /> > <j:set var="allGoals" value="${maven.eclipse.goals}" /> > <j:choose> > <j:when test="${allGoals == 'all'}"> > - <j:set var="maven.eclipse.generate" value="true"/> > + <j:set var="maven.eclipse.generate" value="true" /> > </j:when> > <j:otherwise> > <j:if test="${goal.indexOf(':') == '-1'}"> > - <j:set var="maven.eclipse.generate" value="true"/> > + <j:set var="maven.eclipse.generate" value="true" /> > </j:if> > </j:otherwise> > </j:choose> > - > <j:if test="${maven.eclipse.generate}"> > <tool> > <entry key="!{tool_refresh}">$${project}</entry> > @@ -194,72 +169,60 @@ > </j:forEach> > </externaltools> > </j:file> > - > <j:set var="ws" value="${maven.eclipse.workspace}X" /> > <j:if test='${ws != "X"}'> > <j:set var="toDir" > value="${maven.eclipse.workspace}/.metadata/.plugins/org.eclip > se.ui.externaltools/" /> > - <ant:copy file="${toolFile}" todir="${toDir}"/> > + <ant:copy file="${toolFile}" todir="${toDir}" /> > </j:if> > - > <j:if test='${ws == "X"}'> > - <ant:echo> > - Please set maven.eclipse.workspace to the location of your > eclipse workspace. > - Alternatively, copy > - ${maven.build.dir}/eclipse/externaltools.xml > - to > - > [maven.eclipse.workspace]/.metadata/.plugins/org.eclipse.ui.ex > ternaltools/externaltools.xml > - </ant:echo> > + <j:set var="msg" trim="true"> > + <![CDATA[ > + Please set maven.eclipse.workspace to the > location of your eclipse workspace. > + Alternatively, copy > ${maven.build.dir}/eclipse/externaltools.xml to > [maven.eclipse.workspace]/.metadata/.plugins/org.eclipse.ui.ex > ternaltools/externaltools.xml > + ]]> > + </j:set> > + <ant:echo>${msg}</ant:echo> > </j:if> > - > </goal> > > > <!--========================================================== > ========--> > <!-- Generate Eclipse mappings for Maven goals > --> > > <!--========================================================== > ========--> > - <goal name="eclipse:external-tools-21" > - description="Generate an Eclipse 2.1 external > tool for each goal"> > - <ant:mkdir dir="${maven.build.dir}/eclipse/"/> > - > - <ant:echo>Creating external tools </ant:echo> > - > + <goal name="eclipse:external-tools-21" > description="Generate an Eclipse 2.1 external tool for each goal"> > + <ant:mkdir dir="${maven.build.dir}/eclipse/" /> > + <ant:echo>Creating external tools</ant:echo> > <j:set var="os" value="${os.name}" /> > - <j:set var="windows" > value="${os.toLowerCase().indexOf('windows') != '-1'}"/> > + <j:set var="windows" > value="${os.toLowerCase().indexOf('windows') > + != '-1'}" /> > <ant:echo>Adapting the generated file for a ${os} box.</ant:echo> > - > <!-- Strangely, j:file inserts a space between > ${maven.home} and /bin/maven ... --> > - <j:set var="tool.loc" > value="${maven.home}${file.separator}bin${file.separator}maven"/> > + <j:set var="tool.loc" > + value="${maven.home}${file.separator}bin${file.separator}maven" /> > <j:if test="${windows}"> > - <j:set var="tool.loc" value="${tool.loc}.bat"/> > + <j:set var="tool.loc" value="${tool.loc}.bat" /> > </j:if> > - > - <j:set var="project" > value="${org.apache.commons.jelly.werkz.Project}"/> > + <j:set var="project" > + value="${org.apache.commons.jelly.werkz.Project}" /> > <j:set var="allGoals" value="${maven.eclipse.goals}" /> > - <j:set var="session" value="${maven.session}"/> > + <j:set var="session" value="${maven.session}" /> > <j:forEach var="goal" items="${session.allGoalNames}"> > - <util:replace var="goalName" oldChar=":" newChar="-" > value="${goal}"/> > - > - <j:set var="fileName" > value="${maven.build.dir}/eclipse/maven ${goalName}.launch"/> > - > - <j:set var="maven.eclipse.generate" value="false"/> > + <util:replace var="goalName" oldChar=":" newChar="-" > value="${goal}" /> > + <j:set var="fileName" > value="${maven.build.dir}/eclipse/maven ${goalName}.launch" /> > + <j:set var="maven.eclipse.generate" value="false" /> > <j:choose> > <j:when test="${allGoals == 'all'}"> > - <j:set var="maven.eclipse.generate" value="true"/> > + <j:set var="maven.eclipse.generate" value="true" /> > </j:when> > <j:otherwise> > <j:if test="${goal.indexOf(':') == '-1'}"> > - <j:set var="maven.eclipse.generate" value="true"/> > + <j:set var="maven.eclipse.generate" value="true" /> > </j:if> > </j:otherwise> > </j:choose> > - > <j:if test="${maven.eclipse.generate}"> > <ant:echo>Generating ${fileName}</ant:echo> > <j:file name="${fileName}" prettyPrint="true" xmlns="dummy"> > - <j:import > file="${plugin.resources}/templates/launch.jelly" inherit="true"/> > + <j:import > file="${plugin.resources}/templates/launch.jelly" > + inherit="true" /> > </j:file> > </j:if> > </j:forEach> > - > <j:set var="ws" value="${maven.eclipse.workspace}X" /> > <j:if test='${ws != "X"}'> > <j:set var="toDir" > value="${maven.eclipse.workspace}/.metadata/.plugins/org.eclip > se.debug.core/.launches/" /> @@ -267,38 +230,32 @@ > <ant:fileset dir="${maven.build.dir}/eclipse/" > includes="*.launch" /> > </ant:copy> > </j:if> > - > <j:if test='${ws == "X"}'> > - <ant:echo> > - Please set maven.eclipse.workspace to the location of your > eclipse workspace. > - Alternatively, copy > - ${maven.build.dir}/eclipse/*.launch > - to > - > [maven.eclipse.workspace]/.metadata/.plugins/org.eclipse.debug > .core/.launches/ > - </ant:echo> > + <j:set var="msg" trim="true"> > + <![CDATA[ > + Please set maven.eclipse.workspace to the > location of your eclipse workspace. > + Alternatively, copy > ${maven.build.dir}/eclipse/*.launch to > [maven.eclipse.workspace]/.metadata/.plugins/org.eclipse.debug > .core/.launches/ > + ]]> > + </j:set> > + <ant:echo>${msg}</ant:echo> > </j:if> > - > </goal> > > - > > <!--========================================================== > ========--> > <!-- Add MAVEN_REPO to classpath variables > --> > > <!--========================================================== > ========--> > - <goal name="eclipse:add-maven-repo" > - description="Ensure that the classpath variable > MAVEN_REPO is available"> > - > + <goal name="eclipse:add-maven-repo" description="Ensure that the > + classpath variable MAVEN_REPO is available"> > <j:set var="ws" value="${maven.eclipse.workspace}X" /> > <j:choose> > <j:when test='${ws != "X"}'> > - <j:set var="variableDir" > value="${maven.eclipse.workspace}/.metadata/.plugins/org.eclip > se.core.runtime/.settings/" /> > + <j:set var="variableDir" > + > + > value="${maven.eclipse.workspace}/.metadata/.plugins/org.eclipse.core. > + runtime/.settings/" /> > <j:set var="variableFile" > value="${variableDir}/org.eclipse.jdt.core.prefs" /> > - <!-- create the Eclipse property file if it is missing --> > - <ant:mkdir dir="${variableDir}"/> > - <ant:touch file="${variableFile}"/> > - > + <!-- create the Eclipse property file if it is missing --> > + <ant:mkdir dir="${variableDir}" /> > + <ant:touch file="${variableFile}" /> > <ant:propertyfile file="${variableFile}"> > - <ant:entry > key="org.eclipse.jdt.core.classpathVariable.MAVEN_REPO" > - default="${maven.repo.local}" /> > + <ant:entry > + key="org.eclipse.jdt.core.classpathVariable.MAVEN_REPO" > + default="${maven.repo.local}" /> > </ant:propertyfile> > </j:when> > <j:otherwise>The property $${maven.eclipse.workspace} > was not set. MAVEN_REPO may not be set.</j:otherwise> @@ > -308,16 +265,13 @@ > > <!--========================================================== > ========--> > <!-- Clean up eclipse generated files > --> > > <!--========================================================== > ========--> > - <goal name="eclipse:clean" > - 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}"/> > - > + <goal name="eclipse:clean" 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> > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]