Obtained from: Submitted by: Reviewed by: CVS: ---------------------------------------------------------------------- CVS: PR: CVS: If this change addresses a PR in the problem report tracking CVS: database, then enter the PR number(s) here. CVS: Obtained from: CVS: If this change has been taken from another system, such as NCSA, CVS: then name the system in this line, otherwise delete it. CVS: Submitted by: CVS: If this code has been contributed to Apache by someone else; i.e., CVS: they sent us a patch or a new module, then include their name/email CVS: address here. If this is your work then delete this line. CVS: Reviewed by: CVS: If we are doing pre-commit code reviews and someone else has CVS: reviewed your changes, include their name(s) here. CVS: If you have not had it reviewed then delete this line. git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114793 13f79535-47bb-0310-9956-ffa450edef68
82 lines
2.9 KiB
XML
82 lines
2.9 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>
|
|
(quote (jde-compile-option-directory "./target/classes"))
|
|
(quote (jde-javadoc-gen-destination-directory "./target/docs/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 ("target.*"))))
|
|
|
|
<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 ("./target/classes"
|
|
<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>
|