jvanzyl     2003/12/08 10:25:27

  Modified:    maven-project/src/java/org/apache/maven/project
                        DefaultProjectBuilder.java
  Log:
  o adapting for legacy isn't the concern of the builder.
  
  Revision  Changes    Path
  1.12      +0 -68     
maven-components/maven-project/src/java/org/apache/maven/project/DefaultProjectBuilder.java
  
  Index: DefaultProjectBuilder.java
  ===================================================================
  RCS file: 
/home/cvs/maven-components/maven-project/src/java/org/apache/maven/project/DefaultProjectBuilder.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- DefaultProjectBuilder.java        8 Dec 2003 18:21:47 -0000       1.11
  +++ DefaultProjectBuilder.java        8 Dec 2003 18:25:27 -0000       1.12
  @@ -441,72 +441,4 @@
   
           return null;
       }
  -
  -    
  -
  -
  -    // ----------------------------------------------------------------------
  -    // L E G A C Y  I D  S U P P O R T
  -    // ----------------------------------------------------------------------
  -
  -    /**
  -     * This is to support methods that are using the legacy form of
  -     * the project id. Currently the id is <groupId>:<artifactId> but the
  -     * following methods assume <groupId>:
  -     *
  -     * Project::getDependencyPath( <groupId> )
  -     * Project::getDependency( <groupId> )
  -     *
  -     * We don't want users to have to alter any usage until we have properly
  -     * deprecated the use of the <groupId> form.
  -     *
  -     * @param id
  -     * @return
  -     */
  -    public static String legacyToStandardId( String id )
  -    {
  -        String newId = id;
  -        if ( id.indexOf( "+" ) != -1 )
  -        {
  -            // legacy format is groupId "+" partial artifactId
  -            // standard format is groupId ":" groupId "-" partialArtifactId
  -            int plusPos = id.indexOf( "+" );
  -            String groupId = id.substring( 0, plusPos );
  -            String partialArtifactId = id.substring( plusPos + 1 );
  -            newId = groupId + ":" + groupId + "-" + partialArtifactId;
  -        }
  -        else if ( id.indexOf( ":" ) == -1 )
  -        {
  -            newId += ":" + id;
  -        }
  -
  -        return newId;
  -    }
  -
  -    /**
  -     * This method is to support methods are expecting legacy ids. The following
  -     * methods expect legacy ids.
  -     *
  -     * MavenJellyContext::getMavenJarOverride( <groupId> )
  -     * Project::addPluginContext( <groupId>, pluginContext )
  -     * Project::getArtifactDirectory( <groupId> )
  -     *
  -     * We don't want users to have to alter any usage until we have properly
  -     * deprecated the use of the <groupId> form.
  -     *
  -     * @param id
  -     * @return
  -     */
  -    public static String standardToLegacyId( String id )
  -    {
  -        int i = id.indexOf( ":" );
  -
  -        if ( i > 0 )
  -        {
  -            id = id.substring( i + 1 );
  -        }
  -
  -        return id;
  -    }
  -
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to