maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r674969 - in /maven/sandbox/branches/SI_MAVEN_2_1/maven-project: ./ src/main/java/org/apache/maven/project/builder/ src/main/java/org/apache/maven/project/builder/impl/
Date Tue, 08 Jul 2008 21:33:59 GMT
Author: sisbell
Date: Tue Jul  8 14:33:59 2008
New Revision: 674969

URL: http://svn.apache.org/viewvc?rev=674969&view=rev
Log:
JDK 1.5 compatible.

Modified:
    maven/sandbox/branches/SI_MAVEN_2_1/maven-project/pom.xml
    maven/sandbox/branches/SI_MAVEN_2_1/maven-project/src/main/java/org/apache/maven/project/builder/PomArtifactResolver.java
    maven/sandbox/branches/SI_MAVEN_2_1/maven-project/src/main/java/org/apache/maven/project/builder/PomClassicDomainModel.java
    maven/sandbox/branches/SI_MAVEN_2_1/maven-project/src/main/java/org/apache/maven/project/builder/impl/DefaultProjectBuilder.java

Modified: maven/sandbox/branches/SI_MAVEN_2_1/maven-project/pom.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/branches/SI_MAVEN_2_1/maven-project/pom.xml?rev=674969&r1=674968&r2=674969&view=diff
==============================================================================
--- maven/sandbox/branches/SI_MAVEN_2_1/maven-project/pom.xml (original)
+++ maven/sandbox/branches/SI_MAVEN_2_1/maven-project/pom.xml Tue Jul  8 14:33:59 2008
@@ -69,13 +69,18 @@
       <artifactId>wagon-file</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.codehaus.woodstox</groupId>
+      <artifactId>wstx-asl</artifactId>
+      <version>3.2.6</version>
+    </dependency>
         <dependency>
             <groupId>org.apache.maven.shared</groupId>
             <artifactId>maven-shared-model</artifactId>
             <version>1.0-SNAPSHOT</version>
-        </dependency>            
+        </dependency>
   </dependencies>
-    <!--
+
   <build>
     <plugins>
       <plugin>
@@ -93,5 +98,5 @@
       </plugin>
     </plugins>
   </build>
-  -->
+
 </project>

Modified: maven/sandbox/branches/SI_MAVEN_2_1/maven-project/src/main/java/org/apache/maven/project/builder/PomArtifactResolver.java
URL: http://svn.apache.org/viewvc/maven/sandbox/branches/SI_MAVEN_2_1/maven-project/src/main/java/org/apache/maven/project/builder/PomArtifactResolver.java?rev=674969&r1=674968&r2=674969&view=diff
==============================================================================
--- maven/sandbox/branches/SI_MAVEN_2_1/maven-project/src/main/java/org/apache/maven/project/builder/PomArtifactResolver.java
(original)
+++ maven/sandbox/branches/SI_MAVEN_2_1/maven-project/src/main/java/org/apache/maven/project/builder/PomArtifactResolver.java
Tue Jul  8 14:33:59 2008
@@ -45,9 +45,11 @@
                     resolver.resolveAlways(artifact, remoteRepositories, localRepository);
                 }
             } catch (ArtifactNotFoundException e) {
-                throw new IOException("Parent pom not found: File = " + artifactFile.getAbsolutePath(),
e);
+                e.printStackTrace();
+                throw new IOException("Parent pom not found: File = " + artifactFile.getAbsolutePath());
             } catch (ArtifactResolutionException e) {
-                throw new IOException("Parent pom not found: File = " + artifactFile.getAbsolutePath(),
e);
+                e.printStackTrace();
+                throw new IOException("Parent pom not found: File = " + artifactFile.getAbsolutePath());
             }
         }
     }

Modified: maven/sandbox/branches/SI_MAVEN_2_1/maven-project/src/main/java/org/apache/maven/project/builder/PomClassicDomainModel.java
URL: http://svn.apache.org/viewvc/maven/sandbox/branches/SI_MAVEN_2_1/maven-project/src/main/java/org/apache/maven/project/builder/PomClassicDomainModel.java?rev=674969&r1=674968&r2=674969&view=diff
==============================================================================
--- maven/sandbox/branches/SI_MAVEN_2_1/maven-project/src/main/java/org/apache/maven/project/builder/PomClassicDomainModel.java
(original)
+++ maven/sandbox/branches/SI_MAVEN_2_1/maven-project/src/main/java/org/apache/maven/project/builder/PomClassicDomainModel.java
Tue Jul  8 14:33:59 2008
@@ -5,13 +5,11 @@
 import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
 import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
 import org.apache.maven.shared.model.InputStreamDomainModel;
-import org.apache.maven.artifact.Artifact;
 import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
 
 import java.io.*;
-import java.util.Arrays;
 
 /**
  * Provides a wrapper for the maven model.
@@ -74,12 +72,15 @@
             return new MavenXpp3Reader().read(new StringReader(new String(inputStream)));
         }
         catch (XmlPullParserException e) {
-            throw new IOException(e);
+            e.printStackTrace();
+            throw new IOException(e.getMessage());
         }
     }
 
     public InputStream getInputStream() {
-        return new ByteArrayInputStream(Arrays.copyOf(inputStream, inputStream.length));
+        byte[] copy = new byte[inputStream.length];
+        System.arraycopy(inputStream, 0, copy, 0, inputStream.length);
+        return new ByteArrayInputStream(copy);
     }
 
     public String getEventHistory() {

Modified: maven/sandbox/branches/SI_MAVEN_2_1/maven-project/src/main/java/org/apache/maven/project/builder/impl/DefaultProjectBuilder.java
URL: http://svn.apache.org/viewvc/maven/sandbox/branches/SI_MAVEN_2_1/maven-project/src/main/java/org/apache/maven/project/builder/impl/DefaultProjectBuilder.java?rev=674969&r1=674968&r2=674969&view=diff
==============================================================================
--- maven/sandbox/branches/SI_MAVEN_2_1/maven-project/src/main/java/org/apache/maven/project/builder/impl/DefaultProjectBuilder.java
(original)
+++ maven/sandbox/branches/SI_MAVEN_2_1/maven-project/src/main/java/org/apache/maven/project/builder/impl/DefaultProjectBuilder.java
Tue Jul  8 14:33:59 2008
@@ -98,7 +98,8 @@
         try {
             artifactResolver.resolve(artifactParent);
         } catch (IOException e) {
-            throw new IOException("getDomainModelFromRepository", e);
+            e.printStackTrace();
+            throw new IOException("getDomainModelFromRepository");
         }
 
         if (!artifactParent.getFile().exists()) {



Mime
View raw message