epugh 2004/11/16 02:48:16
Modified: eclipse plugin.jelly
eclipse/xdocs changes.xml
eclipse/src/plugin-resources/templates project.jelly
Added: eclipse/src/plugin-test/nosourcetest .cvsignore maven.xml
project.xml
Log:
MPECLIPSE-56 Only create .classpath and javabuilder if sources are present
Revision Changes Path
1.31 +4 -1 maven-plugins/eclipse/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/maven-plugins/eclipse/plugin.jelly,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- plugin.jelly 19 Oct 2004 14:13:04 -0000 1.30
+++ plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
@@ -56,7 +56,10 @@
<!--==================================================================-->
<goal name="eclipse"
description="Generate Eclipse project files"
- prereqs="eclipse:generate-project, eclipse:generate-classpath">
+ prereqs="eclipse:generate-project">
+ <j:if test="${sourcesPresent}">
+ <attainGoal name="eclipse:generate-classpath" />
+ </j:if>
<ant:echo>Now refresh your project in Eclipse (right click on the
project and select "Refresh")</ant:echo>
</goal>
1.1
maven-plugins/eclipse/src/plugin-test/nosourcetest/.cvsignore
Index: .cvsignore
===================================================================
.classpath
.project
1.1
maven-plugins/eclipse/src/plugin-test/nosourcetest/maven.xml
Index: maven.xml
===================================================================
<!--
/*
* 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:assert="assert"
xmlns:ant="jelly:ant"
xmlns:u="jelly:util"
xmlns:maven="jelly:maven"
xmlns:x="jelly:xml">
<goal name="testPlugin" prereqs="test-classpath, test-project">
</goal>
<goal name="test-init">
<j:set var="dotProject" value="${basedir}/.project"/>
<j:set var="dotClasspath" value="${basedir}/.classpath"/>
<attainGoal name="eclipse:clean"/>
</goal>
<goal name="test-classpath">
<attainGoal name="test-init"/>
<attainGoal name="eclipse"/>
<u:available file="${dotClasspath}">
<j:set var="classpathFound" value="true"/>
</u:available>
<j:if test="${classpathFound}">
<ant:fail>The classpath file was created, and shouldn't have
been.</ant:fail>
</j:if>
</goal>
<goal name="test-project">
<attainGoal name="test-init"/>
<attainGoal name="eclipse:generate-project"/>
<assert:assertFileExists file="${dotProject}" />
<u:file var="projectFile" name="${dotProject}"/>
<x:parse var="projectDoc" xml="${projectFile.toURL()}" />
<x:set var="natures"
select="$projectDoc/projectDescription/natures/nature"/>
<x:set var="countBuilder"
select="count($projectDoc/projectDescription/buildSpec/buildCommand/name)"/>
<assert:assertEquals expected="0"
value="${countBuilder.intValue().toString()}" msg="Shouldn't find any
builders."/>
</goal>
</project>
1.1
maven-plugins/eclipse/src/plugin-test/nosourcetest/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* 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>
<pomVersion>3</pomVersion>
<extend>${basedir}/../project.xml</extend>
<id>test-maven-eclipse-nosourcetest-plugin</id>
<name>Test project for Maven Eclipse Plugin</name>
<dependencies>
<dependency>
<id>maven</id>
<version>beta-8</version>
<jar>maven.jar</jar>
</dependency>
<dependency>
<groupId>commons-jelly</groupId>
<artifactId>commons-jelly-tags-xml</artifactId>
<version>20030211.142705</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main</sourceDirectory>
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
</build>
</project>
1.41 +4 -0 maven-plugins/eclipse/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/maven-plugins/eclipse/xdocs/changes.xml,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- changes.xml 30 Oct 2004 10:17:02 -0000 1.40
+++ changes.xml 16 Nov 2004 10:48:16 -0000 1.41
@@ -24,6 +24,10 @@
<author email="[EMAIL PROTECTED]">dIon Gillard</author>
</properties>
<body>
+ <release version="1.10" date="IN CVS">
+ <action dev="epugh" type="fix" issue="MPECLIPSE-56" due-to="Archimedes
Trajano">Only create .classpath and javabuilder if sources are present
+ </action>
+ </release>
<release version="1.9" date="2004-10-30">
<action dev="epugh" type="fix" issue="MPECLIPSE-53">Add property
<code>maven.eclipse.resources.addtoclasspath</code>to control
whether to add pom.resources etc or not. Provide backwards compatiblity.
1.6 +2 -0
maven-plugins/eclipse/src/plugin-resources/templates/project.jelly
Index: project.jelly
===================================================================
RCS file:
/home/cvs/maven-plugins/eclipse/src/plugin-resources/templates/project.jelly,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- project.jelly 6 May 2004 05:43:13 -0000 1.5
+++ project.jelly 16 Nov 2004 10:48:16 -0000 1.6
@@ -36,6 +36,7 @@
</j:if>
</j:forEach>
</projects>
+ <j:if test="${sourcesPresent}">
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
@@ -57,6 +58,7 @@
<nature>${nature}</nature>
</j:forEach>
</natures>
+ </j:if>
</projectDescription>
</j:whitespace>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]