Move the version to 1.12
MPECLIPSE-127 : add support for wtp 1.5 Dynamically set java and servlet versions in the facet descriptor Add a new property maven.eclipse.enable to avoid to have to define some natures to enable wtp Update documentation Generates project settings to store the compiler source and target levels git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@531133 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d0af5c92b6
commit
ac953e37d0
@ -116,11 +116,7 @@
|
|||||||
<j:if test="${sourcesPresent or !pom.build.resources.isEmpty()}">
|
<j:if test="${sourcesPresent or !pom.build.resources.isEmpty()}">
|
||||||
<attainGoal name="eclipse:generate-classpath" />
|
<attainGoal name="eclipse:generate-classpath" />
|
||||||
</j:if>
|
</j:if>
|
||||||
<!-- jelly trick, you can't use "-1" in comparisons -->
|
<j:if test="${maven.eclipse.wtp.enable==true}">
|
||||||
<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" />
|
<attainGoal name="eclipse:generate-wtpmodules" />
|
||||||
</j:if>
|
</j:if>
|
||||||
<ant:echo>Now refresh your project in Eclipse (right click on the project and select "Refresh")</ant:echo>
|
<ant:echo>Now refresh your project in Eclipse (right click on the project and select "Refresh")</ant:echo>
|
||||||
@ -149,6 +145,11 @@
|
|||||||
<j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
|
<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>
|
</j:file>
|
||||||
|
<ant:mkdir dir="${basedir}/.settings"/>
|
||||||
|
<ant:echo>Creating ${basedir}/.settings/org.eclipse.jdt.core.prefs ...</ant:echo>
|
||||||
|
<j:file name="${basedir}/.settings/org.eclipse.jdt.core.prefs" omitXmlDeclaration="true" outputMode="txt" xmlns="dummy">
|
||||||
|
<j:import file="${plugin.resources}/templates/org.eclipse.jdt.core.prefs.jelly" inherit="true" />
|
||||||
|
</j:file>
|
||||||
</goal>
|
</goal>
|
||||||
|
|
||||||
<!--==================================================================-->
|
<!--==================================================================-->
|
||||||
@ -164,14 +165,14 @@
|
|||||||
</j:when>
|
</j:when>
|
||||||
<j:when test="${maven.eclipse.wtp.version==1.5}">
|
<j:when test="${maven.eclipse.wtp.version==1.5}">
|
||||||
<ant:mkdir dir="${basedir}/.settings"/>
|
<ant:mkdir dir="${basedir}/.settings"/>
|
||||||
<ant:echo>Creating ${basedir}/.settings/org.eclipse.wst.common.component ...</ant:echo>
|
<ant:echo>Creating ${basedir}/.settings/org.eclipse.wst.common.component ...</ant:echo>
|
||||||
<j:file name="${basedir}/.settings/org.eclipse.wst.common.component" prettyPrint="true" outputMode="xml" xmlns="dummy">
|
<j:file name="${basedir}/.settings/org.eclipse.wst.common.component" prettyPrint="true" outputMode="xml" xmlns="dummy">
|
||||||
<j:import file="${plugin.resources}/templates/wtp/1.5/org.eclipse.wst.common.component.jelly" inherit="true" />
|
<j:import file="${plugin.resources}/templates/wtp/1.5/org.eclipse.wst.common.component.jelly" inherit="true" />
|
||||||
</j:file>
|
</j:file>
|
||||||
<ant:echo>Creating ${basedir}/.settings/org.eclipse.wst.common.project.facet.core.xml ...</ant:echo>
|
<ant:echo>Creating ${basedir}/.settings/org.eclipse.wst.common.project.facet.core.xml ...</ant:echo>
|
||||||
<j:file name="${basedir}/.settings/org.eclipse.wst.common.project.facet.core.xml" prettyPrint="true" outputMode="xml" xmlns="dummy">
|
<j:file name="${basedir}/.settings/org.eclipse.wst.common.project.facet.core.xml" prettyPrint="true" outputMode="xml" xmlns="dummy">
|
||||||
<j:import file="${plugin.resources}/templates/wtp/1.5/org.eclipse.wst.common.project.facet.core.xml.jelly" inherit="true" />
|
<j:import file="${plugin.resources}/templates/wtp/1.5/org.eclipse.wst.common.project.facet.core.xml.jelly" inherit="true" />
|
||||||
</j:file>
|
</j:file>
|
||||||
</j:when>
|
</j:when>
|
||||||
<j:otherwise>
|
<j:otherwise>
|
||||||
<ant:fail>maven.eclipse.wtp.version=${maven.eclipse.wtp.version} not supported. Please check the plugin documentation to have the list of supported values.</ant:fail>
|
<ant:fail>maven.eclipse.wtp.version=${maven.eclipse.wtp.version} not supported. Please check the plugin documentation to have the list of supported values.</ant:fail>
|
||||||
|
|||||||
@ -91,4 +91,7 @@ maven.eclipse.javadoc.download = true
|
|||||||
maven.eclipse.servletapilist=javax.servlet:servlet-api,servletapi:servletapi,geronimo-spec:geronimo-spec-servlet
|
maven.eclipse.servletapilist=javax.servlet:servlet-api,servletapi:servletapi,geronimo-spec:geronimo-spec-servlet
|
||||||
|
|
||||||
# For which version of WTP we have to generate the configuration
|
# For which version of WTP we have to generate the configuration
|
||||||
maven.eclipse.wtp.version=1.5
|
maven.eclipse.wtp.version=1.5
|
||||||
|
|
||||||
|
# Do you want to generate WTP configuration files
|
||||||
|
maven.eclipse.wtp.enable=false
|
||||||
@ -22,7 +22,7 @@
|
|||||||
<pomVersion>3</pomVersion>
|
<pomVersion>3</pomVersion>
|
||||||
<id>maven-eclipse-plugin</id>
|
<id>maven-eclipse-plugin</id>
|
||||||
<name>Maven Eclipse Plugin</name>
|
<name>Maven Eclipse Plugin</name>
|
||||||
<currentVersion>1.11.1-SNAPSHOT</currentVersion>
|
<currentVersion>1.12-SNAPSHOT</currentVersion>
|
||||||
<description>A plugin to generate various files for the Eclipse IDE and ease the use of Maven within that environment.</description>
|
<description>A plugin to generate various files for the Eclipse IDE and ease the use of Maven within that environment.</description>
|
||||||
<shortDescription>Eclipse Plugin for Maven</shortDescription>
|
<shortDescription>Eclipse Plugin for Maven</shortDescription>
|
||||||
<versions>
|
<versions>
|
||||||
|
|||||||
@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
<j:whitespace xmlns:j="jelly:core" xmlns="dummy" trim="false">
|
||||||
|
<j:set var="target" value="${maven.compile.target}" />
|
||||||
|
<j:set var="source" value="${maven.compile.source}" />
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
<j:if test="${target!=null}">
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=${target}
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=${target}
|
||||||
|
</j:if>
|
||||||
|
<j:if test="${source!=null}">
|
||||||
|
org.eclipse.jdt.core.compiler.source=${source}
|
||||||
|
</j:if>
|
||||||
|
</j:whitespace>
|
||||||
@ -44,6 +44,26 @@
|
|||||||
<j:if test="${mebc.indexOf('org.eclipse.jdt.core.javabuilder') == indexnotfound}">
|
<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:set var="fullbuildcommands" value="org.eclipse.jdt.core.javabuilder,${maven.eclipse.buildcommands}" />
|
||||||
</j:if>
|
</j:if>
|
||||||
|
|
||||||
|
<j:if test="${maven.eclipse.wtp.enable==true}">
|
||||||
|
<!-- set required natures for WTP -->
|
||||||
|
<j:if test="${mepn.indexOf('org.eclipse.wst.common.project.facet.core.nature') == indexnotfound}">
|
||||||
|
<j:set var="fullprojectnatures" value="org.eclipse.wst.common.project.facet.core.nature,${fullprojectnatures}" />
|
||||||
|
</j:if>
|
||||||
|
<j:if test="${mepn.indexOf('org.eclipse.wst.common.modulecore.ModuleCoreNature') == indexnotfound}">
|
||||||
|
<j:set var="fullprojectnatures" value="org.eclipse.wst.common.modulecore.ModuleCoreNature,${fullprojectnatures}" />
|
||||||
|
</j:if>
|
||||||
|
<j:if test="${mepn.indexOf('org.eclipse.jem.workbench.JavaEMFNature') == indexnotfound}">
|
||||||
|
<j:set var="fullprojectnatures" value="org.eclipse.jem.workbench.JavaEMFNature,${fullprojectnatures}" />
|
||||||
|
</j:if>
|
||||||
|
<!-- set required build commands for WTP -->
|
||||||
|
<j:if test="${mebc.indexOf('org.eclipse.wst.common.project.facet.core.builder') == indexnotfound}">
|
||||||
|
<j:set var="fullbuildcommands" value="org.eclipse.wst.common.project.facet.core.builder,${fullbuildcommands}" />
|
||||||
|
</j:if>
|
||||||
|
<j:if test="${mebc.indexOf('org.eclipse.wst.validation.validationbuilder') == indexnotfound}">
|
||||||
|
<j:set var="fullbuildcommands" value="org.eclipse.wst.validation.validationbuilder,${fullbuildcommands}" />
|
||||||
|
</j:if>
|
||||||
|
</j:if>
|
||||||
</j:if>
|
</j:if>
|
||||||
|
|
||||||
<name>${maven.eclipse.project.name}</name>
|
<name>${maven.eclipse.project.name}</name>
|
||||||
|
|||||||
@ -1,132 +1,116 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<!--
|
<!--
|
||||||
/*
|
/*
|
||||||
* Copyright 2001-2006 The Apache Software Foundation.
|
* Copyright 2001-2006 The Apache Software Foundation.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* 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">
|
<j:whitespace xmlns:j="jelly:core" xmlns:maven="jelly:maven" xmlns:u="jelly:util" xmlns:eclipse="eclipse" xmlns="dummy"
|
||||||
<project-modules id="moduleCoreId">
|
trim="true">
|
||||||
<j:set var="deployDir" value="/" />
|
<project-modules id="moduleCoreId" project-version="1.5.0">
|
||||||
<j:set var="moduletype" value="jst.utility" />
|
<j:set var="deployDir" value="/" />
|
||||||
<j:set var="deployname" value="${pom.artifactId}" />
|
<j:set var="moduletype" value="jst.utility" />
|
||||||
<j:set var="mmpt" value="${maven.multiproject.type}" trim="true" />
|
<j:set var="deployname" value="${pom.artifactId}" />
|
||||||
<j:choose>
|
<j:set var="mmpt" value="${maven.multiproject.type}" trim="true" />
|
||||||
<j:when test="${mmpt == 'war'}">
|
<j:choose>
|
||||||
<!-- war -->
|
<j:when test="${mmpt == 'war'}">
|
||||||
<j:set var="moduletype" value="jst.web" />
|
<!-- war -->
|
||||||
<j:set var="deployDir" value="/WEB-INF/classes" />
|
<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:if 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="/" />
|
||||||
|
<wb-resource deploy-path="/" source-path="/${relWarPath}" />
|
||||||
|
<property name="context-root" value="${pom.artifactId}" />
|
||||||
|
</j:if>
|
||||||
|
<property name="java-output-path" value="/target/classes"/>
|
||||||
|
<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:when>
|
||||||
</j:choose>
|
<j:otherwise>
|
||||||
<wb-module deploy-name="${deployname}">
|
<!-- make sure it's a webapp library -->
|
||||||
<j:choose>
|
<j:if test="${lib.dependency.getProperty('war.bundle')=='true'}">
|
||||||
<j:when test="${moduletype == 'jst.web'}">
|
<maven:makeRelativePath var="relativePath" basedir="${maven.repo.local}" path="${lib.path}"
|
||||||
<!-- war -->
|
separator="/" />
|
||||||
<maven:get var="warPath" plugin='maven-war-plugin' property='maven.war.src' />
|
<u:file var="checkExist" name="${maven.repo.local}/${relativePath}" />
|
||||||
<maven:makeRelativePath var="relWarPath" basedir="${basedir}" path="${warPath}" separator="/" />
|
<j:choose>
|
||||||
<module-type module-type-id="jst.web">
|
<j:when test="${checkExist.exists()}">
|
||||||
<version>
|
<j:set var="relativePathCheck" value="${relativePath}X" />
|
||||||
<!-- try to detect servlet dependency, maven.eclipse.servletapilist can hold different names -->
|
<j:if test='${relativePathCheck == "X"}'>
|
||||||
<j:set var="moduleversion" value="x" />
|
<j:set var="relativePath"
|
||||||
<u:tokenize var="servletapilist" delim=",">${maven.eclipse.servletapilist}</u:tokenize>
|
value="${lib.dependency.groupId}/jars/${lib.dependency.artifactId}-${lib.dependency.version}.jar" />
|
||||||
<j:forEach var="servletapi" items="${servletapilist}" trim="true">
|
</j:if>
|
||||||
<j:if test="${pom.getDependency(servletapi) != null}">
|
<j:if test="${lib.dependency.type == 'tld'}">
|
||||||
<j:set var="moduleversion" value="${pom.getDependency(servletapi).getVersion()}" />
|
<j:set var="outputDir" value="${maven.war.tld.dir}" />
|
||||||
</j:if>
|
</j:if>
|
||||||
</j:forEach>
|
<j:if test="${lib.dependency.type != 'tld'}">
|
||||||
<!-- defaults to 2.2 -->
|
<j:set var="outputDir" value="/WEB-INF/lib" />
|
||||||
<j:choose>
|
</j:if>
|
||||||
<j:when test="${moduleversion.startsWith('2.4')}">2.4</j:when>
|
<dependent-module deploy-path="${outputDir}"
|
||||||
<j:when test="${moduleversion.startsWith('2.3')}">2.3</j:when>
|
handle="module:/classpath/var/MAVEN_REPO/${relativePath}">
|
||||||
<j:otherwise>2.2</j:otherwise>
|
<dependency-type>uses</dependency-type>
|
||||||
</j:choose>
|
</dependent-module>
|
||||||
</version>
|
</j:when>
|
||||||
<property name="context-root" value="${pom.artifactId}" />
|
<j:otherwise>
|
||||||
</module-type>
|
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/${lib.path}">
|
||||||
<wb-resource deploy-path="/" source-path="/${relWarPath}" />
|
<dependency-type>uses</dependency-type>
|
||||||
</j:when>
|
</dependent-module>
|
||||||
<j:otherwise>
|
</j:otherwise>
|
||||||
<!-- jar -->
|
</j:choose>
|
||||||
<module-type module-type-id="jst.utility" />
|
</j:if>
|
||||||
</j:otherwise>
|
</j:otherwise>
|
||||||
</j:choose>
|
</j:choose>
|
||||||
<j:set var="srcDir" value="" />
|
</j:forEach>
|
||||||
<!-- main src dir -->
|
</j:if>
|
||||||
<j:if test="${sourcesPresent}">
|
</wb-module>
|
||||||
<maven:makeRelativePath var="srcDir" basedir="${basedir}" path="${pom.build.sourceDirectory}" separator="/" />
|
</project-modules>
|
||||||
<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>
|
|
||||||
<j:if test="${lib.dependency.type == 'tld'}"><j:set var="outputDir" value="${maven.war.tld.dir}"/></j:if>
|
|
||||||
<j:if test="${lib.dependency.type != 'tld'}"><j:set var="outputDir" value="/WEB-INF/lib"/></j:if>
|
|
||||||
<dependent-module deploy-path="${outputDir}"
|
|
||||||
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>
|
</j:whitespace>
|
||||||
@ -1,35 +1,67 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<!--
|
<!--
|
||||||
/*
|
/*
|
||||||
* Copyright 2001-2006 The Apache Software Foundation.
|
* Copyright 2001-2006 The Apache Software Foundation.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* 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">
|
<j:whitespace xmlns:j="jelly:core" xmlns:maven="jelly:maven" xmlns:u="jelly:util" xmlns:eclipse="eclipse" xmlns="dummy"
|
||||||
|
trim="true">
|
||||||
<faceted-project>
|
<faceted-project>
|
||||||
<fixed facet="jst.java"/>
|
<fixed facet="jst.java" />
|
||||||
<installed facet="jst.java" version="5.0"/>
|
<j:set var="javaversion" value="${maven.compile.target}" />
|
||||||
|
<j:if test="javaversion==null">
|
||||||
|
<j:set var="javaversion" value="${maven.compile.source}" />
|
||||||
|
</j:if>
|
||||||
|
<j:choose>
|
||||||
|
<j:when test="${javaversion.startsWith('1.5')}">
|
||||||
|
<j:set var="javaversion" value="5.0" />
|
||||||
|
</j:when>
|
||||||
|
<j:when test="${javaversion.startsWith('1.6')}">
|
||||||
|
<j:set var="javaversion" value="6.0" />
|
||||||
|
</j:when>
|
||||||
|
</j:choose>
|
||||||
|
<installed facet="jst.java" version="${javaversion}" />
|
||||||
<j:set var="mmpt" value="${maven.multiproject.type}" trim="true" />
|
<j:set var="mmpt" value="${maven.multiproject.type}" trim="true" />
|
||||||
<j:choose>
|
<j:choose>
|
||||||
<j:when test="${mmpt == 'war'}">
|
<j:when test="${mmpt == 'war'}">
|
||||||
<fixed facet="jst.web"/>
|
<fixed facet="jst.web" />
|
||||||
<installed facet="jst.web" version="2.3"/>
|
<!-- 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')}">
|
||||||
|
<installed facet="jst.web" version="2.4" />
|
||||||
|
</j:when>
|
||||||
|
<j:when test="${moduleversion.startsWith('2.3')}">
|
||||||
|
<installed facet="jst.web" version="2.3" />
|
||||||
|
</j:when>
|
||||||
|
<j:otherwise>
|
||||||
|
<installed facet="jst.web" version="2.2" />
|
||||||
|
</j:otherwise>
|
||||||
|
</j:choose>
|
||||||
</j:when>
|
</j:when>
|
||||||
<j:otherwise>
|
<j:otherwise>
|
||||||
<fixed facet="jst.utility"/>
|
<fixed facet="jst.utility" />
|
||||||
<installed facet="jst.utility" version="1.0"/>
|
<installed facet="jst.utility" version="1.0" />
|
||||||
</j:otherwise>
|
</j:otherwise>
|
||||||
</j:choose>
|
</j:choose>
|
||||||
</faceted-project>
|
</faceted-project>
|
||||||
</j:whitespace>
|
</j:whitespace>
|
||||||
@ -1,6 +1,3 @@
|
|||||||
maven.eclipse.resources.addtoclasspath=true
|
maven.eclipse.resources.addtoclasspath=true
|
||||||
maven.multiproject.type=war
|
maven.multiproject.type=war
|
||||||
|
maven.eclipse.wtp.enable=true
|
||||||
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
|
|
||||||
@ -23,7 +23,9 @@
|
|||||||
<author email="dion@multitask.com.au">dIon Gillard</author>
|
<author email="dion@multitask.com.au">dIon Gillard</author>
|
||||||
</properties>
|
</properties>
|
||||||
<body>
|
<body>
|
||||||
<release version="1.11.1-SNAPSHOT" date="In SVN">
|
<release version="1.12-SNAPSHOT" date="In SVN">
|
||||||
|
<action dev="aheritier" type="add">Project preferences are now generated with the classpath (to define the java version for sources and target).</action>
|
||||||
|
<action dev="aheritier" type="update">WTP settings are now generated if maven.eclipse.wtp.enable=false. No more need to define natures, build commands.</action>
|
||||||
<action dev="aheritier" type="add" issues="MPECLIPSE-127">Add basic support (jar,war) for WTP 1.5</action>
|
<action dev="aheritier" type="add" issues="MPECLIPSE-127">Add basic support (jar,war) for WTP 1.5</action>
|
||||||
<action dev="aheritier" type="fix">WTP configuration : tld dependencies weren't deployed in ${maven.war.tld.dir} but in WEB-INF/lib</action>
|
<action dev="aheritier" type="fix">WTP configuration : tld dependencies weren't deployed in ${maven.war.tld.dir} but in WEB-INF/lib</action>
|
||||||
<action dev="aheritier" type="add">New goal eclipse:multiclean</action>
|
<action dev="aheritier" type="add">New goal eclipse:multiclean</action>
|
||||||
|
|||||||
@ -119,4 +119,26 @@ maven.hibernate.output.dir=${maven.build.dir}/generated-sources/schema
|
|||||||
</answer>
|
</answer>
|
||||||
</faq>
|
</faq>
|
||||||
</part>
|
</part>
|
||||||
|
|
||||||
|
<part id="WTP">
|
||||||
|
<title>WTP support</title>
|
||||||
|
<faq id="version">
|
||||||
|
<question>How can I set the version of WTP ?</question>
|
||||||
|
<answer>
|
||||||
|
<p>To specify the version of WTP configuration files, set the property <a href="properties.html">maven.eclipse.wtp.version</a> .</p>
|
||||||
|
</answer>
|
||||||
|
</faq>
|
||||||
|
<faq id="activation">
|
||||||
|
<question>How can I activate WTP support for my project ?</question>
|
||||||
|
<answer>
|
||||||
|
<p>To activate WTP you have to set the property <a href="properties.html">maven.eclipse.wtp.enable</a> to true.</p>
|
||||||
|
</answer>
|
||||||
|
</faq>
|
||||||
|
<faq id="multiproject">
|
||||||
|
<question>Can I use WTP in a multiproject ?</question>
|
||||||
|
<answer>
|
||||||
|
<p>Yes, the plugin will read the value of the property maven.multiproject.type to generate the settings for libraries and for the web application.</p>
|
||||||
|
</answer>
|
||||||
|
</faq>
|
||||||
|
</part>
|
||||||
</faqs>
|
</faqs>
|
||||||
|
|||||||
@ -252,6 +252,13 @@
|
|||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>maven.eclipse.wtp.enable</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
<td>
|
||||||
|
<p>Do you want to generate settings for WTP? Default value : false.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>maven.eclipse.wtp.version</td>
|
<td>maven.eclipse.wtp.version</td>
|
||||||
<td>Yes</td>
|
<td>Yes</td>
|
||||||
@ -260,6 +267,14 @@
|
|||||||
<p>Default value is <code>1.5</code>.</p>
|
<p>Default value is <code>1.5</code>.</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>maven.eclipse.servletapilist</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
<td>
|
||||||
|
<p>List of servlet api used to find the servlet version to set in wtp.</p>
|
||||||
|
<p>Default value is <code>javax.servlet:servlet-api,servletapi:servletapi,geronimo-spec:geronimo-spec-servlet</code>.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<p>
|
<p>
|
||||||
Note that you will need to defined a
|
Note that you will need to defined a
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user