jvanzyl     2004/01/30 21:28:06

  Modified:    maven-mboot build
               maven-mboot/src/bash maven.functions
  Added:       maven-mboot/src/bash deps
  Log:
  o using wget for the initial build to grab the things required by mboot
    itself which are junit and surefire.
  
  o added a little deps file for use in the bash functions.
  
  Revision  Changes    Path
  1.7       +3 -15     maven-components/maven-mboot/build
  
  Index: build
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-mboot/build,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- build     20 Jan 2004 08:53:38 -0000      1.6
  +++ build     31 Jan 2004 05:28:06 -0000      1.7
  @@ -4,23 +4,11 @@
   
   . src/bash/maven.functions
   
  -mkdir -p target/src
  +downloadMBootDependencies
   
  -cp src/main/ArtifactDownloader.java src/main/HttpUtils.java target/src
  +createMBootClasspath
   
  -compile . target/classes target/src
  -
  -runJava target/classes ArtifactDownloader junit/jars/junit-3.8.1.jar
  -runJava target/classes ArtifactDownloader maven/jars/surefire-runner-1.0.jar
  -runJava target/classes ArtifactDownloader plexus/jars/plexus-utils-1.0-beta-1.jar
  -
  -repoLocal=`cat bootstrap.repo`
  -
  -if $cygwin = true; then
  -  repoLocal=`cygpath -pu "$repoLocal"`
  -fi
  -
  -compile 
".:$repoLocal/junit/jars/junit-3.8.1.jar:$repoLocal/maven/jars/surefire-runner-1.0.jar:$repoLocal/plexus/jars/plexus-utils-1.0-beta-1.jar"
 target/classes src/main
  +compile ".:$MBOOT_CP" target/classes src/main
   
   isCommandSuccessful $? "Failed compiling Maven bootstrapper classes!"
   
  
  
  
  1.18      +52 -7     maven-components/maven-mboot/src/bash/maven.functions
  
  Index: maven.functions
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-mboot/src/bash/maven.functions,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- maven.functions   31 Jan 2004 03:13:03 -0000      1.17
  +++ maven.functions   31 Jan 2004 05:28:06 -0000      1.18
  @@ -5,6 +5,50 @@
   # @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
   # -----------------------------------------------------------------------------
   
  +downloadMBootDependencies()
  +{
  +  findAndSetMavenRepoLocal()
  +  
  +  for i in `cat ${MBOOT_HOME}/bash/deps`
  +  do
  +    if [ ! -f $repoLocal/$i ]
  +    then
  +      mkdir -p $repoLocal/$i > /dev/null 2>&1
  +      wget http://www.ibiblio.org/maven/$i $repoLocal/$i
  +    fi
  +  done
  +}
  +
  +createMBootClasspath()
  +{
  +  findAndSetMavenRepoLocal()
  +  
  +  for i in `cat ${MBOOT_HOME}/bash/deps`
  +  do
  +    MBOOT_CP=${MBOOT_CP}:$i
  +  done
  +
  +  if [ "$cygwin" = "true" ]
  +  then
  +    MBOOT_CP=cygpath -pu "$MBOOT_CP"
  +  fi
  +}
  +
  +findAndSetMavenRepoLocal()
  +{
  +  if [ -f $HOME/build.properties ]
  +  then
  +    repoLocal=`cat $HOME/build.properties | grep "maven.repo.local" | sed 's/^.*= 
*//'`
  +  else
  +    repoLocal=$HOME/.maven/repository
  +  fi
  +
  +  if [ "$cygwin" = "true" ]
  +  then
  +    repoLocal=cygpath -pu "$repoLocal"
  +  fi
  +}
  +
   isCommandSuccessful()
   {
     # $1 == $?
  @@ -49,7 +93,7 @@
     
     if [ -f $5 ]
     then
  -    "${JAVACMD}" -classpath "$CP" org.codehaus.surefire.SureFire "$2" "$3" $4 $5 $6
  +    "${JAVACMD}" -classpath "$CP" org.codehaus.surefire.SurefireBooter "$2" "$3" $4 
$5 $6
     fi
   }
   
  @@ -106,10 +150,6 @@
       # 4. Move required resources into location
       # 5. Create JAR.
       
  -    # I can use maven-model and I can detach maven-model-tools from
  -    # Plexus so that I can use it for this tool. I can just use the 
  -    # command line compiler for now.
  -
       # $1 == directory where project lives
       # $4 == jar name
       # $5 == flag to leave mboot files
  @@ -165,10 +205,13 @@
           repoLocal=`cygpath -pu "$repoLocal"`
         fi
   
  +      createMBootClasspath
  +      
         if [ ! -z $unitTestSourceDirectory ] && [ -d $unitTestSourceDirectory ]
         then
           
  -        compile 
"$buildDest:$projectDependencyClassPath:$repoLocal/junit/jars/junit-3.8.1.jar" 
$buildTestDest $unitTestSourceDirectory      
  +        compile "$buildDest:$projectDependencyClassPath:${MBOOT_CP}" $buildTestDest 
$unitTestSourceDirectory
  +        
           isCommandSuccessful $? "Failed compiling test classes!"
         
         fi
  @@ -178,7 +221,9 @@
         copyResources bootstrap.tests.resources target/test-classes
         
         echo "Running tests in `pwd`"
  -        
  +      
  +      # We only need the booter jar in the classpath, it will load everything else.
  +      
         runTests 
".:${MBOOT_HOME}/classes:$repoLocal/surefire/jars/surefire-booter-1.0.jar" "$home" 
"$repoLocal" bootstrap.libs bootstrap.tests.includes bootstrap.tests.excludes
         
         if [ "$2" = "default" ]
  
  
  
  1.1                  maven-components/maven-mboot/src/bash/deps
  
  Index: deps
  ===================================================================
  junit/jars/junit-3.8.1.jar
  surefire/jars/surefire-booter-1.0.jar
  surefire/jars/surefire-1.0.jar
  
  
  

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

Reply via email to