You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2010/10/12 19:08:30 UTC

svn commit: r1021843 - /directory/studio-plugin/trunk/src/main/java/org/apache/directory/studio/maven/plugins/StudioEclipseMojo.java

Author: seelmann
Date: Tue Oct 12 17:08:30 2010
New Revision: 1021843

URL: http://svn.apache.org/viewvc?rev=1021843&view=rev
Log:
Fixed issue with repeated execution of studio:eclipse goal corrupted MANIFEST.MF, it's idempotent now

Modified:
    directory/studio-plugin/trunk/src/main/java/org/apache/directory/studio/maven/plugins/StudioEclipseMojo.java

Modified: directory/studio-plugin/trunk/src/main/java/org/apache/directory/studio/maven/plugins/StudioEclipseMojo.java
URL: http://svn.apache.org/viewvc/directory/studio-plugin/trunk/src/main/java/org/apache/directory/studio/maven/plugins/StudioEclipseMojo.java?rev=1021843&r1=1021842&r2=1021843&view=diff
==============================================================================
--- directory/studio-plugin/trunk/src/main/java/org/apache/directory/studio/maven/plugins/StudioEclipseMojo.java (original)
+++ directory/studio-plugin/trunk/src/main/java/org/apache/directory/studio/maven/plugins/StudioEclipseMojo.java Tue Oct 12 17:08:30 2010
@@ -86,14 +86,6 @@ public class StudioEclipseMojo extends A
      */
     protected boolean skip;
 
-    /**
-     * Flag if manifest file shall be created.
-     *
-     * @parameter expression="${createManifest}" default-value="false"
-     * @since 1.0.1
-     */
-    protected boolean createManifest;
-
 
     public void execute() throws MojoExecutionException
     {
@@ -102,6 +94,13 @@ public class StudioEclipseMojo extends A
             try
             {
                 forkMvnGoal( "eclipse:eclipse", getActiveProfileIds(), getInactiveProfileIds() );
+                /*
+                 * Run full process-classes phase here. This ensures that dependencies
+                 * were resolved and classes were compiled before bundle:manifest
+                 * is executed and MANIFEST.MF is written.
+                 * Must run after eclipse:eclipse, otherwise Bundle-Classpath is corrupt.
+                 */
+                forkMvnGoal( "process-classes", getActiveProfileIds(), getInactiveProfileIds() );
             }
             catch ( Exception e )
             {
@@ -138,17 +137,6 @@ public class StudioEclipseMojo extends A
                 getLog().error( e );
             }
         }
-        if ( createManifest )
-        {
-            try
-            {
-                forkMvnGoal( "bundle:manifest", getActiveProfileIds(), getInactiveProfileIds() );
-            }
-            catch ( Exception e )
-            {
-                throw new MojoExecutionException( e.getMessage() );
-            }
-        }
     }