maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ogusa...@apache.org
Subject svn commit: r744623 - in /maven/mercury/trunk/mercury-ant-tasks: ./ src/main/java/org/apache/maven/mercury/ant/tasks/ src/main/resources/org/apache/maven/mercury/ant/tasks/ src/test/java/org/apache/maven/mercury/ant/tasks/
Date Sun, 15 Feb 2009 07:50:54 GMT
Author: ogusakov
Date: Sun Feb 15 07:50:53 2009
New Revision: 744623

URL: http://svn.apache.org/viewvc?rev=744623&view=rev
Log:
[MNG-3969] reformat to make Herve happy

Modified:
    maven/mercury/trunk/mercury-ant-tasks/mercury.xml
    maven/mercury/trunk/mercury-ant-tasks/pom.xml
    maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/AbstractDataType.java
    maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Auth.java
    maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Config.java
    maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Dep.java
    maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Dependency.java
    maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Repo.java
    maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/ResolveTask.java
    maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/WriteTask.java
    maven/mercury/trunk/mercury-ant-tasks/src/main/resources/org/apache/maven/mercury/ant/tasks/Messages.properties
    maven/mercury/trunk/mercury-ant-tasks/src/test/java/org/apache/maven/mercury/ant/tasks/MercuryAntTest.java
    maven/mercury/trunk/mercury-ant-tasks/src/test/java/org/apache/maven/mercury/ant/tasks/MercuryBootstrapTest.java

Modified: maven/mercury/trunk/mercury-ant-tasks/mercury.xml
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-ant-tasks/mercury.xml?rev=744623&r1=744622&r2=744623&view=diff
==============================================================================
--- maven/mercury/trunk/mercury-ant-tasks/mercury.xml (original)
+++ maven/mercury/trunk/mercury-ant-tasks/mercury.xml Sun Feb 15 07:50:53 2009
@@ -110,7 +110,7 @@
 
  </target>
           
-  <target name="download-repos">
+  <target name="download-repo-flat">
     
     <mercury:resolve-dependencies source="maven:pom.xml">
       <mercury:local-repository location="${basedir}/lib" layout="flat"/>
@@ -121,6 +121,10 @@
       </mercury:remote-repositories>
     </mercury:resolve-dependencies>
 
+  </target>
+  	          
+  <target name="download-repos-2">
+
     <mercury:resolve-dependencies source="maven:pom.xml">
       <mercury:local-repository location="${basedir}/lib" layout="flat"/>
       <mercury:remote-repositories checksum-validation="true">

Modified: maven/mercury/trunk/mercury-ant-tasks/pom.xml
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-ant-tasks/pom.xml?rev=744623&r1=744622&r2=744623&view=diff
==============================================================================
--- maven/mercury/trunk/mercury-ant-tasks/pom.xml (original)
+++ maven/mercury/trunk/mercury-ant-tasks/pom.xml Sun Feb 15 07:50:53 2009
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.maven.mercury</groupId>
     <artifactId>mercury</artifactId>
-    <version>1.0-alpha-5</version>
+    <version>1.0-alpha-6-SNAPSHOT</version>
   </parent>
 
   <artifactId>mercury-ant-tasks</artifactId>

Modified: maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/AbstractDataType.java
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/AbstractDataType.java?rev=744623&r1=744622&r2=744623&view=diff
==============================================================================
--- maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/AbstractDataType.java
(original)
+++ maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/AbstractDataType.java
Sun Feb 15 07:50:53 2009
@@ -3,24 +3,21 @@
 import org.apache.tools.ant.ProjectComponent;
 
 /**
- *
- *
  * @author Oleg Gusakov
  * @version $Id$
- *
  */
 public abstract class AbstractDataType
-extends ProjectComponent
+    extends ProjectComponent
 {
-  private String id;
+    private String id;
 
-  public String getId()
-  {
-    return id;
-  }
+    public String getId()
+    {
+        return id;
+    }
 
-  public void setId( String id )
-  {
-      this.id = id;
-  }
+    public void setId( String id )
+    {
+        this.id = id;
+    }
 }

