Skip to Content.
Sympa Menu

notify-dpml - svn commit: r1974 - development/main/magic/core/src/main/net/dpml/magic/project

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell AT dpml.net
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r1974 - development/main/magic/core/src/main/net/dpml/magic/project
  • Date: Tue, 08 Mar 2005 10:24:16 -0500

Author: mcconnell AT dpml.net
Date: Tue Mar 8 10:24:14 2005
New Revision: 1974

Modified:
development/main/magic/core/src/main/net/dpml/magic/project/Context.java
Log:
Add some useful project level properties covering the target, build, test and
deliverable directories.

Modified:
development/main/magic/core/src/main/net/dpml/magic/project/Context.java
==============================================================================
--- development/main/magic/core/src/main/net/dpml/magic/project/Context.java
(original)
+++ development/main/magic/core/src/main/net/dpml/magic/project/Context.java
Tue Mar 8 10:24:14 2005
@@ -30,6 +30,7 @@
import org.apache.tools.ant.taskdefs.Property;

import java.io.File;
+import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;
@@ -161,6 +162,10 @@
m_build = new File( m_target, "build" );
m_temp = new File( m_target, "temp" );

+ updateFileProperty( project, "project.build.dir", m_build );
+ updateFileProperty( project, "project.target.dir", m_target );
+ updateFileProperty( project, "project.test.dir", m_test );
+ updateFileProperty( project, "project.deliverables.dir",
m_deliverables );
}

//-------------------------------------------------------------
@@ -354,6 +359,23 @@
}
}

+ private void updateFileProperty( Project project, String key, File file )
+ {
+ try
+ {
+ String path = file.getCanonicalPath();
+ updateProperty( project, key, path );
+ }
+ catch( IOException ioe )
+ {
+ final String error =
+ "Internal error while attempting to resolve the canonical
representation of a file ["
+ + file.toString()
+ + "].";
+ throw new BuildException( error, ioe );
+ }
+ }
+
private void updateProperty( Project project, String key, String value )
{
String v = project.getProperty( key );



  • svn commit: r1974 - development/main/magic/core/src/main/net/dpml/magic/project, mcconnell, 03/07/2005

Archive powered by MHonArc 2.6.24.

Top of Page