use relative paths git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@189919 13f79535-47bb-0310-9956-ffa450edef68
232 lines
9.9 KiB
XML
232 lines
9.9 KiB
XML
<?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:maven="jelly:maven" xmlns="dummy" trim="true">
|
|
|
|
<maven:get var="type" plugin="maven-multiproject-plugin" property="maven.multiproject.type" />
|
|
|
|
<j:set var="IDEA_TYPE" value="JAVA_MODULE"/>
|
|
<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="true" 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">
|
|
<maven:makeRelativePath var="value" basedir="${basedir}" path="${maven.ejb.src}" separator="/" />
|
|
<deploymentDescriptor name="ejb-jar.xml" url="file://$$MODULE_DIR$$/${value}/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" />
|
|
<maven:get var="warSrc" plugin="maven-war-plugin" property="maven.war.src" />
|
|
<maven:makeRelativePath var="value" basedir="${basedir}" path="${warSrc}" separator="/" />
|
|
<webroots>
|
|
<root url="file://$$MODULE_DIR$$/${value}" relative="/" />
|
|
</webroots>
|
|
<j:forEach var="lib" items="${pom.artifacts}">
|
|
<j:set var="dep" value="${lib.dependency}"/>
|
|
<j:if test="${dep.getProperty('war.bundle') == 'true'}">
|
|
<j:set var="value" value="jar://${lib.path}!/"/>
|
|
<containerElement type="library" level="module">
|
|
<url>${value}</url>
|
|
<attribute name="method" value="1"/>
|
|
<attribute name="URI" value="/WEB-INF/lib/${dep.artifact}"/>
|
|
</containerElement>
|
|
</j:if>
|
|
</j:forEach>
|
|
<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}"/>
|
|
<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}"/>
|
|
<exclude-output/>
|
|
<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>
|
|
<j:if test="${maven.idea.target.exclude}">
|
|
<maven:makeRelativePath var="value" basedir="${basedir}" path="${maven.build.dir}" separator="/" />
|
|
<excludeFolder url="file://$$MODULE_DIR$$/${value}"/>
|
|
</j:if>
|
|
|
|
<!-- MPIDEA-28: Exclude the subprojects of a multiproject -->
|
|
<j:if test="${type == 'multiproject'}">
|
|
<j:forEach var="project" items="${reactorProjects}">
|
|
<maven:makeRelativePath var="value" basedir="${basedir}" path="${project.file.parentFile.canonicalFile}" separator="/" />
|
|
<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>
|
|
</content>
|
|
<orderEntry type="jdk" jdkName="${maven.idea.jdk}"/>
|
|
<j:forEach var="res" items="${pom.build.resources}">
|
|
<j:if test="${res.includes.isEmpty() and res.targetPath == ''}">
|
|
<orderEntry type="module-library">
|
|
<library>
|
|
<CLASSES>
|
|
<maven:makeRelativePath var="value" basedir="${basedir}" path="${res.directory}" separator="/"/>
|
|
<root url="file://$$MODULE_DIR$$/${value}"/>
|
|
</CLASSES>
|
|
<JAVADOC/>
|
|
<SOURCES/>
|
|
</library>
|
|
</orderEntry>
|
|
</j:if>
|
|
</j:forEach>
|
|
<j:if test="${unitTestSourcesPresent == 'true'}"><!-- TODO should use a unitTestResourcesPresent -->
|
|
<j:if test="${pom.build.unitTest != null}">
|
|
<j:forEach var="res" items="${pom.build.unitTest.resources}">
|
|
<j:if test="${res.includes.isEmpty() and res.targetPath == ''}">
|
|
<orderEntry type="module-library">
|
|
<library>
|
|
<CLASSES>
|
|
<maven:makeRelativePath var="value" basedir="${basedir}" path="${res.directory}" separator="/"/>
|
|
<root url="file://$$MODULE_DIR$$/${value}"/>
|
|
</CLASSES>
|
|
<JAVADOC/>
|
|
<SOURCES/>
|
|
</library>
|
|
</orderEntry>
|
|
</j:if>
|
|
</j:forEach>
|
|
</j:if>
|
|
</j:if>
|
|
|
|
<orderEntry type="sourceFolder" forTests="false"/>
|
|
<j:forEach var="lib" items="${pom.artifacts}">
|
|
<j:set var="dep" value="${lib.dependency}"/>
|
|
<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>
|
|
|
|
</j:whitespace>
|
|
|