avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject svn commit: rev 21145 - in avalon/trunk/tools/magic: artifact/src/dist engine engine/src/dist/plugins/plugin engine/src/java/org/apache/avalon/magic prepare/src/dist
Date Sat, 12 Jun 2004 14:32:45 GMT
Author: niclas
Date: Sat Jun 12 07:32:45 2004
New Revision: 21145

Removed:
   avalon/trunk/tools/magic/engine/build.sh
Modified:
   avalon/trunk/tools/magic/artifact/src/dist/magic.properties
   avalon/trunk/tools/magic/engine/build.properties
   avalon/trunk/tools/magic/engine/build.xml
   avalon/trunk/tools/magic/engine/src/dist/plugins/plugin/magic.bsh
   avalon/trunk/tools/magic/engine/src/java/org/apache/avalon/magic/Artifact.java
   avalon/trunk/tools/magic/prepare/src/dist/magic.properties
Log:
Fixed a bootstrap problem.

Modified: avalon/trunk/tools/magic/artifact/src/dist/magic.properties
==============================================================================
--- avalon/trunk/tools/magic/artifact/src/dist/magic.properties	(original)
+++ avalon/trunk/tools/magic/artifact/src/dist/magic.properties	Sat Jun 12 07:32:45 2004
@@ -2,7 +2,7 @@
 # The local repository where downloaded and built artifacts will be
 # installed to. The location below is shared with any Maven driven
 # projects, and compatibility should exist.
-artifact.local.repository.dir = ${user.home}/.maven/repository
+artifact.local.repository.dir = ${project.system}/.cache
 
 # The remote repository, where artifacts can be downloaded from.
 artifact.repository = http://www.ibiblio.org/maven

Modified: avalon/trunk/tools/magic/engine/build.properties
==============================================================================
--- avalon/trunk/tools/magic/engine/build.properties	(original)
+++ avalon/trunk/tools/magic/engine/build.properties	Sat Jun 12 07:32:45 2004
@@ -1,7 +1,9 @@
 
 project.name = magic
 
-maven.repository = ${user.home}/.maven/repository
+project.system = ../../../central/system
+
+jar.repository = ${project.system}/.cache
 
 build.dest.dir=target
 

Modified: avalon/trunk/tools/magic/engine/build.xml
==============================================================================
--- avalon/trunk/tools/magic/engine/build.xml	(original)
+++ avalon/trunk/tools/magic/engine/build.xml	Sat Jun 12 07:32:45 2004
@@ -11,6 +11,12 @@
     <available file="${test.src.dir}" property="test-sources-available" />
     <available file="${test.resources.dir}" property="test-resources-available" />
     <available file="${test.environment.dir}" property="test-environment-available" />
+    <available property="framework-api-present" 
+               file="${jar.repository}/avalon/framework/jars/avalon-framework-api-4.2.0.jar"
/>
+    <available property="framework-impl-present" 
+               file="${jar.repository}/avalon/framework/jars/avalon-framework-impl-4.2.0.jar"
/>
+    <available property="bsh-present" 
+               file="${jar.repository}/bsh/jars/bsh-2.0b1.jar" />
     
     <copy todir="${build.src.dir}" filtering="on">
       <fileset dir="${src.dir}"  >
@@ -30,7 +36,7 @@
     </copy>
   </target>
 
-  <target name="build" depends="prepare" >
+  <target name="build" depends="prepare,getAll" >
     <javac srcdir="${java.build.src.dir}"
            destdir="${java.build.classes.dir}"
            debug="${java.compile.debug}"
@@ -38,10 +44,10 @@
            fork="${java.compile.fork}"
     >
       <classpath>
-        <path location="${maven.repository}/avalon/framework/jars/avalon-framework-api-4.2.0.jar"
/>
-        <path location="${maven.repository}/avalon/framework/jars/avalon-framework-impl-4.2.0.jar"
/>
-        <path location="${maven.repository}/bsh/jars/bsh-2.0b1.jar" />
-        <path location="${maven.repository}/ant/jars/ant-1.6.jar" />
+        <path location="${jar.repository}/avalon/framework/jars/avalon-framework-api-4.2.0.jar"
/>
+        <path location="${jar.repository}/avalon/framework/jars/avalon-framework-impl-4.2.0.jar"
/>
+        <path location="${jar.repository}/bsh/jars/bsh-2.0b1.jar" />
+        <path location="${jar.repository}/ant/jars/ant-1.6.jar" />
       </classpath>
     </javac>
   </target>
@@ -67,9 +73,9 @@
       <fileset dir="${build.src.dir}/dist" includes="**" />
     </copy>
     <copy todir="${build.dist.dir}/bin" >
-      <fileset dir="${maven.repository}/avalon/framework/jars/" includes="avalon-framework-api-4.2.0.jar"
/>
-      <fileset dir="${maven.repository}/avalon/framework/jars/" includes="avalon-framework-impl-4.2.0.jar"
/>
-      <fileset dir="${maven.repository}/bsh/jars/" includes="bsh-2.0b1.jar" />
+      <fileset dir="${jar.repository}/avalon/framework/jars/" includes="avalon-framework-api-4.2.0.jar"
/>
+      <fileset dir="${jar.repository}/avalon/framework/jars/" includes="avalon-framework-impl-4.2.0.jar"
/>
+      <fileset dir="${jar.repository}/bsh/jars/" includes="bsh-2.0b1.jar" />
     </copy>
     
     <copy todir="${build.dist.dir}/bin" file="${jar-built-file}" />
