maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject cvs commit: maven-components/maven-settings pom.xml
Date Mon, 04 Apr 2005 14:35:06 GMT
brett       2005/04/04 07:35:06

  Modified:    maven-artifact/src/main/java/org/apache/maven/artifact/metadata
                        SnapshotArtifactMetadata.java
               maven-core pom.xml
               maven-mboot2 pom.xml
               maven-mboot2/src/main/java MBoot.java
               maven-mboot2/src/main/java/download ArtifactDownloader.java
               maven-mboot2/src/main/java/model Dependency.java
                        ModelReader.java
               maven-mboot2/src/main/java/util AbstractReader.java
               maven-plugin pom.xml
               maven-plugin-tools/maven-plugin-tools-marmalade pom.xml
               maven-script/maven-script-marmalade pom.xml
               maven-settings pom.xml
  Added:       maven-mboot2/src/main/java/download
                        DownloadFailedException.java
  Log:
  transitive deps in mboot. Will now proceed to trim up the POMs. Still need to trim ~/maven2/lib
also.
  
  Revision  Changes    Path
  1.12      +8 -1      maven-components/maven-artifact/src/main/java/org/apache/maven/artifact/metadata/SnapshotArtifactMetadata.java
  
  Index: SnapshotArtifactMetadata.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-artifact/src/main/java/org/apache/maven/artifact/metadata/SnapshotArtifactMetadata.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- SnapshotArtifactMetadata.java	31 Mar 2005 11:31:12 -0000	1.11
  +++ SnapshotArtifactMetadata.java	4 Apr 2005 14:35:06 -0000	1.12
  @@ -169,6 +169,13 @@
           String version = FileUtils.fileRead( file );
           lastModified = file.lastModified();
   
  +/* TODO: try this
  +        if( version.matches( "/^(.*)-([0-9]{8}.[0-9]{6})-([0-9]+)$/" ))
  +        {
  +
  +        }
  +*/
  +
           int index = version.lastIndexOf( "-" );
           if ( version.indexOf( "SNAPSHOT" ) >= 0 || index < 0 )
           {
  
  
  
  1.25      +2 -2      maven-components/maven-core/pom.xml
  
  Index: pom.xml
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/pom.xml,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- pom.xml	1 Apr 2005 16:03:42 -0000	1.24
  +++ pom.xml	4 Apr 2005 14:35:06 -0000	1.25
  @@ -84,7 +84,7 @@
       <dependency>
         <groupId>plexus</groupId>
         <artifactId>plexus-marmalade-factory</artifactId>
  -      <version>1.0-alpha-2-SNAPSHOT</version>
  +      <version>1.0-alpha-2</version>
         <type>jar</type>
         <scope>compile</scope>
       </dependency>
  @@ -98,7 +98,7 @@
       <dependency>
         <groupId>marmalade</groupId>
         <artifactId>marmalade-core</artifactId>
  -      <version>1.0-alpha2-SNAPSHOT</version>
  +      <version>1.0-alpha2</version>
         <type>jar</type>
         <scope>compile</scope>
       </dependency>
  
  
  
  1.9       +0 -18     maven-components/maven-mboot2/pom.xml
  
  Index: pom.xml
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-mboot2/pom.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- pom.xml	4 Apr 2005 05:23:01 -0000	1.8
  +++ pom.xml	4 Apr 2005 14:35:06 -0000	1.9
  @@ -13,24 +13,6 @@
     <dependencies>
       <dependency>
         <groupId>org.codehaus.modello</groupId>
  -      <artifactId>modello-core</artifactId>
  -      <version>1.0-alpha-1</version>
  -      <scope>runtime</scope>
  -    </dependency>
  -    <dependency>
  -      <groupId>org.codehaus.modello</groupId>
  -      <artifactId>modello-xdoc-plugin</artifactId>
  -      <version>1.0-alpha-1</version>
  -      <scope>runtime</scope>
  -    </dependency>
  -    <dependency>
  -      <groupId>org.codehaus.modello</groupId>
  -      <artifactId>modello-xml-plugin</artifactId>
  -      <version>1.0-alpha-1</version>
  -      <scope>runtime</scope>
  -    </dependency>
  -    <dependency>
  -      <groupId>org.codehaus.modello</groupId>
         <artifactId>modello-xpp3-plugin</artifactId>
         <version>1.0-alpha-1</version>
         <scope>runtime</scope>
  
  
  
  1.91      +19 -23    maven-components/maven-mboot2/src/main/java/MBoot.java
  
  Index: MBoot.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-mboot2/src/main/java/MBoot.java,v
  retrieving revision 1.90
  retrieving revision 1.91
  diff -u -r1.90 -r1.91
  --- MBoot.java	4 Apr 2005 06:47:21 -0000	1.90
  +++ MBoot.java	4 Apr 2005 14:35:06 -0000	1.91
  @@ -25,6 +25,7 @@
   import java.lang.reflect.Method;
   import java.util.ArrayList;
   import java.util.Arrays;
  +import java.util.Collection;
   import java.util.Collections;
   import java.util.Date;
   import java.util.Iterator;
  @@ -242,11 +243,9 @@
   
           Repository localRepository = new Repository( mavenRepoLocal, Repository.LAYOUT_DEFAULT
);
   
  -        ModelReader reader = new ModelReader( localRepository );
  -
           if ( online )
           {
  -            downloader = new ArtifactDownloader( localRepository, reader.getRemoteRepositories()
);
  +            downloader = new ArtifactDownloader( localRepository, Collections.EMPTY_LIST
);
               if ( userModelReader.getActiveProxy() != null )
               {
                   Proxy proxy = userModelReader.getActiveProxy();
  @@ -271,14 +270,14 @@
           // Install it-support POM
           installPomFile( localRepository, new File( basedir, "maven-core-it-support/pom.xml"
) );
   
  -        reader = new ModelReader( localRepository );
  +        ModelReader reader = new ModelReader( downloader, true );
   
           reader.parse( new File( basedir, "maven-mboot2/pom.xml" ) );
   
           ClassLoader bootstrapClassLoader = createClassloaderFromDependencies( reader.getDependencies(),
null,
                                                                                 localRepository
);
   
  -        reader = new ModelReader( localRepository );
  +        reader = new ModelReader( downloader, true );
           reader.parse( new File( basedir, "maven-plugins/maven-surefire-plugin/pom.xml"
) );
           List surefireDependencies = new ArrayList();
   
  @@ -297,9 +296,9 @@
               downloader.downloadDependencies( surefireDependencies );
           }
   
  -        reader = new ModelReader( localRepository );
  +        reader = new ModelReader( downloader, true );
   
  -        List coreDeps = null;
  +        Collection coreDeps = null;
           Dependency corePom = null;
   
           for ( int i = 0; i < builds.length; i++ )
  @@ -324,7 +323,7 @@
               System.out.println( "--------------------------------------------------------------------"
);
           }
   
  -        reader = new ModelReader( localRepository );
  +        reader = new ModelReader( downloader, true );
           reader.parse( new File( basedir, "maven-plugin-tools/maven-plugin-tools-pluggy/pom.xml"
) );
           List dependencies = new ArrayList( reader.getDependencies() );
           dependencies.add(
  @@ -394,6 +393,7 @@
           // lib
           // ----------------------------------------------------------------------
   
  +        // TODO: check this - we are transitively including in /lib...
           File lib = new File( dist, "lib" );
   
           lib.mkdirs();
  @@ -411,8 +411,9 @@
               {
                   FileUtils.copyFileToDirectory( source, core );
               }
  -            else
  +            else if ( !d.getScope().equals( SCOPE_TEST ) && !d.getArtifactId().equals(
"plexus-utils" ) )
               {
  +                // only compile and runtime
                   FileUtils.copyFileToDirectory( source, lib );
               }
           }
  @@ -465,7 +466,7 @@
       {
           System.out.println( "Building project in " + basedir );
   
  -        ModelReader reader = new ModelReader( localRepository );
  +        ModelReader reader = new ModelReader( downloader, true );
   
           reader.parse( new File( basedir, "pom.xml" ) );
   
  @@ -483,8 +484,6 @@
   
           String generatedSources = new File( basedir, GENERATED_SOURCES ).getAbsolutePath();
   
  -        String generatedDocs = new File( basedir, GENERATED_DOCS ).getAbsolutePath();
  -
           File buildDirFile = new File( basedir, BUILD_DIR );
           String buildDir = buildDirFile.getAbsolutePath();
   
  @@ -546,7 +545,6 @@
                                classLoader );
               generateSources( model.getAbsolutePath(), "xpp3-writer", generatedSources,
modelVersion, "false",
                                classLoader );
  -            generateSources( model.getAbsolutePath(), "xdoc", generatedDocs, modelVersion,
"false", classLoader );
           }
   
           // ----------------------------------------------------------------------
  @@ -591,7 +589,7 @@
   
           System.out.println( "Compiling test sources ..." );
   
  -        List testDependencies = reader.getDependencies();
  +        Collection testDependencies = reader.getDependencies();
   
           compile( testDependencies, testSources, testClasses, classes, null, SCOPE_TEST,
localRepository );
   
  @@ -666,7 +664,7 @@
           Thread.currentThread().setContextClassLoader( old );
       }
   
  -    private IsolatedClassLoader createClassloaderFromDependencies( List dependencies, ClassLoader
parent,
  +    private IsolatedClassLoader createClassloaderFromDependencies( Collection dependencies,
ClassLoader parent,
                                                                      Repository localRepository
)
           throws Exception
       {
  @@ -719,7 +717,7 @@
       private void installPomFile( Repository localRepository, File pomIn )
           throws Exception
       {
  -        ModelReader reader = new ModelReader( localRepository );
  +        ModelReader reader = new ModelReader( downloader, false );
   
           reader.parse( pomIn );
   
  @@ -814,13 +812,13 @@
       // Compile
       // ----------------------------------------------------------------------
   
  -    private List classpath( List dependencies, String extraClasspath, String scope, Repository
localRepository )
  +    private List classpath( Collection dependencies, String extraClasspath, String scope,
Repository localRepository )
       {
           List classpath = new ArrayList( dependencies.size() + 1 );
   
  -        for ( int i = 0; i < dependencies.size(); i++ )
  +        for ( Iterator i = dependencies.iterator(); i.hasNext(); )
           {
  -            Dependency d = (Dependency) dependencies.get( i );
  +            Dependency d = (Dependency) i.next();
   
               String element = localRepository.getArtifactFile( d ).getAbsolutePath();
   
  @@ -849,8 +847,8 @@
           return classpath;
       }
   
  -    private void compile( List dependencies, String sourceDirectory, String outputDirectory,
String extraClasspath,
  -                          String generatedSources, String scope, Repository localRepository
)
  +    private void compile( Collection dependencies, String sourceDirectory, String outputDirectory,
  +                          String extraClasspath, String generatedSources, String scope,
Repository localRepository )
           throws Exception
       {
           JavacCompiler compiler = new JavacCompiler();
  @@ -874,7 +872,6 @@
           {
               if ( new File( sourceDirectory ).exists() )
               {
  -
                   sourceDirectories = new String[]{sourceDirectory};
               }
           }
  @@ -882,7 +879,6 @@
           if ( sourceDirectories != null )
           {
               CompilerConfiguration compilerConfiguration = new CompilerConfiguration();
  -
               compilerConfiguration.setOutputLocation( outputDirectory );
               compilerConfiguration.setClasspathEntries(
                   classpath( dependencies, extraClasspath, scope, localRepository ) );
  
  
  
  1.10      +11 -5     maven-components/maven-mboot2/src/main/java/download/ArtifactDownloader.java
  
  Index: ArtifactDownloader.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-mboot2/src/main/java/download/ArtifactDownloader.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ArtifactDownloader.java	4 Apr 2005 06:47:21 -0000	1.9
  +++ ArtifactDownloader.java	4 Apr 2005 14:35:06 -0000	1.10
  @@ -10,6 +10,7 @@
   import java.util.Iterator;
   import java.util.List;
   import java.util.Set;
  +import java.util.Collection;
   
   public class ArtifactDownloader
   {
  @@ -60,14 +61,14 @@
           System.out.println( "Using the following proxy : " + proxyHost + "/" + proxyPort
);
       }
   
  -    public void downloadDependencies( List dependencies )
  -        throws Exception
  +    public void downloadDependencies( Collection dependencies )
  +        throws DownloadFailedException
       {
           for ( Iterator j = dependencies.iterator(); j.hasNext(); )
           {
               Dependency dep = (Dependency) j.next();
   
  -            if ( !downloadedArtifacts.contains( dep.getId() ) )
  +            if ( !downloadedArtifacts.contains( dep ) )
               {
                   File destinationFile = localRepository.getArtifactFile( dep );
                   // The directory structure for this project may
  @@ -94,10 +95,10 @@
   
                   if ( !destinationFile.exists() )
                   {
  -                    throw new Exception( "Failed to download " + dep );
  +                    throw new DownloadFailedException( "Failed to download " + dep );
                   }
   
  -                downloadedArtifacts.add( dep.getId() );
  +                downloadedArtifacts.add( dep );
               }
           }
       }
  @@ -209,4 +210,9 @@
       {
           System.out.println( message );
       }
  +
  +    public Repository getLocalRepository()
  +    {
  +        return localRepository;
  +    }
   }
  
  
  
  1.1                  maven-components/maven-mboot2/src/main/java/download/DownloadFailedException.java
  
  Index: DownloadFailedException.java
  ===================================================================
  package download;
  
  /*
   * Copyright 2001-2005 The Apache Software Foundation.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   * 
   *      http://www.apache.org/licenses/LICENSE-2.0
   * 
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  /**
   * Failed download.
   *
   * @author <a href="mailto:brett@apache.org">Brett Porter</a>
   * @version $Id: DownloadFailedException.java,v 1.1 2005/04/04 14:35:06 brett Exp $
   */
  public class DownloadFailedException extends Exception
  {
      public DownloadFailedException( String message )
      {
          super( message );
      }
  }
  
  
  
  1.7       +49 -1     maven-components/maven-mboot2/src/main/java/model/Dependency.java
  
  Index: Dependency.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-mboot2/src/main/java/model/Dependency.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Dependency.java	4 Apr 2005 05:23:01 -0000	1.6
  +++ Dependency.java	4 Apr 2005 14:35:06 -0000	1.7
  @@ -199,4 +199,52 @@
       {
           return getId() + ":" + getVersion() + ":" + getType();
       }
  +
  +    public int hashCode()
  +    {
  +        int result = 17;
  +        result = 37 * result + groupId.hashCode();
  +        result = 37 * result + artifactId.hashCode();
  +        result = 37 * result + type.hashCode();
  +        result = 37 * result + version.hashCode();
  +        return result;
  +    }
  +
  +    public boolean equals( Object o )
  +    {
  +        if ( o == this )
  +        {
  +            return true;
  +        }
  +
  +        if ( !( o instanceof Dependency ) )
  +        {
  +            return false;
  +        }
  +
  +        Dependency d = (Dependency) o;
  +
  +        if ( !d.getGroupId().equals( groupId ) )
  +        {
  +            return false;
  +        }
  +        else if ( !d.getArtifactId().equals( artifactId ) )
  +        {
  +            return false;
  +        }
  +        else if ( !d.getVersion().equals( version ) )
  +        {
  +            return false;
  +        }
  +        else if ( !d.getType().equals( type ) )
  +        {
  +            return false;
  +        }
  +        return true;
  +    }
  +
  +    public String getConflictId()
  +    {
  +        return getGroupId() + ":" + getArtifactId() + ":" + getType();
  +    }
   }
  
  
  
  1.5       +118 -24   maven-components/maven-mboot2/src/main/java/model/ModelReader.java
  
  Index: ModelReader.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-mboot2/src/main/java/model/ModelReader.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ModelReader.java	4 Apr 2005 05:23:01 -0000	1.4
  +++ ModelReader.java	4 Apr 2005 14:35:06 -0000	1.5
  @@ -16,6 +16,8 @@
    * limitations under the License.
    */
   
  +import download.ArtifactDownloader;
  +import download.DownloadFailedException;
   import org.xml.sax.Attributes;
   import org.xml.sax.SAXException;
   import util.AbstractReader;
  @@ -23,7 +25,14 @@
   import javax.xml.parsers.ParserConfigurationException;
   import java.io.IOException;
   import java.util.ArrayList;
  +import java.util.Collection;
  +import java.util.Collections;
  +import java.util.HashMap;
  +import java.util.HashSet;
  +import java.util.Iterator;
   import java.util.List;
  +import java.util.Map;
  +import java.util.Set;
   
   /**
    * Parse a POM.
  @@ -49,7 +58,7 @@
   
       private String parentVersion;
   
  -    private List dependencies = new ArrayList();
  +    private Map dependencies = new HashMap();
   
       private List repositories = new ArrayList();
   
  @@ -71,13 +80,23 @@
   
       private StringBuffer bodyText = new StringBuffer();
   
  -    private final Repository localRepository;
  +    private final boolean resolveTransitiveDependencies;
   
       private Repository currentRepository;
   
  -    public ModelReader( Repository downloader )
  +    private final ArtifactDownloader downloader;
  +
  +    private static Set inProgress = new HashSet();
  +
  +    private Map parentDependencies = new HashMap();
  +
  +    private Map transitiveDependencies = new HashMap();
  +
  +    public ModelReader( ArtifactDownloader downloader, boolean resolveTransitiveDependencies
)
       {
  -        this.localRepository = downloader;
  +        this.downloader = downloader;
  +
  +        this.resolveTransitiveDependencies = resolveTransitiveDependencies;
       }
   
       public List getRemoteRepositories()
  @@ -85,9 +104,13 @@
           return repositories;
       }
   
  -    public List getDependencies()
  +    public Collection getDependencies()
       {
  -        return dependencies;
  +        Map m = new HashMap();
  +        m.putAll( transitiveDependencies );
  +        m.putAll( parentDependencies );
  +        m.putAll( dependencies );
  +        return m.values();
       }
   
       public List getResources()
  @@ -169,22 +192,10 @@
                   version = parentVersion;
               }
   
  -            ModelReader p = new ModelReader( localRepository );
  -
  -            try
  -            {
  -                p.parse( localRepository.getArtifactFile( parentGroupId, parentArtifactId,
parentVersion, "pom" ) );
  -            }
  -            catch ( ParserConfigurationException e )
  -            {
  -                throw new SAXException( "Error getting parent POM", e );
  -            }
  -            catch ( IOException e )
  -            {
  -                throw new SAXException( "Error getting parent POM", e );
  -            }
  +            // actually, these should be transtive (see MNG-77) - but some projects have
circular deps that way (marmalade, and currently m2)
  +            ModelReader p = retrievePom( parentGroupId, parentArtifactId, parentVersion,
false );
   
  -            dependencies.addAll( p.getDependencies() );
  +            addDependencies( p.getDependencies(), parentDependencies );
   
               resources.addAll( p.getResources() );
   
  @@ -192,9 +203,19 @@
           }
           else if ( rawName.equals( "dependency" ) )
           {
  -            dependencies.add( currentDependency );
  -
               insideDependency = false;
  +
  +            if ( !hasDependency( currentDependency, dependencies ) )
  +            {
  +                if ( resolveTransitiveDependencies )
  +                {
  +                    ModelReader p = retrievePom( currentDependency.getGroupId(), currentDependency.getArtifactId(),
  +                                                 currentDependency.getVersion(), resolveTransitiveDependencies
);
  +
  +                    addDependencies( p.getDependencies(), transitiveDependencies );
  +                }
  +            }
  +            dependencies.put( currentDependency.getConflictId(), currentDependency );
           }
           else if ( rawName.equals( "resource" ) )
           {
  @@ -311,6 +332,79 @@
           depth--;
       }
   
  +    private void addDependencies( Collection dependencies, Map target )
  +    {
  +        for ( Iterator i = dependencies.iterator(); i.hasNext(); )
  +        {
  +            Dependency d = (Dependency) i.next();
  +
  +            if ( !hasDependency( d, target ) )
  +            {
  +                target.put( d.getConflictId(), d );
  +            }
  +        }
  +    }
  +
  +    private boolean hasDependency( Dependency d, Map dependencies )
  +    {
  +        String conflictId = d.getConflictId();
  +        if ( dependencies.containsKey( conflictId ) )
  +        {
  +            // We only care about pushing in compile scope dependencies I think
  +            // if not, we'll need to be able to get the original and pick the appropriate
scope
  +            if ( d.getScope().equals( "compile" ) )
  +            {
  +                dependencies.remove( conflictId );
  +            }
  +            else
  +            {
  +                return true;
  +            }
  +        }
  +        return false;
  +    }
  +
  +    private ModelReader retrievePom( String groupId, String artifactId, String version,
  +                                     boolean resolveTransitiveDependencies )
  +        throws SAXException
  +    {
  +        String key = groupId + ":" + artifactId + ":" + version;
  +
  +        if ( inProgress.contains( key ) )
  +        {
  +            throw new SAXException( "Circular dependency found, looking for " + key + "\nIn
progress:" + inProgress );
  +        }
  +
  +        inProgress.add( key );
  +
  +        ModelReader p = new ModelReader( downloader, resolveTransitiveDependencies );
  +
  +        try
  +        {
  +            Dependency pom = new Dependency( groupId, artifactId, version, "pom" );
  +            downloader.downloadDependencies( Collections.singletonList( pom ) );
  +
  +            Repository localRepository = downloader.getLocalRepository();
  +            p.parse( localRepository.getArtifactFile( pom ) );
  +        }
  +        catch ( IOException e )
  +        {
  +            throw new SAXException( "Error getting parent POM", e );
  +        }
  +        catch ( ParserConfigurationException e )
  +        {
  +            throw new SAXException( "Error getting parent POM", e );
  +        }
  +        catch ( DownloadFailedException e )
  +        {
  +            throw new SAXException( "Error getting parent POM", e );
  +        }
  +
  +        inProgress.remove( key );
  +
  +        return p;
  +    }
  +
       public String getArtifactId()
       {
           return artifactId;
  
  
  
  1.3       +13 -2     maven-components/maven-mboot2/src/main/java/util/AbstractReader.java
  
  Index: AbstractReader.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-mboot2/src/main/java/util/AbstractReader.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractReader.java	4 Apr 2005 05:23:01 -0000	1.2
  +++ AbstractReader.java	4 Apr 2005 14:35:06 -0000	1.3
  @@ -19,6 +19,7 @@
   import org.xml.sax.InputSource;
   import org.xml.sax.SAXException;
   import org.xml.sax.SAXParseException;
  +import org.xml.sax.ext.LexicalHandler;
   import org.xml.sax.helpers.DefaultHandler;
   
   import javax.xml.parsers.ParserConfigurationException;
  @@ -27,6 +28,10 @@
   import java.io.File;
   import java.io.FileInputStream;
   import java.io.IOException;
  +import java.io.StringWriter;
  +import java.io.FileReader;
  +import java.io.StringReader;
  +import java.util.Arrays;
   
   /**
    * Parse an XML file.
  @@ -45,7 +50,13 @@
   
           SAXParser parser = saxFactory.newSAXParser();
   
  -        InputSource is = new InputSource( new FileInputStream( file ) );
  +        // Cheap and cheerful. Please add more to skip if the parser chokes (or use the
actual
  +        StringWriter output = new StringWriter();
  +        IOUtil.copy( new FileReader( file ), output);
  +        String out = output.toString();
  +        out = StringUtils.replace( out, "&oslash;", "\u00f8" );
  +
  +        InputSource is = new InputSource( new StringReader( out ) );
   
           parser.parse( is, this );
       }
  
  
  
  1.8       +5 -0      maven-components/maven-plugin/pom.xml
  
  Index: pom.xml
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-plugin/pom.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- pom.xml	23 Mar 2005 06:52:54 -0000	1.7
  +++ pom.xml	4 Apr 2005 14:35:06 -0000	1.8
  @@ -11,6 +11,11 @@
     <version>2.0-SNAPSHOT</version>
     <dependencies>
       <dependency>
  +      <groupId>plexus</groupId>
  +      <artifactId>plexus-container-default</artifactId>
  +      <version>1.0-alpha-2</version>
  +    </dependency>
  +    <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-monitor</artifactId>
         <version>2.0-SNAPSHOT</version>
  
  
  
  1.12      +2 -2      maven-components/maven-plugin-tools/maven-plugin-tools-marmalade/pom.xml
  
  Index: pom.xml
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-plugin-tools/maven-plugin-tools-marmalade/pom.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- pom.xml	1 Apr 2005 16:03:42 -0000	1.11
  +++ pom.xml	4 Apr 2005 14:35:06 -0000	1.12
  @@ -27,7 +27,7 @@
       <dependency>
         <groupId>marmalade</groupId>
         <artifactId>marmalade-core</artifactId>
  -      <version>1.0-alpha2-SNAPSHOT</version>
  +      <version>1.0-alpha2</version>
         <type>jar</type>
         <scope>compile</scope>
       </dependency>
  @@ -97,7 +97,7 @@
       <dependency>
         <groupId>plexus</groupId>
         <artifactId>plexus-marmalade-factory</artifactId>
  -      <version>1.0-alpha-2-SNAPSHOT</version>
  +      <version>1.0-alpha-2</version>
         <type>jar</type>
         <scope>compile</scope>
       </dependency>
  
  
  
  1.6       +2 -2      maven-components/maven-script/maven-script-marmalade/pom.xml
  
  Index: pom.xml
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-script/maven-script-marmalade/pom.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- pom.xml	23 Mar 2005 06:52:54 -0000	1.5
  +++ pom.xml	4 Apr 2005 14:35:06 -0000	1.6
  @@ -28,14 +28,14 @@
       <dependency>
         <groupId>marmalade</groupId>
         <artifactId>marmalade-core</artifactId>
  -      <version>1.0-alpha2-SNAPSHOT</version>
  +      <version>1.0-alpha2</version>
         <type>jar</type>
         <scope>compile</scope>
       </dependency>
       <dependency>
         <groupId>plexus</groupId>
         <artifactId>plexus-marmalade-factory</artifactId>
  -      <version>1.0-alpha-2-SNAPSHOT</version>
  +      <version>1.0-alpha-2</version>
         <type>jar</type>
         <scope>compile</scope>
       </dependency>
  
  
  
  1.4       +7 -0      maven-components/maven-settings/pom.xml
  
  Index: pom.xml
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-settings/pom.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- pom.xml	23 Mar 2005 06:52:55 -0000	1.3
  +++ pom.xml	4 Apr 2005 14:35:06 -0000	1.4
  @@ -8,6 +8,13 @@
     <artifactId>maven-settings</artifactId>
     <version>2.0-SNAPSHOT</version>
     <name>Maven Local Settings Model</name>
  +  <dependencies>
  +    <dependency>
  +      <groupId>plexus</groupId>
  +      <artifactId>plexus-utils</artifactId>
  +      <version>1.0-alpha-2</version>
  +    </dependency>
  +  </dependencies>
     <build>
       <plugins>
         <plugin>
  
  
  

Mime
View raw message