avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject svn commit: rev 20322 - in avalon/trunk/tools/project: . src/main/org/apache/avalon/tools src/main/org/apache/avalon/tools/project src/main/org/apache/avalon/tools/tasks
Date Mon, 24 May 2004 11:20:28 GMT
Author: mcconnell
Date: Mon May 24 04:20:27 2004
New Revision: 20322

Modified:
   avalon/trunk/tools/project/   (props changed)
   avalon/trunk/tools/project/src/main/org/apache/avalon/tools/antlib.xml
   avalon/trunk/tools/project/src/main/org/apache/avalon/tools/project/ProjectTask.java
   avalon/trunk/tools/project/src/main/org/apache/avalon/tools/tasks/HomeTask.java
   avalon/trunk/tools/project/src/main/org/apache/avalon/tools/tasks/JavacTask.java
Log:


Modified: avalon/trunk/tools/project/src/main/org/apache/avalon/tools/antlib.xml
==============================================================================
--- avalon/trunk/tools/project/src/main/org/apache/avalon/tools/antlib.xml	(original)
+++ avalon/trunk/tools/project/src/main/org/apache/avalon/tools/antlib.xml	Mon May 24 04:20:27
2004
@@ -6,5 +6,6 @@
   <taskdef name="javac" classname="org.apache.avalon.tools.tasks.JavacTask"/> 
   <taskdef name="jar" classname="org.apache.avalon.tools.tasks.JarTask"/> 
   <taskdef name="test" classname="org.apache.avalon.tools.tasks.TestTask"/> 
+  <taskdef name="xdoc" classname="org.apache.avalon.tools.tasks.XdocTask"/> 
   <taskdef name="install" classname="org.apache.avalon.tools.tasks.InstallTask"/> 
 </antlib> 

Modified: avalon/trunk/tools/project/src/main/org/apache/avalon/tools/project/ProjectTask.java
==============================================================================
--- avalon/trunk/tools/project/src/main/org/apache/avalon/tools/project/ProjectTask.java	(original)
+++ avalon/trunk/tools/project/src/main/org/apache/avalon/tools/project/ProjectTask.java	Mon
May 24 04:20:27 2004
@@ -176,13 +176,18 @@
 
     private void setProjectProperties( Home home, Definition definition )
     {
-        File root = home.getHomeDirectory();
-        File lib = new File( root, "library" );
+        if( null == home )
+        {
+            throw new NullPointerException( "home" );
+        }
+        if( null == definition )
+        {
+            throw new NullPointerException( "definition" );
+        }
 
+        File root = home.getHomeDirectory();
         getProject().setProperty( 
           "avalon.home", root.toString() );
-        getProject().setProperty( 
-          "avalon.library", lib.toString() );
 
         getProject().setProperty( 
           "avalon.project.key", definition.getKey() );
@@ -190,8 +195,11 @@
           "avalon.project.name", definition.getInfo().getName() );
         getProject().setProperty( 
           "avalon.project.group", definition.getInfo().getGroup() );
-        getProject().setProperty( 
-          "avalon.project.version", definition.getInfo().getVersion() );
+        if( null != definition.getInfo().getVersion() )
+        {
+            getProject().setProperty( 
+              "avalon.project.version", definition.getInfo().getVersion() );
+        }
     }
 
     private void buildProject( Home home, Definition definition )

Modified: avalon/trunk/tools/project/src/main/org/apache/avalon/tools/tasks/HomeTask.java
==============================================================================
--- avalon/trunk/tools/project/src/main/org/apache/avalon/tools/tasks/HomeTask.java	(original)
+++ avalon/trunk/tools/project/src/main/org/apache/avalon/tools/tasks/HomeTask.java	Mon May
24 04:20:27 2004
@@ -61,6 +61,10 @@
 
     protected void setProjectProperty( String key, String value )
     {
+        if( null == key )
+        {
+            throw new NullPointerException( "key" );
+        }
         Property props = (Property) getProject().createTask( "property" );
         props.setName( key );
         props.setValue( value );

Modified: avalon/trunk/tools/project/src/main/org/apache/avalon/tools/tasks/JavacTask.java
==============================================================================
--- avalon/trunk/tools/project/src/main/org/apache/avalon/tools/tasks/JavacTask.java	(original)
+++ avalon/trunk/tools/project/src/main/org/apache/avalon/tools/tasks/JavacTask.java	Mon May
24 04:20:27 2004
@@ -83,7 +83,7 @@
 
     private File getTargetSrcMainDirectory()
     {
-        String src = getProject().getProperty( "avalon.target.src.main" );
+        String src = getProject().getProperty( PrepareTask.TARGET_SRC_MAIN_KEY );
         return new File( getProject().getBaseDir(), src );
     }
 

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


Mime
View raw message