PR: MPIDEA-7, MPIDEA-10, MPIDEA-19

Submitted by: David Jencks
Reviewed by:  Brett Porter
(applied with modifications)
rollup of IDEA plugin fixes

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@189908 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
brett committed 2005-06-10 06:35:25 +00:00
1 parent dd134e7011
commit 56c00dd5a8
6 files changed
+96 -30

No files matched your search

@@ -82,9 +82,7 @@
<maven:get var="warSrc" plugin="maven-war-plugin" property="maven.war.src" />
<maven:makeRelativePath var="value" basedir="${basedir}" path="${warSrc}" separator="/" />
<webroots>
<!-- MPIDEA-15 -->
<root url="file://$$MODULE_DIR$$/${value}" relative="/" />
</webroots>
<orderEntriesWatcher>
<pairs>
@@ -113,9 +111,9 @@
<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"/>
<maven:pluginVar var="testOutputDir" plugin='maven-test-plugin' property='maven.test.dest'/>
<maven:makeRelativePath var="value" basedir="${basedir}" path="${testOutputDir}" separator="/"/>
<output-test url="file://$$MODULE_DIR$$/${value}"/>
<content url="file://$MODULE_DIR$">
<j:if test="${sourcesPresent}">
<maven:makeRelativePath var="value" basedir="${basedir}" path="${pom.build.sourceDirectory}" separator="/" />
@@ -138,7 +136,12 @@
<excludeFolder url="file://$$MODULE_DIR$$/${value}"/>
</j:forEach>
</j:if>
<j:forEach var="genSource" items="${context.getVariable('maven.idea.generated.source')}">
<sourceFolder url="file://$$MODULE_DIR$$/target/${genSource}" isTestSource="false"/>
</j:forEach>
<maven:makeRelativePath var="defaulttargetdir" basedir="${basedir}" path="${maven.build.dir}" separator="/"/>
<excludeFolder url="file://$$MODULE_DIR$$/${defaulttargetdir}/classes"/>
<excludeFolder url="file://$$MODULE_DIR$$/${defaulttargetdir}/test-classes"/>
</content>
<orderEntry type="jdk" jdkName="java version &quot;${java.version}&quot;"/>
<!-- MPIDEA-11 (duplicates MPIDEA-22): Reference resources directory -->
@@ -174,27 +177,41 @@
<orderEntry type="sourceFolder" forTests="false"/>
<j:forEach var="lib" items="${pom.artifacts}">
<j:set var="dep" value="${lib.dependency}"/>
<j:choose>
<j:when test="${dep.groupId == pom.groupId}" >
<!-- MPIDEA-7 -->
<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:set var="isModule" value="false"/>
<j:forEach var="module" items="${context.getVariable('mavenIdeaProjectList')}">
<j:if test="${dep.groupId == module.groupId and dep.artifactId == module.artifactId}">
<orderEntry type="module" module-name="${dep.artifactId}" />
<j:set var="isModule" value="true"/>
<j:break/>
</j:if>
</j:forEach>
<j:if test="${isModule == 'false' and (dep.type=='jar' or dep.type=='ejb')}">
<orderEntry type="module-library">
<library name="${dep.artifactId}">
<CLASSES>
<root url="jar://${lib.path}!/"/>
</CLASSES>
<JAVADOC/>
<SOURCES/>
</library>
</orderEntry>
</j:if>
</j:forEach>
<j:if test="${unitTestSourcesPresent and pom.getDependency('junit') == null}">
<maven:pluginVar var="testPlugin" plugin='maven-test-plugin' property='plugin'/>
<j:set var="depVersion">${testPlugin.getDependency('junit').getVersion()}</j:set>
<j:if test="${depVersion != 'none'}">
<orderEntry type="module-library">
<library name="junit">
<CLASSES>
<root url="jar://${maven.repo.local}/junit/jars/junit-${depVersion}.jar!/"/>
</CLASSES>
<JAVADOC/>
<SOURCES/>
</library>
</orderEntry>
</j:if>
</j:if>
</component>
<component name="ModuleRootManager"/>
</module>
@@ -17,10 +17,24 @@
*/
-->
<j:whitespace xmlns:j="jelly:core" xmlns="dummy" trim="true">
<j:whitespace xmlns:j="jelly:core" xmlns:maven="jelly:maven" xmlns="dummy" trim="true">
<project version="4" relativePaths="false">
<component name="ProjectRootManager" version="2" assert-keyword="false"/>
<maven:get plugin="maven-java-plugin" property="maven.compile.source" var="jdkLevel" />
<j:if test="${empty(jdkLevel)}">
<j:set var="jdkLevel" value="${java.specification.version}" />
</j:if>
<j:choose>
<j:when test="${jdkLevel == '1.4'}">
<component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="false"/>
</j:when>
<j:when test="${jdkLevel.compareTo('1.5') >= 0}">
<component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true"/>
</j:when>
<j:otherwise>
<component name="ProjectRootManager" version="2" assert-keyword="false"/>
</j:otherwise>
</j:choose>
<component name="CodeStyleManager">
<option name="USE_DEFAULT_CODE_STYLE_SCHEME" value="true"/>
<option name="CODE_STYLE_SCHEME" value=""/>
@@ -17,10 +17,24 @@
*/
-->
<j:whitespace xmlns:j="jelly:core" xmlns="dummy" trim="true">
<j:whitespace xmlns:j="jelly:core" xmlns:maven="jelly:maven" xmlns="dummy" trim="true">
<project version="4" relativePaths="false">
<component name="ProjectRootManager" version="2" assert-keyword="false"/>
<maven:get plugin="maven-java-plugin" property="maven.compile.source" var="jdkLevel" />
<j:if test="${empty(jdkLevel)}">
<j:set var="jdkLevel" value="${java.specification.version}" />
</j:if>
<j:choose>
<j:when test="${jdkLevel == '1.4'}">
<component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="false"/>
</j:when>
<j:when test="${jdkLevel.compareTo('1.5') >= 0}">
<component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true"/>
</j:when>
<j:otherwise>
<component name="ProjectRootManager" version="2" assert-keyword="false"/>
</j:otherwise>
</j:choose>
<component name="CodeStyleManager">
<option name="USE_DEFAULT_CODE_STYLE_SCHEME" value="true"/>
<option name="CODE_STYLE_SCHEME" value=""/>