Split the eclipse goals into generate-project and generate-classpath. Updated doco to match.

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113261 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
bwalding
2003-04-05 10:19:44 +00:00
parent 2f6054577e
commit 6aaff4da07
2 changed files with 23 additions and 12 deletions

View File

@@ -12,22 +12,21 @@
<!--==================================================================-->
<goal name="eclipse"
description="Generate Eclipse project files"
prereqs="eclipse:generate-project"/>
prereqs="eclipse:generate-project, eclipse:generate-classpath">
<ant:echo>Now refresh your project in Eclipse (right click on the project and select "Refresh")</ant:echo>
</goal>
<goal name="eclipse:generate-project"
description="Generate Eclipse .project and .classpath project files">
<j:set var="outputDir" value="${maven.eclipse.output.dir}"/>
<j:if test="${empty outputDir}">
<j:set var="outputDir" value="target\classes"/>
</j:if>
<ant:echo>Creating ${basedir}/.project ...</ant:echo>
<j:file name="${basedir}/.project" prettyPrint="true" xmlns="dummy">
<projectDescription>
<name>${pom.artifactId}</name>
<comment></comment>
<comment>${pom.description}</comment>
<projects>
</projects>
<buildSpec>
@@ -42,9 +41,17 @@
</natures>
</projectDescription>
</j:file>
</goal>
<goal name="eclipse:generate-classpath">
<ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
<j:set var="outputDir" value="${maven.eclipse.output.dir}"/>
<j:if test="${empty outputDir}">
<j:set var="outputDir" value="target\classes"/>
</j:if>
<j:file name="${basedir}/.classpath" prettyPrint="true" xmlns="dummy">
<classpath>
@@ -89,7 +96,6 @@
</classpath>
</j:file>
<ant:echo>Now refresh your project in Eclipse (right click on the project and select "Refresh")</ant:echo>
</goal>

View File

@@ -12,7 +12,8 @@
<name>eclipse</name>
<description>
The default goal. This goal simply executes the
<a href="#eclipse:generate-project">eclipse:generate-project</a> goal
<a href="#eclipse:generate-project">eclipse:generate-project</a> and
<a href="#eclipse:generate-classpath">eclipse:generate-classpath</a> goals.
</description>
</goal>
@@ -21,16 +22,20 @@
<description>
Generates a <code>.project</code> file for eclipse describing
the project and 'marking' it as a java project
<br />
</description>
</goal>
<name>eclipse:generate-classpath</name>
<description>
Generates a <code>.classpath</code> file for the eclipse project
with classpath entries for
<ol>
<li>the build source directory</li>
<li>the build unit test source directory</li>
<li>the JRE being used</li>
<li>the appropriate version of JUnit</li>
<li>each Maven project <code>dependency</code></li>
<li>an output directory for compiled code:
<code>target\eclipse\classes</code>
<code>target\classes</code>
</li>
</ol>
</description>