PR: MPIDEA-5
Submitted By: Severin Voisin (with modifications) match module type to artifact type git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115435 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f00800b303
commit
5584f4a81c
@ -60,7 +60,6 @@
|
||||
</j:file>
|
||||
</goal>
|
||||
|
||||
<!-- -->
|
||||
<goal name="idea:idea"
|
||||
description="Generate IDEA .ipr, .iml and .iws project files">
|
||||
<attainGoal name="idea:project"/>
|
||||
@ -68,9 +67,11 @@
|
||||
<attainGoal name="idea:module"/>
|
||||
</goal>
|
||||
|
||||
<!-- Depends on war:load to make sure war plugin is loaded (needed by module.jelly) - should use
|
||||
a dependency handle -->
|
||||
<goal name="idea:module"
|
||||
description="Generate IDEA .iml project files"
|
||||
prereqs="idea:init">
|
||||
prereqs="idea:init,war:load">
|
||||
<util:available file="${template.dir}/module.jelly">
|
||||
<ant:echo>Creating ${basedir}/${pom.artifactId}.iml ...</ant:echo>
|
||||
<j:file name="${basedir}/${pom.artifactId}.iml" prettyPrint="true" xmlns="dummy">
|
||||
|
||||
@ -23,9 +23,9 @@
|
||||
<pomVersion>3</pomVersion>
|
||||
<id>maven-idea-plugin</id>
|
||||
<name>Maven IDEA Plug-in</name>
|
||||
<currentVersion>1.4</currentVersion>
|
||||
<currentVersion>1.5-SNAPSHOT</currentVersion>
|
||||
<shortDescription>IDEA Plugin for Maven</shortDescription>
|
||||
<description>IDEA Plugin for Maven. Requires Maven 1.0 RC2.</description>
|
||||
<description>IDEA Plugin for Maven. Requires Maven 1.0 RC3.</description>
|
||||
<url>http://maven.apache.org/reference/plugins/idea/</url>
|
||||
<issueTrackingUrl>http://jira.codehaus.org/BrowseProject.jspa?id=10350</issueTrackingUrl>
|
||||
<siteDirectory>/www/maven.apache.org/reference/plugins/idea/</siteDirectory>
|
||||
|
||||
@ -19,46 +19,133 @@
|
||||
|
||||
<j:whitespace xmlns:j="jelly:core" xmlns:maven="jelly:maven" xmlns="dummy" trim="true">
|
||||
|
||||
<module version="4" relativePaths="false">
|
||||
<component name="LvcsConfiguration">
|
||||
<option name="LOCAL_VCS_ENABLED" value="true"/>
|
||||
<option name="LOCAL_VCS_PURGING_PERIOD" value="259200000"/>
|
||||
<option name="MARK_EXTERNAL_CHANGES_AS_UP_TO_DATE" value="true"/>
|
||||
</component>
|
||||
<component name="NewModuleRootManager">
|
||||
<maven:makeRelativePath var="value" basedir="${basedir}" path="${maven.build.dest}" separator="/" />
|
||||
<output url="file://$$MODULE_DIR$$/${value}"/>
|
||||
<!-- @todo - use maven.test.dest instead -->
|
||||
<maven:makeRelativePath var="value" basedir="${basedir}" path="${maven.build.dir}" separator="/" />
|
||||
<output-test url="file://$$MODULE_DIR$$/${value}/test-classes"/>
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<j:if test="${sourcesPresent}">
|
||||
<maven:makeRelativePath var="value" basedir="${basedir}" path="${pom.build.sourceDirectory}" separator="/" />
|
||||
<sourceFolder url="file://$$MODULE_DIR$$/${value}" isTestSource="false"/>
|
||||
</j:if>
|
||||
<j:if test="${unitTestSourcesPresent}">
|
||||
<maven:makeRelativePath var="value" basedir="${basedir}" path="${pom.build.unitTestSourceDirectory}" separator="/" />
|
||||
<sourceFolder url="file://$$MODULE_DIR$$/${value}" isTestSource="true"/>
|
||||
</j:if>
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="java version "${java.version}""/>
|
||||
<orderEntry type="sourceFolder" forTests="false"/>
|
||||
<j:forEach var="lib" items="${pom.artifacts}">
|
||||
<j:set var="dep" value="${lib.dependency}"/>
|
||||
<j:if test="${dep.type=='jar'}">
|
||||
<orderEntry type="module-library">
|
||||
<library name="${dep.artifactId}">
|
||||
<CLASSES>
|
||||
<root url="jar://${lib.path}!/"/>
|
||||
</CLASSES>
|
||||
<JAVADOC/>
|
||||
<SOURCES/>
|
||||
</library>
|
||||
</orderEntry>
|
||||
</j:if>
|
||||
</j:forEach>
|
||||
</component>
|
||||
<component name="ModuleRootManager"/>
|
||||
</module>
|
||||
<maven:get var="type" plugin="maven-multiproject-plugin" property="maven.multiproject.type" />
|
||||
|
||||
<j:set var="IDEA_TYPE" value=""/>
|
||||
<j:if test="${type == 'ejb'}">
|
||||
<j:set var="IDEA_TYPE" value="J2EE_EJB_MODULE"/>
|
||||
</j:if>
|
||||
<j:if test="${type == 'war'}">
|
||||
<j:set var="IDEA_TYPE" value="J2EE_WEB_MODULE"/>
|
||||
</j:if>
|
||||
|
||||
<module version="4" relativePaths="false" type="${IDEA_TYPE}">
|
||||
<j:if test="${type == 'ejb'}">
|
||||
<component name="EjbModuleBuildComponent">
|
||||
<setting name="EXPLODED_URL" value="file://" />
|
||||
<setting name="EXPLODED_ENABLED" value="false" />
|
||||
<setting name="JAR_URL" value="file://$$MODULE_DIR$$/target/${maven.final.name}.jar" />
|
||||
<setting name="JAR_ENABLED" value="true" />
|
||||
</component>
|
||||
<component name="EjbModuleProperties">
|
||||
<deploymentDescriptor name="ejb-jar.xml" url="file://$MODULE_DIR$/src/ejb/META-INF/ejb-jar.xml" version="2.x" />
|
||||
<orderEntriesWatcher>
|
||||
<pairs>
|
||||
<key>
|
||||
<option name="value" value="0" />
|
||||
</key>
|
||||
<value predicate="moduleLibrary">
|
||||
<j:set var="url" value="jar://${maven.repo.local}/j2ee/jars/j2ee-1.3.jar!/" />
|
||||
<url>${url}</url>
|
||||
</value>
|
||||
</pairs>
|
||||
</orderEntriesWatcher>
|
||||
<order-entry-info>
|
||||
<info>
|
||||
<key>
|
||||
<option name="value" value="0" />
|
||||
</key>
|
||||
<value>
|
||||
<setting name="copy" value="false" />
|
||||
<setting name="URI" value="" />
|
||||
</value>
|
||||
</info>
|
||||
</order-entry-info>
|
||||
</component>
|
||||
</j:if>
|
||||
<j:if test="${type == 'war'}">
|
||||
<maven:get var="webXml" plugin="maven-war-plugin" property="maven.war.webxml" />
|
||||
<maven:get var="warDir" plugin="maven-war-plugin" property="maven.war.webapp.dir" />
|
||||
<component name="WebModuleBuildComponent">
|
||||
<maven:makeRelativePath var="value" basedir="${basedir}" path="${warDir}" separator="/" />
|
||||
<setting name="EXPLODED_URL" value="file://$$MODULE_DIR$$/${value}" />
|
||||
<setting name="EXPLODED_ENABLED" value="true" />
|
||||
<setting name="JAR_URL" value="file://" />
|
||||
<setting name="JAR_ENABLED" value="false" />
|
||||
<setting name="RUN_JASPER_VALIDATION" value="false" />
|
||||
</component>
|
||||
<component name="WebModuleProperties">
|
||||
<maven:makeRelativePath var="value" basedir="${basedir}" path="${webXml}" separator="/" />
|
||||
<deploymentDescriptor name="web.xml" url="file://$$MODULE_DIR$$/${value}" version="2.3" />
|
||||
<webroots>
|
||||
<root url="file://$MODULE_DIR$/src/webapp" relative="/" />
|
||||
</webroots>
|
||||
<orderEntriesWatcher>
|
||||
<pairs>
|
||||
<key>
|
||||
<option name="value" value="0" />
|
||||
</key>
|
||||
<value predicate="moduleLibrary">
|
||||
<j:set var="url" value="jar://${maven.repo.local}/servletapi/jars/servletapi-2.3.jar!/" />
|
||||
<url>${url}</url>
|
||||
</value>
|
||||
</pairs>
|
||||
</orderEntriesWatcher>
|
||||
<order-entry-info>
|
||||
<info>
|
||||
<key>
|
||||
<option name="value" value="0" />
|
||||
</key>
|
||||
<value>
|
||||
<setting name="copy" value="false" />
|
||||
<setting name="URI" value="" />
|
||||
</value>
|
||||
</info>
|
||||
</order-entry-info>
|
||||
</component>
|
||||
</j:if>
|
||||
<component name="NewModuleRootManager">
|
||||
<maven:makeRelativePath var="value" basedir="${basedir}" path="${maven.build.dest}" separator="/" />
|
||||
<output url="file://$$MODULE_DIR$$/${value}"/>
|
||||
<!-- @todo - use maven.test.dest instead -->
|
||||
<maven:makeRelativePath var="value" basedir="${basedir}" path="${maven.build.dir}" separator="/" />
|
||||
<output-test url="file://$$MODULE_DIR$$/${value}/test-classes"/>
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<j:if test="${sourcesPresent}">
|
||||
<maven:makeRelativePath var="value" basedir="${basedir}" path="${pom.build.sourceDirectory}" separator="/" />
|
||||
<sourceFolder url="file://$$MODULE_DIR$$/${value}" isTestSource="false"/>
|
||||
</j:if>
|
||||
<j:if test="${unitTestSourcesPresent}">
|
||||
<maven:makeRelativePath var="value" basedir="${basedir}" path="${pom.build.unitTestSourceDirectory}" separator="/" />
|
||||
<sourceFolder url="file://$$MODULE_DIR$$/${value}" isTestSource="true"/>
|
||||
</j:if>
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="java version "${java.version}""/>
|
||||
<orderEntry type="sourceFolder" forTests="false"/>
|
||||
<j:forEach var="lib" items="${pom.artifacts}">
|
||||
<j:set var="dep" value="${lib.dependency}"/>
|
||||
<j:if test="${dep.type=='jar'}">
|
||||
<j:choose>
|
||||
<j:when test="${dep.groupId == pom.groupId}" >
|
||||
<orderEntry type="module" module-name="${dep.artifactId}" />
|
||||
</j:when>
|
||||
<j:otherwise>
|
||||
<orderEntry type="module-library">
|
||||
<library name="${dep.artifactId}">
|
||||
<CLASSES>
|
||||
<root url="jar://${lib.path}!/"/>
|
||||
</CLASSES>
|
||||
<JAVADOC/>
|
||||
<SOURCES/>
|
||||
</library>
|
||||
</orderEntry>
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
</j:if>
|
||||
</j:forEach>
|
||||
</component>
|
||||
<component name="ModuleRootManager"/>
|
||||
</module>
|
||||
|
||||
</j:whitespace>
|
||||
|
||||
|
||||
@ -24,6 +24,9 @@
|
||||
<author email="michal.maczka@dimatic.com">Michal Maczka</author>
|
||||
</properties>
|
||||
<body>
|
||||
<release version="1.5-SNAPSHOT" date="in CVS">
|
||||
<action dev="brett" type="add" issue="MPIDEA-5">match module type to artifact type</action>
|
||||
</release>
|
||||
<release version="1.4" date="2004-05-15">
|
||||
<action dev="brett" type="update">Default to project version 4.</action>
|
||||
<action dev="brett" type="fix" issue="MPIDEA-4">Use a multiproject dependency handle so that you can use multiproject properties in idea:multiproject.</action>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user