@@ -88,7 +94,7 @@
     >
       <classpath>
         <pathelement path="${jar-built-file}" />
-        <pathelement path="${maven.repository}/avalon/framework/jars/avalon-framework-api-4.2.0.jar"
/>
+        <pathelement path="${jar.repository}/avalon/framework/jars/avalon-framework-api-4.2.0.jar"
/>
       </classpath>
     </javac>
   </target>
@@ -132,7 +138,7 @@
         <pathelement path="${jar-built-file}" />
         <pathelement path="${basedir}/${test.build.classes.dir}" />
         <pathelement path="${basedir}/${test.build.resources.dir}" />
-        <pathelement path="${maven.repository}/avalon/framework/jars/avalon-framework-api-4.2.0.jar"
/>
+        <pathelement path="${jar.repository}/avalon/framework/jars/avalon-framework-api-4.2.0.jar"
/>
       </classpath>
       <sysproperty key="basedir" value="${basedir}"/>      
       <formatter type="plain"/>
@@ -172,6 +178,26 @@
   <!-- Include the Fancy test report in the distribution  -->
   <target name="test-report-package" if="test.fancy.report.dist" >
   
+  </target>
+
+  <target name="getAll" depends="prepare,getFrameworkAPI, getFrameworkImpl, getBsh" />
+  
+  <target name="getFrameworkAPI" unless="framework-api-present" >
+    <mkdir dir="${jar.repository}/avalon/framework/jars/" />
+    <get src="http://www.ibiblio.org/maven/avalon-framework/jars/avalon-framework-api-4.2.0.jar"
+         dest="${jar.repository}/avalon/framework/jars/avalon-framework-api-4.2.0.jar" />
+  </target>
+  
+  <target name="getBsh" unless="bsh-present" >
+    <mkdir dir="${jar.repository}/bsh/jars/" />
+    <get src="http://www.ibiblio.org/maven/bsh/jars/bsh-2.0b1.jar"
+         dest="${jar.repository}/bsh/jars/bsh-2.0b1.jar" />
+  </target>
+  
+  <target name="getFrameworkImpl" unless="framework-impl-present" >
+    <mkdir dir="${jar.repository}/avalon/framework/jars/" />
+    <get src="http://www.ibiblio.org/maven/avalon-framework/jars/avalon-framework-impl-4.2.0.jar"
+         dest="${jar.repository}/avalon/framework/jars/avalon-framework-impl-4.2.0.jar" />
   </target>
   
   <target name="clean" depends="prepare" >

Modified: avalon/trunk/tools/magic/engine/src/dist/plugins/plugin/magic.bsh
==============================================================================
--- avalon/trunk/tools/magic/engine/src/dist/plugins/plugin/magic.bsh	(original)
+++ avalon/trunk/tools/magic/engine/src/dist/plugins/plugin/magic.bsh	Sat Jun 12 07:32:45
2004
@@ -133,7 +133,7 @@
             srcPE.setLocation( destDir );
             javac.init();
             javac.execute(); 
-
+            
             notifyPostMethod( "validate" );
         } catch( Exception e )
         {

Modified: avalon/trunk/tools/magic/engine/src/java/org/apache/avalon/magic/Artifact.java
==============================================================================
--- avalon/trunk/tools/magic/engine/src/java/org/apache/avalon/magic/Artifact.java	(original)
+++ avalon/trunk/tools/magic/engine/src/java/org/apache/avalon/magic/Artifact.java	Sat Jun
12 07:32:45 2004
@@ -261,14 +261,14 @@
     {
         String localRepo = m_Context.getProperty( "artifact.local.repository.dir" );
         if( localRepo == null || "".equals( localRepo ) )
-            localRepo = m_Context.getProperty( "user.home" ) + "/.maven/repository";
+            localRepo = m_Context.getProperty( "project.system" ) + "/.cache";
 
         String href = localRepo + "/" + 
                       getGroupId() + "/" +
                       getType() + "s/" +
                       getArtifactId() + "-" +
                       getVersion()  + ".jar" ;
-        File localFile = new File( href );
+        File localFile = new File( m_Context.getProjectDir(), href );
         return localFile;
     }
     
@@ -283,7 +283,9 @@
         File localfile = toLocalFile();
         if( ! localfile.exists() )
         {
-            localfile.getParentFile().mkdirs();
+            File parentDir = localfile.getParentFile();
+            parentDir = parentDir.getAbsoluteFile();
+            parentDir.mkdirs();
             Util.download( this, localfile );
         }
         return localfile;

Modified: avalon/trunk/tools/magic/prepare/src/dist/magic.properties
==============================================================================
--- avalon/trunk/tools/magic/prepare/src/dist/magic.properties	(original)
+++ avalon/trunk/tools/magic/prepare/src/dist/magic.properties	Sat Jun 12 07:32:45 2004
@@ -7,4 +7,4 @@
 
 prepare.filtered.files= **/*.xml, **/*.java, **/*.html, **/*.sh, **/*.bat, **/*.prop*
 
-prepare.license.file = ${plugin.dir}/LICENSE.txt
\ No newline at end of file
+prepare.license.file = ${plugin.dir}/LICENSE.txt

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


Mime
View raw message