directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r375904 - in /directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers: MojoHelperUtils.java ServiceInstallersMojo.java
Date Wed, 08 Feb 2006 09:16:07 GMT
Author: akarasulu
Date: Wed Feb  8 01:16:04 2006
New Revision: 375904

URL: http://svn.apache.org/viewcvs?rev=375904&view=rev
Log:
fixed bugs in finding artifacts and cleaned up output fpormatingg

Modified:
    directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java
    directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java

Modified: directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java
URL: http://svn.apache.org/viewcvs/directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java?rev=375904&r1=375903&r2=375904&view=diff
==============================================================================
--- directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java
(original)
+++ directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java
Wed Feb  8 01:16:04 2006
@@ -129,28 +129,34 @@
     {
         List libArtifacts = new ArrayList();
         Artifact artifact = null;
+        List rejects = new ArrayList();
+        
+        mymojo.getLog().info( "");
+        mymojo.getLog().info( "    Including artifacts: ");
+        mymojo.getLog().info( "    -------------------");
         Iterator artifacts = mymojo.getProject().getRuntimeArtifacts().iterator();
         while ( artifacts.hasNext() )
         {
             artifact = ( Artifact ) artifacts.next();
+            String key = artifact.getGroupId() + ":" + artifact.getArtifactId();
+            
             if ( artifact.equals( mymojo.getBootstrapper() ) )
             {
-                mymojo.getLog().info( "Not copying bootstrapper " + artifact );
+                rejects.add( key );
             }
             else if ( artifact.equals( mymojo.getDaemon() ) )
             {
-                mymojo.getLog().info( "Not copying daemon " + artifact );
+                rejects.add( key );
             }
             else if ( artifact.equals( mymojo.getLogger() ) )
             {
-                mymojo.getLog().info( "Not copying logger " + artifact );
+                rejects.add( key );
             }
             else
             {
-                String key = artifact.getGroupId() + ":" + artifact.getArtifactId();
                 if ( mymojo.getExcludes().contains( key ) )
                 {
-                    mymojo.getLog().info( "<<<=== excluded <<<=== " + key
);
+                    rejects.add( key );
                     continue;
                 }
                 
@@ -158,7 +164,7 @@
                 {
                     FileUtils.copyFileToDirectory( artifact.getFile(), layout.getLibDirectory()
);
                     libArtifacts.add( artifact );
-                    mymojo.getLog().info( "===>>> included ===>>> " + key
);
+                    mymojo.getLog().info( "        o " + key );
                 }
                 catch ( IOException e )
                 {
@@ -168,6 +174,22 @@
             }
         }
         
+        if ( ! mymojo.getExcludes().isEmpty() )
+        {
+            mymojo.getLog().info( "" );
+            mymojo.getLog().info( "    Excluded artifacts: ");
+            mymojo.getLog().info( "    ------------------");
+            for ( int ii = 0; ii < rejects.size(); ii++ )
+            {
+                mymojo.getLog().info( "        o " + rejects.get( ii ) );
+            }
+        }
+        else
+        {
+            mymojo.getLog().info( "No artifacts have been excluded.");
+        }
+        mymojo.getLog().info( "" );
+
         return libArtifacts;
     }
     

Modified: directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java
URL: http://svn.apache.org/viewcvs/directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java?rev=375904&r1=375903&r2=375904&view=diff
==============================================================================
--- directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java
(original)
+++ directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java
Wed Feb  8 01:16:04 2006
@@ -59,7 +59,7 @@
      * @todo clean me up
      * @see http://issues.apache.org/jira/browse/DIREVE-333 
      */
-    static final String TOOLS_ARTIFACT_ID = "apacheds-tools";
+    static final String TOOLS_ARTIFACT_ID = "apacheds-server-tools";
     static final String TOOLS_GROUP_ID = "org.apache.directory.server";
     
     static final String LOGGER_ARTIFACT_ID = "nlog4j";
@@ -381,17 +381,17 @@
         while ( artifacts.hasNext() )
         {
             artifact = ( Artifact ) artifacts.next();
-            if ( artifact.getArtifactId().equals( BOOTSTRAPPER_ARTIFACT_ID ) || artifact.getGroupId().equals(
BOOTSTRAPPER_GROUP_ID ) )
+            if ( artifact.getArtifactId().equals( BOOTSTRAPPER_ARTIFACT_ID ) && artifact.getGroupId().equals(
BOOTSTRAPPER_GROUP_ID ) )
             {
                 getLog().info( "Found bootstrapper dependency with version: " + artifact.getVersion()
);
                 bootstrapper = artifact;
             }
-            else if ( artifact.getArtifactId().equals( LOGGER_ARTIFACT_ID ) || artifact.getGroupId().equals(
LOGGER_GROUP_ID ) )
+            else if ( artifact.getArtifactId().equals( LOGGER_ARTIFACT_ID ) && artifact.getGroupId().equals(
LOGGER_GROUP_ID ) )
             {
                 getLog().info( "Found logger dependency with version: " + artifact.getVersion()
);
                 logger = artifact;
             }
-            else if ( artifact.getArtifactId().equals( DAEMON_ARTIFACT_ID ) || artifact.getGroupId().equals(
DAEMON_GROUP_ID ) )
+            else if ( artifact.getArtifactId().equals( DAEMON_ARTIFACT_ID ) && artifact.getGroupId().equals(
DAEMON_GROUP_ID ) )
             {
                 getLog().info( "Found daemon dependency with version: " + artifact.getVersion()
);
                 daemon = artifact;
@@ -401,7 +401,7 @@
              * @todo clean me up
              * @see http://issues.apache.org/jira/browse/DIREVE-333 
              */
-            else if ( artifact.getArtifactId().equals( TOOLS_ARTIFACT_ID ) || artifact.getGroupId().equals(
TOOLS_GROUP_ID ) )
+            else if ( artifact.getArtifactId().equals( TOOLS_ARTIFACT_ID ) && artifact.getGroupId().equals(
TOOLS_GROUP_ID ) )
             {
                 getLog().info( "Found tools dependency with version: " + artifact.getVersion()
);
                 tools = artifact;



Mime
View raw message