git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114976 13f79535-47bb-0310-9956-ffa450edef68
85 lines
3.2 KiB
XML
85 lines
3.2 KiB
XML
<?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:maven="jelly:maven"
|
|
xmlns:ant="jelly:ant">
|
|
|
|
<goal name="jdee"
|
|
description="Generate JDEE project file"
|
|
prereqs="jdee:generate-project"/>
|
|
|
|
<!-- Generate project file in basedir -->
|
|
<goal name="jdee:generate-project"
|
|
description="Generate project file in basedir">
|
|
|
|
<j:set var="projectFile"
|
|
value="${context.getVariable('maven.jdee.project.file')}" />
|
|
<j:if test="${projectFile == null}">
|
|
<j:set var="projectFile" value="prj.el"/>
|
|
</j:if>
|
|
|
|
<ant:echo>Generating file ${projectFile} ...</ant:echo>
|
|
|
|
<j:file name="${basedir}/${projectFile}" prettyPrint="false"
|
|
omitXmlDeclaration ="true" xmlns="dummy">
|
|
;; generated by jdee plugin (see http://maven.apache.org/reference/plugins/jdee/)
|
|
(jde-project-file-version "1.0")
|
|
(jde-set-variables
|
|
(quote (jde-project-name "${pom.artifactId}"))
|
|
(quote (jde-project-file-name "${maven.jdee.project.file}"))
|
|
<j:if test="${sourcesPresent}">
|
|
<maven:makeRelativePath var="srcDir" basedir="${basedir}" path="${pom.build.sourceDirectory}" />
|
|
(quote (jde-sourcepath (quote ("./${srcDir}"))))
|
|
<j:whitespace />
|
|
</j:if>
|
|
<maven:makeRelativePath path="${maven.build.dest}" var="mavenBuildDest" separator="/" basedir="${basedir}" />
|
|
<maven:makeRelativePath path="${maven.build.dir}" var="mavenBuildDir" separator="/" basedir="${basedir}" />
|
|
<maven:makeRelativePath path="${maven.docs.dest}" var="mavenDocsDest" separator="/" basedir="${basedir}" />
|
|
(quote (jde-compile-option-directory "./${mavenBuildDest}"))
|
|
(quote (jde-javadoc-gen-destination-directory "./${mavenDocsDest}/apidocs"))
|
|
(quote (jde-project-file-name "${projectFile}"))
|
|
(quote (jde-javadoc-gen-window-title "${pom.name} - ${pom.organization} (${pom.inceptionYear})"))
|
|
(quote (jde-import-excluded-packages (quote ("${mavenBuildDir}.*"))))
|
|
|
|
<j:set var="mainClass"
|
|
value="${context.getVariable('maven.jdee.application.class')}" />
|
|
<j:if test="${mainClass != null}">
|
|
(quote (jde-run-application-class "${mainClass}"))
|
|
<j:whitespace> </j:whitespace>
|
|
</j:if>
|
|
(quote (jde-global-classpath (quote ("./${mavenBuildDest}"
|
|
<j:if test="${unitTestSourcesPresent}">
|
|
<maven:makeRelativePath var="srcDir" basedir="${basedir}" path="${pom.build.unitTestSourceDirectory}" />
|
|
"./${srcDir}" <j:whitespace />
|
|
</j:if>
|
|
<!-- now iterate through all dependencies -->
|
|
<j:forEach var="lib" items="${pom.artifacts}">
|
|
"${lib.path}" <j:whitespace />
|
|
</j:forEach>
|
|
)))))
|
|
</j:file>
|
|
|
|
<ant:echo>Now reload the created project file (${projectFile}) in JDEE</ant:echo>
|
|
</goal>
|
|
|
|
</project>
|