maven-plugins/jdee/plugin.jelly
2003-04-22 09:32:49 +00:00

61 lines
2.1 KiB
XML

<?xml version="1.0"?>
<project
xmlns:j="jelly:core"
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}">
(quote (jde-sourcepath (quote ("./${pom.build.sourceDirectory}"))))
<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}">
"./${pom.build.unitTestSourceDirectory}" <j:whitespace />
</j:if>
<!-- now iterate through all dependencies -->
<j:forEach var="lib" items="${pom.artifacts}">
"${maven.repo.local}${lib.urlPath}" <j:whitespace />
</j:forEach>
)))))
</j:file>
<ant:echo>Now reload the created project file (${projectFile}) in JDEE</ant:echo>
</goal>
</project>