Thanks to Juergen Heidak for jdee plugin.

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113283 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
evenisse 2003-04-08 08:02:20 +00:00
parent 52d8af9db1
commit 9dfa0664d4
12 changed files with 329 additions and 0 deletions

3
jdee/.cvsignore Normal file
View File

@ -0,0 +1,3 @@
target
velocity.log
maven.log

58
jdee/plugin.jelly Normal file
View File

@ -0,0 +1,58 @@
<?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">
(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})"))
<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>

11
jdee/plugin.properties Normal file
View File

@ -0,0 +1,11 @@
# -------------------------------------------------------------------
# P L U G I N P R O P E R I E S
# -------------------------------------------------------------------
# JDEE plugin.
# -------------------------------------------------------------------
#
#maven.jdee.application.class = de.mydomain.mypackage.Main
# the name of the generated project file
#maven.jdee.project.file = prj.el

7
jdee/project.properties Normal file
View File

@ -0,0 +1,7 @@
# -------------------------------------------------------------------
# P R O J E C T P R O P E R T I E S
# -------------------------------------------------------------------
maven.xdoc.date=left
maven.xdoc.version=${pom.currentVersion}
maven.license.licenseFile=${basedir}/../../../LICENSE.txt

43
jdee/project.xml Normal file
View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<extend>${basedir}/../project.xml</extend>
<pomVersion>3</pomVersion>
<id>maven-jdee-plugin</id>
<name>Maven JDEE Plug-in</name>
<currentVersion>1.0-beta-1</currentVersion>
<description>
A plugin to create a project file to be used within the
<a href="http://jdee.sunsite.dk/">Java Developement Enviroment for Emacw</a>
</description>
<shortDescription>JDEE Plugin for Maven</shortDescription>
<url>http://maven.apache.org/reference/plugins/jdee/</url>
<siteDirectory>/www/maven.apache.org/reference/plugins/jdee/</siteDirectory>
<repository>
<connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven/src/plugins-build/jdee/</connection>
<url>http://cvs.apache.org/viewcvs/maven/src/plugins-build/jdee/</url>
</repository>
<developers>
<developer>
<name>Juergen Heidak</name>
<id>jh</id>
<email>Juergen@Heidak.de</email>
<organization>CURSOR Software AG</organization>
<roles>
<role>Java Developer</role>
</roles>
</developer>
</developers>
<reports>
<report>maven-changes-plugin</report>
<report>maven-changelog-plugin</report>
<report>maven-developer-activity-plugin</report>
<report>maven-file-activity-plugin</report>
<report>maven-license-plugin</report>
</reports>
</project>

1
jdee/xdocs/.cvsignore Normal file
View File

@ -0,0 +1 @@
stylesheets

16
jdee/xdocs/changes.xml Normal file
View File

@ -0,0 +1,16 @@
<?xml version="1.0"?>
<document>
<properties>
<title>Changes</title>
<author email="juergen@heidak.de">Juergen Heidak</author>
</properties>
<body>
<release version="1.0-beta-1" date="2003-04-02">
<action dev="evenisse" type="add">
Initial version.
</action>
</release>
</body>
</document>

28
jdee/xdocs/goals.xml Normal file
View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<document>
<properties>
<title>JDEE Plugin Goals</title>
<author email="evenisse@ifrance.com">Emmanuel Venisse</author>
</properties>
<body>
<goals>
<goal>
<name>jdee</name>
<description>
The default goal. This goal simply executes the
<a href="#jdee:generate-project">jdee:generate-project</a> goal
</description>
</goal>
<goal>
<name>jdee:generate-project</name>
<description>
Generate project file.
</description>
</goal>
</goals>
</body>
</document>

74
jdee/xdocs/index.xml Normal file
View File