Modified: maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Auth.java
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Auth.java?rev=744623&r1=744622&r2=744623&view=diff
==============================================================================
--- maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Auth.java
(original)
+++ maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Auth.java
Sun Feb 15 07:50:53 2009
@@ -77,7 +77,7 @@
     {
         Object ao = ( authId == null ) ? project.getReference( DEFAULT_AUTH_ID ) : project.getReference(
authId );
 
-        if( ao == null )
+        if ( ao == null )
         {
             return null;
         }

Modified: maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Config.java
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Config.java?rev=744623&r1=744622&r2=744623&view=diff
==============================================================================
--- maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Config.java
(original)
+++ maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Config.java
Sun Feb 15 07:50:53 2009
@@ -19,9 +19,9 @@
     extends AbstractDataType
 {
     private static final Language LANG = new DefaultLanguage( Config.class );
-    
+
     public static final String SYSTEM_PROPERTY_CENTRAL_URL = "mercury.central.url";
-    
+
     public static final String SYSTEM_PROPERTY_LOCAL_DIR_NAME = "mercury.repo.local";
 
     public static final String DEFAULT_LOCAL_DIR_NAME = "/.m2/repository";
@@ -45,23 +45,19 @@
     {
         Repo local = createRepo();
         local.setId( "defaultLocalRepo" );
-        
-        String localDirName = ( localDir == null )
-                                ? System.getProperty( SYSTEM_PROPERTY_LOCAL_DIR_NAME, 
-                                         System.getProperty( "user.home" ) + DEFAULT_LOCAL_DIR_NAME
-                                                    )
-                                : localDir
-                            ;
-            
+
+        String localDirName =
+            ( localDir == null ) ? System.getProperty( SYSTEM_PROPERTY_LOCAL_DIR_NAME, System.getProperty(
"user.home" )
+                + DEFAULT_LOCAL_DIR_NAME ) : localDir;
+
         local.setDir( localDirName );
 
         Repo central = createRepo();
         central.setId( "central" );
-        
-        String centralUrl = ( remoteUrl == null )
-                                ? System.getProperty( SYSTEM_PROPERTY_CENTRAL_URL, "http://repo1.maven.org/maven2"
)
-                                : remoteUrl
-                        ;
+
+        String centralUrl =
+            ( remoteUrl == null ) ? System.getProperty( SYSTEM_PROPERTY_CENTRAL_URL, "http://repo1.maven.org/maven2"
)
+                            : remoteUrl;
 
         central.setUrl( centralUrl );
     }
@@ -91,14 +87,14 @@
 
     private void init()
     {
-        if( getId() != null )
+        if ( getId() != null )
         {
             return;
         }
 
-        setId(DEFAULT_CONFIG_ID);
+        setId( DEFAULT_CONFIG_ID );
 
-        if( getProject() != null )
+        if ( getProject() != null )
         {
             getProject().addReference( DEFAULT_CONFIG_ID, this );
         }
@@ -108,7 +104,7 @@
     {
         init();
 
-        Repo r = new Repo(true);
+        Repo r = new Repo( true );
 
         listRepo( r );
 
@@ -177,7 +173,6 @@
         return a;
     }
 
-    //======================================================================================
-
+    // ======================================================================================
 
 }

Modified: maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Dep.java
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Dep.java?rev=744623&r1=744622&r2=744623&view=diff
==============================================================================
--- maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Dep.java
(original)
+++ maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Dep.java
Sun Feb 15 07:50:53 2009
@@ -40,6 +40,7 @@
     implements ResourceCollection
 {
     private static final Language LANG = new DefaultLanguage( Dep.class );
+
     private static final IMercuryLogger LOG = MercuryLoggerManager.getLogger( Dep.class );
 
     private List<Dependency> _dependencies;
@@ -57,37 +58,35 @@
     private LocalRepositoryMap _pomRepo;
 
     private Storage _pomStorage;
-    
+
     private Dependency _sourceDependency;
-    
 
     /**
      * @param vr
-     * @throws MavenEmbedderException 
+     * @throws MavenEmbedderException
      */
-//    private MavenEmbedder createEmbedder( VirtualRepositoryReader vr )
-//    throws MavenEmbedderException
-//    {
-//        Configuration configuration = new DefaultConfiguration()
-//            .setUserSettingsFile( MavenEmbedder.DEFAULT_USER_SETTINGS_FILE )
-//            .setGlobalSettingsFile( MavenEmbedder.DEFAULT_GLOBAL_SETTINGS_FILE )
-//            .setClassLoader( Thread.currentThread().getContextClassLoader() )
-//        ;
-//
-//        ConfigurationValidationResult validationResult = MavenEmbedder.validateConfiguration(
configuration );
-//
-//        if ( validationResult.isValid() )
-//        {
-//            // If the configuration is valid then do your thang ...
-//        }
-//
-//        MavenEmbedder embedder = new MavenEmbedder( configuration );
-//
-//        PlexusContainer container = embedder.getPlexusContainer();
-//        
-//        return embedder;
-//    }
-
+    // private MavenEmbedder createEmbedder( VirtualRepositoryReader vr )
+    // throws MavenEmbedderException
+    // {
+    // Configuration configuration = new DefaultConfiguration()
+    // .setUserSettingsFile( MavenEmbedder.DEFAULT_USER_SETTINGS_FILE )
+    // .setGlobalSettingsFile( MavenEmbedder.DEFAULT_GLOBAL_SETTINGS_FILE )
+    // .setClassLoader( Thread.currentThread().getContextClassLoader() )
+    // ;
+    //
+    // ConfigurationValidationResult validationResult = MavenEmbedder.validateConfiguration(
configuration );
+    //
+    // if ( validationResult.isValid() )
+    // {
+    // // If the configuration is valid then do your thang ...
+    // }
+    //
+    // MavenEmbedder embedder = new MavenEmbedder( configuration );
+    //
+    // PlexusContainer container = embedder.getPlexusContainer();
+    //        
+    // return embedder;
+    // }
     private List<ArtifactBasicMetadata> getDependencies( VirtualRepositoryReader vr
)
         throws RepositoryException
     {
@@ -100,7 +99,7 @@
 
         for ( Dependency d : _dependencies )
         {
-            
+
             if ( d._amd == null )
             {
                 throw new IllegalArgumentException( LANG.getMessage( "dep.dependency.name.mandatory"
) );
@@ -115,11 +114,11 @@
                 String key = d._amd.getGAV();
 
                 ArtifactMetadata deps = null;
-                
+
                 File pomFile = new File( d._pom );
-                
-                if( !pomFile.exists() )
-                    throw new RepositoryException("pom file "+d._pom+" does not exist");
+
+                if ( !pomFile.exists() )
+                    throw new RepositoryException( "pom file " + d._pom + " does not exist"
);
 
                 try
                 {
@@ -160,7 +159,8 @@
 
         return dep;
     }
-    //----------------------------------------------------------------------------------------
+
+    // ----------------------------------------------------------------------------------------
     protected List<Artifact> resolve()
         throws Exception
     {
@@ -168,32 +168,33 @@
 
         return resolve( config, _scope );
     }
-    //----------------------------------------------------------------------------------------
-//    protected ArtifactRepository getLocalRepository( String path )
-//    throws Exception
-//    {
-//        ArtifactRepositoryLayout repoLayout = new DefaultRepositoryLayout();
-//    
-//        ArtifactRepository r = new DefaultArtifactRepository( "local",
-//                                                              "file://" + path,
-//                                                              repoLayout );
-//    
-//        return r;
-//    }
-    
-//    protected MavenProject getProject( File pom, ArtifactRepository localRepo )
-//        throws Exception
-//    {
-//        Properties props = System.getProperties();
-//        ProfileActivationContext ctx = new DefaultProfileActivationContext( props, false
);
-//
-//        ProjectBuilderConfiguration pbc = new DefaultProjectBuilderConfiguration();
-//        pbc.setLocalRepository( localRepo );
-//        pbc.setGlobalProfileManager( new DefaultProfileManager( getContainer(), ctx ) );
-//
-//        return projectBuilder.build( pom, pbc );
-//    }
-    //----------------------------------------------------------------------------------------
+
+    // ----------------------------------------------------------------------------------------
+    // protected ArtifactRepository getLocalRepository( String path )
+    // throws Exception
+    // {
+    // ArtifactRepositoryLayout repoLayout = new DefaultRepositoryLayout();
+    //    
+    // ArtifactRepository r = new DefaultArtifactRepository( "local",
+    // "file://" + path,
+    // repoLayout );
+    //    
+    // return r;
+    // }
+
+    // protected MavenProject getProject( File pom, ArtifactRepository localRepo )
+    // throws Exception
+    // {
+    // Properties props = System.getProperties();
+    // ProfileActivationContext ctx = new DefaultProfileActivationContext( props, false );
+    //
+    // ProjectBuilderConfiguration pbc = new DefaultProjectBuilderConfiguration();
+    // pbc.setLocalRepository( localRepo );
+    // pbc.setGlobalProfileManager( new DefaultProfileManager( getContainer(), ctx ) );
+    //
+    // return projectBuilder.build( pom, pbc );
+    // }
+    // ----------------------------------------------------------------------------------------
     protected List<Artifact> resolve( Config config, ArtifactScopeEnum scope )
         throws Exception
     {
@@ -222,11 +223,10 @@
         VirtualRepositoryReader vr = new VirtualRepositoryReader( repos );
 
         List<ArtifactBasicMetadata> depList = getDependencies( vr );
-        
-        List<ArtifactMetadata> res = _transitive
-                                        ? db.resolveConflicts( scope, new ArtifactQueryList(
depList ), null, null )
-                                        : toArtifactMetadataList( depList )
-                                    ;
+
+        List<ArtifactMetadata> res =
+            _transitive ? db.resolveConflicts( scope, new ArtifactQueryList( depList ), null,
null )
+                            : toArtifactMetadataList( depList );
 
         if ( Util.isEmpty( res ) )
         {
@@ -250,7 +250,6 @@
             return null;
         }
 
-
         Map<ArtifactBasicMetadata, List<Artifact>> resMap = aRes.getResults();
 
         int count = 0;
@@ -292,14 +291,14 @@
      */
     private List<ArtifactMetadata> toArtifactMetadataList( List<ArtifactBasicMetadata>
depList )
     {
-        if( Util.isEmpty( depList ) )
+        if ( Util.isEmpty( depList ) )
             return null;
-        
+
         List<ArtifactMetadata> res = new ArrayList<ArtifactMetadata>( depList.size()
);
-        
-        for( ArtifactBasicMetadata bmd : depList )
-            res.add( new ArtifactMetadata(bmd) );
-        
+
+        for ( ArtifactBasicMetadata bmd : depList )
+            res.add( new ArtifactMetadata( bmd ) );
+
         return res;
     }
 
@@ -313,23 +312,23 @@
     {
         this._scope = scope;
     }
-    
+
     @Override
     public void setId( String id )
     {
         super.setId( id );
-        
-        if( _sourceDependency != null )
+
+        if ( _sourceDependency != null )
             _sourceDependency.setId( id );
     }
 
     public void setSource( String pom )
     {
         _sourceDependency = createDependency();
-        
-        if( getId() != null  )
+
+        if ( getId() != null )
             _sourceDependency.setId( getId() );
-        
+
         _sourceDependency.setPom( pom );
     }
 
@@ -342,12 +341,14 @@
     {
         _dependencies = dependencies;
     }
-    //----------------------------------------------------------------------------------------
+
+    // ----------------------------------------------------------------------------------------
     public boolean isFilesystemOnly()
     {
         return true;
     }
-    //----------------------------------------------------------------------------------------
+
+    // ----------------------------------------------------------------------------------------
     public Iterator<File> iterator()
     {
         try
@@ -380,7 +381,8 @@
             return null;
         }
     }
-    //----------------------------------------------------------------------------------------
+
+    // ----------------------------------------------------------------------------------------
     public int size()
     {
         try
@@ -401,6 +403,6 @@
             return 0;
         }
     }
-    //----------------------------------------------------------------------------------------
-    //----------------------------------------------------------------------------------------
+    // ----------------------------------------------------------------------------------------
+    // ----------------------------------------------------------------------------------------
 }
\ No newline at end of file

Modified: maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Dependency.java
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Dependency.java?rev=744623&r1=744622&r2=744623&view=diff
==============================================================================
--- maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Dependency.java
(original)
+++ maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Dependency.java
Sun Feb 15 07:50:53 2009
@@ -5,11 +5,8 @@
 import org.codehaus.plexus.lang.Language;
 
 /**
- *
- *
  * @author Oleg Gusakov
  * @version $Id$
- *
  */
 
 public class Dependency
@@ -21,7 +18,7 @@
     String _pom;
 
     boolean _optional = false;
-    
+
     /** dependency processor type, if any */
     String _processor;
 
@@ -50,11 +47,11 @@
     public void setPom( String pom )
     {
         int pos = pom.indexOf( ':' );
-        
-        if( pos != -1 )
+
+        if ( pos != -1 )
         {
             this._processor = pom.substring( 0, pos );
-            this._pom = pom.substring( pos+1 );
+            this._pom = pom.substring( pos + 1 );
         }
         else
             this._pom = pom;

Modified: maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Repo.java
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Repo.java?rev=744623&r1=744622&r2=744623&view=diff
==============================================================================
--- maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Repo.java
(original)
+++ maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/Repo.java
Sun Feb 15 07:50:53 2009
@@ -30,7 +30,7 @@
 
 /**
  * repository data type
- *
+ * 
  * @author Oleg Gusakov
  * @version $Id$
  */
@@ -69,6 +69,8 @@
 
     private transient boolean _registered = false;
 
+    private static final String[] SUPPORTED_LAYOUTS = new String[] { "m2", "flat" };
+
     public Repo()
     {
     }
@@ -147,7 +149,10 @@
     // alternative - Jason's - syntax
     public void setLocation( String path )
     {
-        setDir( path );
+        if ( FileUtil.isLocalResource( path ) )
+            setDir( path );
+        else
+            setUrl( path );
     }
 
     public void setType( String type )
@@ -173,11 +178,25 @@
 
     public void setLayout( String layout )
     {
-        if ( !DEFAULT_LAYOUT.equals( layout ) )
+        if ( layout == null )
+            throw new IllegalArgumentException( LANG.getMessage( "repo.null.layout" ) );
+
+        boolean notSupported = true;
+
+        int len = layout.length();
+
+        for ( String l : SUPPORTED_LAYOUTS )
         {
-            throw new IllegalArgumentException( LANG.getMessage( "repo.layout.not.supported",
layout ) );
+            if ( l.regionMatches( 0, layout, 0, len ) )
+            {
+                notSupported = false;
+                break;
+            }
         }
 
+        if ( notSupported )
+            throw new IllegalArgumentException( LANG.getMessage( "repo.layout.not.supported",
layout ) );
+
         processDefaults();
     }
 
@@ -441,8 +460,8 @@
 
                     if ( ( keyId == null ) || ( keyId.length() != 16 ) )
                     {
-                        throw new BuildException( LANG.getMessage( "config.repo.verifier.pgp.bad.keyid",
keyId,
-                                                                    keyRing ) );
+                        throw new BuildException(
+                                                  LANG.getMessage( "config.repo.verifier.pgp.bad.keyid",
keyId, keyRing ) );
                     }
 
                     try

Modified: maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/ResolveTask.java
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/ResolveTask.java?rev=744623&r1=744622&r2=744623&view=diff
==============================================================================
--- maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/ResolveTask.java
(original)
+++ maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/ResolveTask.java
Sun Feb 15 07:50:53 2009
@@ -44,7 +44,7 @@
     private ArtifactScopeEnum _scope = ArtifactScopeEnum.compile;
 
     private List<Dependency> _dependencies;
-    
+
     private Dependency _sourceDependency;
 
     // ----------------------------------------------------------------------------------------
@@ -92,7 +92,8 @@
 
             dep = (Dep) d;
         }
-        else // inner dependency set
+        else
+        // inner dependency set
         {
             dep = new Dep();
 
@@ -110,7 +111,7 @@
                 return;
             }
         }
