avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject svn commit: rev 20530 - in avalon/trunk/tools/magic: . artifact artifact/src/dist engine engine/src/java/org/apache/avalon/magic jar jar/src/dist java java/src/dist prepare prepare/src/dist test-project
Date Fri, 28 May 2004 07:10:34 GMT
Author: niclas
Date: Fri May 28 00:10:33 2004
New Revision: 20530

Added:
   avalon/trunk/tools/magic/artifact/magic.properties
      - copied unchanged from rev 20488, avalon/trunk/tools/magic/artifact/build.properties
   avalon/trunk/tools/magic/artifact/src/dist/magic.java
      - copied unchanged from rev 20488, avalon/trunk/tools/magic/artifact/src/dist/build.bsh
   avalon/trunk/tools/magic/artifact/src/dist/magic.properties
      - copied unchanged from rev 20488, avalon/trunk/tools/magic/artifact/src/dist/build.properties
   avalon/trunk/tools/magic/engine/build.sh   (contents, props changed)
   avalon/trunk/tools/magic/jar/magic.properties
      - copied unchanged from rev 20488, avalon/trunk/tools/magic/jar/build.properties
   avalon/trunk/tools/magic/jar/src/dist/magic.java
      - copied unchanged from rev 20488, avalon/trunk/tools/magic/jar/src/dist/build.bsh
   avalon/trunk/tools/magic/jar/src/dist/magic.properties
      - copied unchanged from rev 20488, avalon/trunk/tools/magic/jar/src/dist/build.properties
   avalon/trunk/tools/magic/java/magic.properties
      - copied unchanged from rev 20488, avalon/trunk/tools/magic/java/build.properties
   avalon/trunk/tools/magic/java/src/dist/magic.java
      - copied unchanged from rev 20488, avalon/trunk/tools/magic/java/src/dist/build.bsh
   avalon/trunk/tools/magic/java/src/dist/magic.properties
      - copied unchanged from rev 20488, avalon/trunk/tools/magic/java/src/dist/build.properties
   avalon/trunk/tools/magic/magic.properties
      - copied unchanged from rev 20488, avalon/trunk/tools/magic/build.properties
   avalon/trunk/tools/magic/magic.sequence
      - copied unchanged from rev 20501, avalon/trunk/tools/magic/build.sequence
   avalon/trunk/tools/magic/prepare/magic.properties
      - copied unchanged from rev 20488, avalon/trunk/tools/magic/prepare/build.properties
   avalon/trunk/tools/magic/prepare/src/dist/magic.java
      - copied unchanged from rev 20488, avalon/trunk/tools/magic/prepare/src/dist/build.bsh
   avalon/trunk/tools/magic/prepare/src/dist/magic.properties
      - copied unchanged from rev 20488, avalon/trunk/tools/magic/prepare/src/dist/build.properties
   avalon/trunk/tools/magic/test-project/magic.java
      - copied unchanged from rev 20488, avalon/trunk/tools/magic/test-project/build.bsh
   avalon/trunk/tools/magic/test-project/magic.properties
      - copied unchanged from rev 20488, avalon/trunk/tools/magic/test-project/build.properties
Removed:
   avalon/trunk/tools/magic/artifact/build.properties
   avalon/trunk/tools/magic/artifact/src/dist/build.bsh
   avalon/trunk/tools/magic/artifact/src/dist/build.properties
   avalon/trunk/tools/magic/build.properties
   avalon/trunk/tools/magic/build.sequence
   avalon/trunk/tools/magic/jar/build.properties
   avalon/trunk/tools/magic/jar/src/dist/build.bsh
   avalon/trunk/tools/magic/jar/src/dist/build.properties
   avalon/trunk/tools/magic/java/build.properties
   avalon/trunk/tools/magic/java/src/dist/build.bsh
   avalon/trunk/tools/magic/java/src/dist/build.properties
   avalon/trunk/tools/magic/prepare/build.properties
   avalon/trunk/tools/magic/prepare/src/dist/build.bsh
   avalon/trunk/tools/magic/prepare/src/dist/build.properties
   avalon/trunk/tools/magic/test-project/build.bsh
   avalon/trunk/tools/magic/test-project/build.properties
Modified:
   avalon/trunk/tools/magic/engine/src/java/org/apache/avalon/magic/Builder.java
Log:
Intermediary step.