@ -0,0 +1,74 @@
<?xml version="1.0"?>
<document>
<properties>
<title>Maven JDEE Plugin</title>
<author email="juergen@heidak.de">Juergen Heidak</author>
</properties>
<body>
<section name="Maven JDEE Plugin">
<p>
A plugin to create a project file to be used by
<a href="http://jdee.sunsite.dk">JDEE</a> (Java Development
Enviroment for Emacs) to make it a little easier for
Emacs users to switch to maven.
</p>
<p>
The most important part is the initialization of
<code>jde-global-classpath</code> variable. The generated project file
has this variable set to contain all dependencies (normally jarfiles)
as listed in the project descriptor.
</p>
<p>
The following table can give you an overview about the mapping between
<em>Maven</em> properties and <em>JDEE</em> variables:
<table>
<tr>
<th>Maven property/ constant value</th>
<th>JDEE variable</th>
</tr>
<tr>
<td><code>pom.artifactId</code></td>
<td><code>jde-project-name</code></td>
</tr>
<tr>
<td>
<code>maven.jdee.project.file</code> (see
<a href="properties.html">Properties</a> for details)
</td>
<td><code>jde-project-file-name</code></td>
</tr>
<tr>
<td><code>pom.build.sourceDirectory</code></td>
<td><code>jde-sourcepath</code></td>
</tr>
<tr>
<td><code>./target/classes</code></td>
<td><code>jde-compile-option-directory</code></td>
</tr>
<tr>
<td><code>./target/docs/apidocs</code></td>
<td><code>jde-javadoc-gen-destination-directory</code></td>
</tr>
<tr>
<td>
<code>
${pom.name} - ${pom.organization} (${pom.inceptionYear})
</code>
</td>
<td><code>jde-javadoc-gen-window-title</code></td>
</tr>
</table>
</p>
<p>
For more information on the functionality provided by this plugin,
please see the <a href="goals.html">Goals</a> document.
</p>
<p>
This plugin is flexible by providing configurable properties see the
<a href="properties.html">properties</a> for details.
</p>
</section>
</body>
</document>

17
jdee/xdocs/navigation.xml Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="Maven JDEE Plugin">
<title>Maven JDEE Plugin</title>
<body>
<links>
<item name="Maven" href="http://maven.apache.org/"/>
<item name="JDEE" href="http://jdee.sunsite.dk/"/>
</links>
<menu name="Overview">
<item name="Goals" href="/goals.html" />
<item name="Properties" href="/properties.html" />
<item name="Todos" href="/tasks.html" />
</menu>
</body>
</project>

39
jdee/xdocs/properties.xml Normal file
View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<document>
<properties>
<title>JDEE Properties</title>
<author email="juergen@heidak.de">Juergen Heidak</author>
</properties>
<body>
<section name="Eclipse Settings">
<table>
<tr><th>Property</th><th>Optional?</th><th>Description</th></tr>
<tr>
<td>maven.jdee.project.file</td>
<td>Yes</td>
<td>
The name of the generated file default is to <code>prj.el</code>.
<p>
The value of this property is used to determine the filename to
write the project information to. Furthermore the variable
<code>jde-project-name</code> is set (in the project file) to the
value of this property.
</p>
</td>
</tr>
<tr>
<td>maven.jdee.application.class</td>
<td>Yes</td>
<td>
The name of the class that starts the application. If this property
is defined the variable (in the project file)
<code>jde-run-application-class</code> is set to its value if
undefined the variable is left undefined too.
</td>
</tr>
</table>
</section>
</body>
</document>

32
jdee/xdocs/tasks.xml Normal file
View File

@ -0,0 +1,32 @@
<?xml version="1.0"?>
<document>
<properties>
<title>Maven JDEE Plugin</title>
<author email="juergen@heidak.de">Juergen Heidak</author>
</properties>
<body>
<section name="Todo">
<p>
There are already plugins holding a lot of information we need when
writing the project file. Especially the
<a href="http://maven.apache.org/reference/plugins/javadoc/">javadoc</a>
and the
<a href="http://maven.apache.org/reference/plugins/java/">java</a>
plugin contain several properties that we should reuse.
</p>
<p>
Some examples:
<ul>
<li>maven.compile.deprecation</li>
<li>maven.javadoc.private</li>
<li>maven.javadoc.doctitle</li>
<li>maven.javadoc.destdir </li>
</ul>
At the moment we're using the <code>target</code> directory to direct
the compilation and javadoc output produced by <em>JDEE</em> to.
</p>
</section>
</body>
</document>