You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2005/11/16 04:23:28 UTC

svn commit: r344861 - in /maven/components/trunk/bootstrap: ./ bootstrap-installer/ bootstrap-installer/src/main/java/org/apache/maven/bootstrap/installer/ bootstrap-installer/src/main/resources/META-INF/ bootstrap-mini/src/main/java/org/apache/maven/b...

Author: brett
Date: Tue Nov 15 19:23:18 2005
New Revision: 344861

URL: http://svn.apache.org/viewcvs?rev=344861&view=rev
Log:
make script executable

Modified:
    maven/components/trunk/bootstrap/bootstrap-installer/pom.xml
    maven/components/trunk/bootstrap/bootstrap-installer/src/main/java/org/apache/maven/bootstrap/installer/BootstrapInstaller.java
    maven/components/trunk/bootstrap/bootstrap-installer/src/main/resources/META-INF/MANIFEST.MF
    maven/components/trunk/bootstrap/bootstrap-mini/src/main/java/org/apache/maven/bootstrap/Bootstrap.java
    maven/components/trunk/bootstrap/bootstrap.sh

Modified: maven/components/trunk/bootstrap/bootstrap-installer/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/bootstrap/bootstrap-installer/pom.xml?rev=344861&r1=344860&r2=344861&view=diff
==============================================================================
--- maven/components/trunk/bootstrap/bootstrap-installer/pom.xml (original)
+++ maven/components/trunk/bootstrap/bootstrap-installer/pom.xml Tue Nov 15 19:23:18 2005
@@ -12,5 +12,10 @@
       <artifactId>bootstrap-mini</artifactId>
       <version>2.0.1-SNAPSHOT</version>
     </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+      <version>1.0.4</version>
+    </dependency>
   </dependencies>
 </project>

Modified: maven/components/trunk/bootstrap/bootstrap-installer/src/main/java/org/apache/maven/bootstrap/installer/BootstrapInstaller.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/bootstrap/bootstrap-installer/src/main/java/org/apache/maven/bootstrap/installer/BootstrapInstaller.java?rev=344861&r1=344860&r2=344861&view=diff
==============================================================================
--- maven/components/trunk/bootstrap/bootstrap-installer/src/main/java/org/apache/maven/bootstrap/installer/BootstrapInstaller.java (original)
+++ maven/components/trunk/bootstrap/bootstrap-installer/src/main/java/org/apache/maven/bootstrap/installer/BootstrapInstaller.java Tue Nov 15 19:23:18 2005
@@ -20,6 +20,9 @@
 import org.apache.maven.bootstrap.model.ModelReader;
 import org.apache.maven.bootstrap.util.FileUtils;
 import org.apache.maven.bootstrap.Bootstrap;
+import org.codehaus.plexus.util.Os;
+import org.codehaus.plexus.util.cli.Commandline;
+import org.codehaus.plexus.util.cli.CommandLineException;
 
 import java.io.File;
 import java.io.IOException;
@@ -71,7 +74,7 @@
     }
 
     private void createInstallation( File dir )
-        throws IOException
+        throws IOException, CommandLineException, InterruptedException
     {
         FileUtils.deleteDirectory( dir );
 
@@ -117,5 +120,18 @@
         File srcBinDirectory = new File( reader.getProjectFile().getParentFile(), "src/bin" );
 
         FileUtils.copyDirectory( srcBinDirectory, binDirectory, null, "**/.svn/**" );
+
+        if ( Os.isFamily( "unix" ) )
+        {
+            Commandline cli = new Commandline();
+
+            cli.setExecutable( "chmod" );
+
+            cli.createArgument().setValue( "+x" );
+
+            cli.createArgument().setValue( new File( binDirectory, "mvn" ).getAbsolutePath() );
+
+            cli.execute().waitFor();
+        }
     }
 }

Modified: maven/components/trunk/bootstrap/bootstrap-installer/src/main/resources/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewcvs/maven/components/trunk/bootstrap/bootstrap-installer/src/main/resources/META-INF/MANIFEST.MF?rev=344861&r1=344860&r2=344861&view=diff
==============================================================================
--- maven/components/trunk/bootstrap/bootstrap-installer/src/main/resources/META-INF/MANIFEST.MF (original)
+++ maven/components/trunk/bootstrap/bootstrap-installer/src/main/resources/META-INF/MANIFEST.MF Tue Nov 15 19:23:18 2005
@@ -1,2 +1,3 @@
 Manifest-Version: 1.0
 Main-Class: org.apache.maven.bootstrap.installer.BootstrapInstaller
+Class-Path: bootstrap-mini-2.0.1-SNAPSHOT.jar plexus-utils-1.0.4.jar

Modified: maven/components/trunk/bootstrap/bootstrap-mini/src/main/java/org/apache/maven/bootstrap/Bootstrap.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/bootstrap/bootstrap-mini/src/main/java/org/apache/maven/bootstrap/Bootstrap.java?rev=344861&r1=344860&r2=344861&view=diff
==============================================================================
--- maven/components/trunk/bootstrap/bootstrap-mini/src/main/java/org/apache/maven/bootstrap/Bootstrap.java (original)
+++ maven/components/trunk/bootstrap/bootstrap-mini/src/main/java/org/apache/maven/bootstrap/Bootstrap.java Tue Nov 15 19:23:18 2005
@@ -138,16 +138,20 @@
 
         String basedir = System.getProperty( "user.dir" );
 
+        File pom = new File( basedir, "pom.xml" );
+        ModelReader reader = readModel( resolver, pom, true );
+        File jar = buildProject( reader );
+
         if ( "install".equals( goal ) )
         {
-            File pom = new File( basedir, "pom.xml" );
-            ModelReader reader = readModel( resolver, pom, true );
-            File jar = buildProject( reader );
             install( reader, pom, jar );
         }
-        else
+
+        for ( Iterator i = reader.getDependencies().iterator(); i.hasNext(); )
         {
-            buildProject( new File( basedir ), false );
+            Dependency dep = (Dependency) i.next();
+
+            FileUtils.copyFileToDirectory( resolver.getArtifactFile( dep ), jar.getParentFile() );
         }
 
         stats( fullStart, new Date() );

Modified: maven/components/trunk/bootstrap/bootstrap.sh
URL: http://svn.apache.org/viewcvs/maven/components/trunk/bootstrap/bootstrap.sh?rev=344861&r1=344860&r2=344861&view=diff
==============================================================================
--- maven/components/trunk/bootstrap/bootstrap.sh (original)
+++ maven/components/trunk/bootstrap/bootstrap.sh Tue Nov 15 19:23:18 2005
@@ -17,6 +17,6 @@
 
 (
   cd ..
-  java -classpath bootstrap/bootstrap-installer/target/bootstrap-installer-2.0.1-SNAPSHOT.jar:bootstrap/bootstrap-mini/target/bootstrap-mini-2.0.1-SNAPSHOT.jar org.apache.maven.bootstrap.installer.BootstrapInstaller
+  java -jar bootstrap/bootstrap-installer/target/bootstrap-installer-2.0.1-SNAPSHOT.jar
 )