-        else if( !Util.isEmpty( _refPathId ) )
+        else if ( !Util.isEmpty( _refPathId ) )
         {
             Object p = getProject().getReference( _refPathId );
 
@@ -130,7 +131,7 @@
         try
         {
             Config config = AbstractAntTask.findConfig( getProject(), _configId );
-            
+
             dep.setTransitive( _transitive );
 
             Collection<Artifact> artifacts = dep.resolve( config, _scope );
@@ -263,18 +264,18 @@
     public void setId( String id )
     {
         this._id = id;
-        
-        if( _sourceDependency != null )
+
+        if ( _sourceDependency != null )
             _sourceDependency.setId( id );
     }
 
     public void setSource( String pom )
     {
         _sourceDependency = createDependency();
-        
-        if( _id != null )
+
+        if ( _id != null )
             _sourceDependency.setId( _id );
-        
+
         _sourceDependency.setPom( pom );
     }
 
@@ -283,7 +284,7 @@
         this._transitive = transitive;
     }
 
-    public Dependency createDependency(  )
+    public Dependency createDependency()
     {
         if ( Util.isEmpty( _dependencies ) )
         {

Modified: maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/WriteTask.java
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/WriteTask.java?rev=744623&r1=744622&r2=744623&view=diff
==============================================================================
--- maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/WriteTask.java
(original)
+++ maven/mercury/trunk/mercury-ant-tasks/src/main/java/org/apache/maven/mercury/ant/tasks/WriteTask.java
Sun Feb 15 07:50:53 2009
@@ -15,11 +15,8 @@
 import org.codehaus.plexus.lang.Language;
 
 /**
- *
- *
  * @author Oleg Gusakov
  * @version $Id$
- *
  */
 public class WriteTask
     extends AbstractAntTask

Modified: maven/mercury/trunk/mercury-ant-tasks/src/main/resources/org/apache/maven/mercury/ant/tasks/Messages.properties
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-ant-tasks/src/main/resources/org/apache/maven/mercury/ant/tasks/Messages.properties?rev=744623&r1=744622&r2=744623&view=diff
==============================================================================
--- maven/mercury/trunk/mercury-ant-tasks/src/main/resources/org/apache/maven/mercury/ant/tasks/Messages.properties
(original)
+++ maven/mercury/trunk/mercury-ant-tasks/src/main/resources/org/apache/maven/mercury/ant/tasks/Messages.properties
Sun Feb 15 07:50:53 2009
@@ -38,6 +38,7 @@
 config.repo.verifier.bad.type=Verifier does not understand type {0}
 config.repo.verifier.pgp.bad.keyid=Bad key "{0}" for secret keyring {1}; expected to see
16 hex number, but did not find them
 repo.no.id=repo {0} does not have an id attribute, or it's not the first attribute.
+repo.null.layout=layout cannot be null
 repo.layout.not.supported=layout {0} is not supported
 
 dep.pom.not.implemented=pom attribute not implemented for <dep ../> tag

Modified: maven/mercury/trunk/mercury-ant-tasks/src/test/java/org/apache/maven/mercury/ant/tasks/MercuryAntTest.java
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-ant-tasks/src/test/java/org/apache/maven/mercury/ant/tasks/MercuryAntTest.java?rev=744623&r1=744622&r2=744623&view=diff
==============================================================================
--- maven/mercury/trunk/mercury-ant-tasks/src/test/java/org/apache/maven/mercury/ant/tasks/MercuryAntTest.java
(original)
+++ maven/mercury/trunk/mercury-ant-tasks/src/test/java/org/apache/maven/mercury/ant/tasks/MercuryAntTest.java
Sun Feb 15 07:50:53 2009
@@ -103,7 +103,7 @@
     protected void tearDown()
         throws Exception
     {
-        if( _jetty != null )
+        if ( _jetty != null )
         {
             _jetty.stop();
             _jetty.destroy();
@@ -129,7 +129,7 @@
 
             fail( title + " did not raise an exception" );
         }
-        catch( Throwable e )
+        catch ( Throwable e )
         {
             System.out.println( "Expected exception: " + e.getMessage() );
         }
@@ -193,7 +193,7 @@
 
     // -----------------------------------
     public void testCompileThinPath3()
-    throws Exception
+        throws Exception
     {
         String title = "compile-thin-path-3";
         System.out.println( "========> start " + title );
@@ -222,7 +222,7 @@
 
     // -----------------------------------
     public void testCompileThinPathPom()
-    throws Exception
+        throws Exception
     {
         String title = "compile-thin-path-pom";
         System.out.println( "========> start " + title );
@@ -248,9 +248,10 @@
 
         assertTrue( asm.exists() );
     }
+
     // -----------------------------------
     public void testCompileOldSyntax()
-    throws Exception
+        throws Exception
     {
         String title = "compile-old-syntax";
         System.out.println( "========> start " + title );
@@ -274,9 +275,10 @@
 
         assertTrue( asm.exists() );
     }
+
     // -----------------------------------
     public void testCompileOldSyntaxWithAuth()
-    throws Exception
+        throws Exception
     {
         String title = "compile-old-syntax-with-auth";
         System.out.println( "========> start " + title );
@@ -385,9 +387,10 @@
         assertTrue( af.exists() );
         assertTrue( sig.exists() );
     }
-    //-----------------------------------
+
+    // -----------------------------------
     public void testVerifyReadBadPgp()
-    throws Exception
+        throws Exception
     {
         String title = "verify-read-bad-pgp";
         System.out.println( "========> start " + title );
@@ -409,17 +412,19 @@
 
         assertFalse( af.exists() );
     }
-    //-----------------------------------
+
+    // -----------------------------------
     public void testVerifyReadGoodPgp()
-    throws Exception
+        throws Exception
     {
         String title = "verify-read-good-pgp";
         System.out.println( "========> start " + title );
         System.out.flush();
-        
-        if( File.pathSeparatorChar == ';' )
+
+        if ( File.pathSeparatorChar == ';' )
         {
-            System.out.println( "PGP test temporarily disabled under Windows,\nbecause all
files were signed under Unix\nand SVN properties make checkout to convert EOL,\nbreaking signatures"
+ title );
+            System.out.println( "PGP test temporarily disabled under Windows,\nbecause all
files were signed under Unix\nand SVN properties make checkout to convert EOL,\nbreaking signatures"
+                + title );
             return;
         }
 
@@ -430,10 +435,11 @@
 
         assertTrue( af.exists() );
     }
+
     // -----------------------------------
     // -----------------------------------
     public void testDefaultPathId()
-    throws Exception
+        throws Exception
     {
         String title = "test-default-path-id";
         System.out.println( "========> start " + title );

Modified: maven/mercury/trunk/mercury-ant-tasks/src/test/java/org/apache/maven/mercury/ant/tasks/MercuryBootstrapTest.java
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-ant-tasks/src/test/java/org/apache/maven/mercury/ant/tasks/MercuryBootstrapTest.java?rev=744623&r1=744622&r2=744623&view=diff
==============================================================================
--- maven/mercury/trunk/mercury-ant-tasks/src/test/java/org/apache/maven/mercury/ant/tasks/MercuryBootstrapTest.java
(original)
+++ maven/mercury/trunk/mercury-ant-tasks/src/test/java/org/apache/maven/mercury/ant/tasks/MercuryBootstrapTest.java
Sun Feb 15 07:50:53 2009
@@ -37,7 +37,9 @@
     AuthenticatingTestServer _jetty;
 
     int _port;
+
     static final int DEFAULT_PORT = 22883;
+
     // -----------------------------------
     public MercuryBootstrapTest( String name )
     {
@@ -47,7 +49,7 @@
     // -----------------------------------
     @Override
     protected void setUp()
-    throws Exception
+        throws Exception
     {
         _localRepoDirFile = new File( _localRepoDir );
         FileUtil.delete( _localRepoDirFile );
@@ -64,11 +66,11 @@
 
         configureProject( "mercury.xml" );
 
-//        System.setProperty( Config.SYSTEM_PROPERTY_LOCAL_DIR_NAME, _localRepoDir );
+        // System.setProperty( Config.SYSTEM_PROPERTY_LOCAL_DIR_NAME, _localRepoDir );
         getProject().setProperty( "localRepo", _localRepoDir );
 
-//        System.setProperty( Config.SYSTEM_PROPERTY_CENTRAL_URL, _remoteRepoUrlPrefix+_port+_remoteRepoUrlSufix
);
-        getProject().setProperty( "remoteRepo", _remoteRepoUrlPrefix+_port+_remoteRepoUrlSufix
);
+        // System.setProperty( Config.SYSTEM_PROPERTY_CENTRAL_URL, _remoteRepoUrlPrefix+_port+_remoteRepoUrlSufix
);
+        getProject().setProperty( "remoteRepo", _remoteRepoUrlPrefix + _port + _remoteRepoUrlSufix
);
     }
 
     // -----------------------------------
@@ -88,7 +90,7 @@
     protected void tearDown()
         throws Exception
     {
-        if( _jetty != null )
+        if ( _jetty != null )
         {
             _jetty.stop();
             _jetty.destroy();
@@ -97,7 +99,7 @@
         }
     }
 
-    //-----------------------------------
+    // -----------------------------------
     public void testDownload()
     {
         String title = "download";
@@ -119,7 +121,7 @@
         assertTrue( a2.exists() );
     }
 
-    //-----------------------------------
+    // -----------------------------------
     public void testDownloadPom()
     {
         String title = "download-pom";
@@ -141,7 +143,7 @@
         assertTrue( a2.exists() );
     }
 
-    //-----------------------------------
+    // -----------------------------------
     public void testDownloadPomNonTransitive()
     {
         String title = "download-pom-non-transtive";
@@ -162,6 +164,6 @@
         assertTrue( a1.exists() );
         assertFalse( a2.exists() );
     }
-    //-----------------------------------
-    //-----------------------------------
+    // -----------------------------------
+    // -----------------------------------
 }



Mime
View raw message