Added: avalon/trunk/tools/magic/engine/build.sh
==============================================================================
--- (empty file)
+++ avalon/trunk/tools/magic/engine/build.sh	Fri May 28 00:10:33 2004
@@ -0,0 +1,53 @@
+#!/bin/sh
+#
+
+DEST=target/classes
+DIST=target/dist
+
+if [ -z $MAVEN_LOCAL_HOME ] ; then
+    MAVEN_LOCAL_HOME=$HOME/.maven
+fi
+
+REPO=$MAVEN_LOCAL_HOME/repository
+
+CP=$REPO/avalon-framework/jars/avalon-framework-api-4.2.0.jar
+CP=$CP:$REPO/avalon-framework/jars/avalon-framework-impl-4.2.0.jar
+CP=$CP:$REPO/bsh/jars/bsh-2.0b1.jar
+
+if [ $ANT_HOME ] ; then
+    CP=$CP:$ANT_HOME/lib/ant.jar
+else
+    CP=$CP:$REPO/ant/jars/ant-1.6.jar
+fi
+
+SRC=`find src/java -name "*.java"`
+mkdir -p $DEST
+javac -d $DEST -classpath $CP $SRC
+RESULT="$#"
+
+if [ $RESULT = 0 ] ; then
+    cd $DEST
+    jar cf magic.jar *
+    RESULT=$#
+    cd -
+fi
+
+if [ $RESULT = 0 ] ; then
+    for FILE in `find src/dist -type f | grep -v .svn` ; do
+        BASEDIR=`dirname $FILE`
+        TODIR=`echo $DIST$BASEDIR/ | sed 's/src\/dist//'`
+        mkdir -p $TODIR
+        cp $FILE $TODIR
+    done
+    cp $REPO/avalon-framework/jars/avalon-framework-api-4.2.0.jar $DIST/bin
+    cp $REPO/avalon-framework/jars/avalon-framework-impl-4.2.0.jar $DIST/bin
+    cp $REPO/bsh/jars/bsh-2.0b1.jar $DIST/bin
+    if [ $ANT_HOME ] ; then
+        cp $ANT_HOME/lib/ant.jar $DIST/bin
+    else
+        cp $REPO/ant/jars/ant-1.6.jar  $DIST/bin
+    fi
+    cp $DEST/magic.jar $DIST/bin
+    chmod +x $DIST/bin/magic
+fi
+

Modified: avalon/trunk/tools/magic/engine/src/java/org/apache/avalon/magic/Builder.java
==============================================================================
--- avalon/trunk/tools/magic/engine/src/java/org/apache/avalon/magic/Builder.java	(original)
+++ avalon/trunk/tools/magic/engine/src/java/org/apache/avalon/magic/Builder.java	Fri May
28 00:10:33 2004
@@ -148,7 +148,7 @@
     
     private void loadMagicSystemProperties( PluginProperties props )
     {
-        File file = new File( m_SystemDir, "build.properties" );
+        File file = new File( m_SystemDir, "magic.properties" );
         if( file.exists() )
             load( props, file );
     }
@@ -160,7 +160,7 @@
         File[] plugins = m_SystemDir.listFiles();
         for( int i=0 ; i < plugins.length ; i++ )
         {
-            File file = new File( plugins[i], "build.properties" );
+            File file = new File( plugins[i], "magic.properties" );
             if( file.exists() )
                 load( props, file );
         }
@@ -173,28 +173,28 @@
         if( projSys == null )
             return;
         File dir = new File( projSys );
-        File file = new File( dir, "build.properties" );
+        File file = new File( dir, "magic.properties" );
         if( file.exists() )
             load( props, file );
     }
     
     private void loadProjectLocalProperties( PluginProperties props )
     {
-        File file = new File( m_ProjectDir, "build.properties" );
+        File file = new File( m_ProjectDir, "magic.properties" );
         if( file.exists() )
             load( props, file );
     }
     
     private void loadUserProjectProperties( PluginProperties props )
     {
-        File file = new File( m_ProjectDir, "user.properties" );
+        File file = new File( m_ProjectDir, "user-magic.properties" );
         if( file.exists() )
             load( props, file );
     }
     
     private void loadUserSystemProperties( PluginProperties props )
     {
-        File file = new File( m_SystemDir, "user.properties" );
+        File file = new File( m_SystemDir, "user-magic.properties" );
         if( file.exists() )
             load( props, file );
     }

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message