maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mic...@apache.org
Subject cvs commit: maven-components/maven-core/src/main/java/org/apache/maven/artifact/deployer DefaultArtifactDeployer.java
Date Tue, 22 Jun 2004 19:15:08 GMT
michal      2004/06/22 12:15:08

  Modified:    maven-core/src/main/java/org/apache/maven/artifact/deployer
                        DefaultArtifactDeployer.java
  Log:
  reorganization of some elements of POM
  
  Revision  Changes    Path
  1.3       +12 -27    maven-components/maven-core/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java
  
  Index: DefaultArtifactDeployer.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultArtifactDeployer.java	20 Jun 2004 18:14:57 -0000	1.2
  +++ DefaultArtifactDeployer.java	22 Jun 2004 19:15:08 -0000	1.3
  @@ -51,46 +51,31 @@
               }
   
   
  -            String host = distributionManagement.getHost();
  -
  -            if ( host == null )
  +            if ( distributionManagement.getRepository()  == null )
               {
  -                String msg = "host element is missing in the POM: "
  +                String msg = "distributionManagment/repository element is missing in the
POM: "
                           + project.getId();
   
  +                throw new Exception( msg );
  +
               }
   
  +            String url = distributionManagement.getRepository().getUrl();
   
  -            String directory = distributionManagement.getDirectory();
  +            String id =  distributionManagement.getRepository().getUrl();
   
  -            if ( directory == null )
  +            if ( url == null )
               {
  -                String msg = "directory element is missing in the POM: "
  +                String msg = "distributionManagment/repository/url element is missing in
the POM: "
                           + project.getId();
   
  -            }
  -
  -
  -
  -            String protocol = PathUtils.protocol(  host );
  +                throw new Exception( msg );
   
  -            wagon = wagonManager.getWagon( protocol  );
  -
  -            Repository repository = new Repository();
  -
  -            String url;
  -
  -            if ( host.endsWith( "/"  ) )
  -            {
  -                 url = host + directory;
               }
   
  -            else
  -            {
  -               url = host + "/"  +directory;
  -            }
  +            Repository repository = new Repository( id, url  );
   
  -            repository.setUrl( url );
  +            wagon = wagonManager.getWagon( repository.getProtocol() );
   
               wagon.connect( repository );
   
  
  
  

Mime
View raw message