Author: fgiust Date: Wed Jul 19 14:10:04 2006 New Revision: 423609 URL: http://svn.apache.org/viewvc?rev=423609&view=rev Log: add a new "eclipse-plugin" packaging. The eclipse plugin will operate in "pde-mode" both if the pde flag is set or the packaging is eclipse-plugin.
Added: maven/plugins/trunk/maven-eclipse-plugin/src/main/resources/META-INF/ maven/plugins/trunk/maven-eclipse-plugin/src/main/resources/META-INF/plexus/ maven/plugins/trunk/maven-eclipse-plugin/src/main/resources/META-INF/plexus/components.xml (with props) maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-22/ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-22/classpath maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-22/pom.xml (with props) maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-22/project Modified: maven/plugins/trunk/maven-eclipse-plugin/ (props changed) maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java Propchange: maven/plugins/trunk/maven-eclipse-plugin/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Wed Jul 19 14:10:04 2006 @@ -5,3 +5,4 @@ .classpath .settings .deployables +*.ser Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java?rev=423609&r1=423608&r2=423609&view=diff ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java (original) +++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java Wed Jul 19 14:10:04 2006 @@ -478,6 +478,11 @@ return false; } + if ( "eclipse-plugin".equals( packaging ) ) + { + pde = true; + } + if ( eclipseProjectDir == null ) { eclipseProjectDir = executedProject.getFile().getParentFile(); Added: maven/plugins/trunk/maven-eclipse-plugin/src/main/resources/META-INF/plexus/components.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/resources/META-INF/plexus/components.xml?rev=423609&view=auto ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/main/resources/META-INF/plexus/components.xml (added) +++ maven/plugins/trunk/maven-eclipse-plugin/src/main/resources/META-INF/plexus/components.xml Wed Jul 19 14:10:04 2006 @@ -0,0 +1,42 @@ +<component-set> + <components> + <component> + <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role> + <role-hint>eclipse-plugin</role-hint> + <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation> + <configuration> + <lifecycles> + <lifecycle> + <id>default</id> + <!-- START SNIPPET: eclipse-plugin-lifecycle --> + <phases> + <process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources> + <compile>org.apache.maven.plugins:maven-compiler-plugin:compile</compile> + <process-test-resources> + org.apache.maven.plugins:maven-resources-plugin:testResources + </process-test-resources> + <test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile> + <test>org.apache.maven.plugins:maven-surefire-plugin:test</test> + <package>org.apache.maven.plugins:maven-jar-plugin:jar</package><!-- change me --> + <install>org.apache.maven.plugins:maven-install-plugin:install</install> + <deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy> + </phases> + <!-- END SNIPPET: eclipse-plugin-lifecycle --> + </lifecycle> + </lifecycles> + </configuration> + </component> + <component> + <role>org.apache.maven.artifact.handler.ArtifactHandler</role> + <role-hint>eclipse-plugin</role-hint> + <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation> + <configuration> + <type>eclipse-plugin</type> + <includesDependencies>true</includesDependencies> + <language>java</language> + <extension>jar</extension> + <addedToClasspath>true</addedToClasspath> + </configuration> + </component> + </components> +</component-set> Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/main/resources/META-INF/plexus/components.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/main/resources/META-INF/plexus/components.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java?rev=423609&r1=423608&r2=423609&view=diff ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java (original) +++ maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java Wed Jul 19 14:10:04 2006 @@ -203,4 +203,14 @@ testProject( "project-21" ); } + /** + * PDE support using eclipse-plugin packaging. + * @throws Exception any exception thrown during test + */ + public void testProject22() + throws Exception + { + testProject( "project-22" ); + } + } Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-22/classpath URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-22/classpath?rev=423609&view=auto ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-22/classpath (added) +++ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-22/classpath Wed Jul 19 14:10:04 2006 @@ -0,0 +1,5 @@ +<classpath> + <classpathentry kind="output" path="target/classes"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> +</classpath> \ No newline at end of file Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-22/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-22/pom.xml?rev=423609&view=auto ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-22/pom.xml (added) +++ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-22/pom.xml Wed Jul 19 14:10:04 2006 @@ -0,0 +1,9 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>eclipse</groupId> + <artifactId>maven-eclipse-plugin-test-project-22</artifactId> + <packaging>eclipse-plugin</packaging> + <version>22</version> + <name>maven-eclipse-plugin-test-project-22</name> +</project> Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-22/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-22/pom.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-22/project URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-22/project?rev=423609&view=auto ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-22/project (added) +++ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-22/project Wed Jul 19 14:10:04 2006 @@ -0,0 +1,23 @@ +<projectDescription> + <name>maven-eclipse-plugin-test-project-22</name> + <comment/> + <projects/> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments/> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments/> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments/> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.pde.PluginNature</nature> + </natures> +</projectDescription> \ No newline at end of file