notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r1792 - in development/main: . home home/transit home/transit/etc magic magic/core/src/main/net/dpml/magic magic/core/src/main/net/dpml/magic/builder magic/core/src/main/net/dpml/magic/tasks
- From: mcconnell AT netcompartner.com
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r1792 - in development/main: . home home/transit home/transit/etc magic magic/core/src/main/net/dpml/magic magic/core/src/main/net/dpml/magic/builder magic/core/src/main/net/dpml/magic/tasks
- Date: Wed, 16 Feb 2005 20:43:30 +0100
Author: mcconnell
Date: Wed Feb 16 20:43:29 2005
New Revision: 1792
Added:
development/main/magic/module.properties
Modified:
development/main/ (props changed)
development/main/home/standard.xml
development/main/home/transit/build.xml
development/main/home/transit/etc/project.module
development/main/magic/core/src/main/net/dpml/magic/Index.java
development/main/magic/core/src/main/net/dpml/magic/builder/IndexBuilder.java
development/main/magic/core/src/main/net/dpml/magic/tasks/JUnitTestTask.java
development/main/magic/index.xml
development/main/magic/module.xml
development/main/magic/template.magic.properties
Log:
yweaking to handle module version overriding
Modified: development/main/home/standard.xml
==============================================================================
--- development/main/home/standard.xml (original)
+++ development/main/home/standard.xml Wed Feb 16 20:43:29 2005
@@ -37,10 +37,6 @@
<isset property="ENV.APPDATA"/>
</condition>
- <condition property="dpml.programfiles.declared" value="false">
- <isset property="ENV.ProgramFiles"/>
- </condition>
-
<condition property="dpml.home.declared" value="false">
<isset property="ENV.DPML_HOME"/>
</condition>
Modified: development/main/home/transit/build.xml
==============================================================================
--- development/main/home/transit/build.xml (original)
+++ development/main/home/transit/build.xml Wed Feb 16 20:43:29 2005
@@ -22,10 +22,13 @@
<project name="dpml-transit" basedir="." default="install">
<property file="${basedir}/build.properties"/>
+ <property file="${home}/commons.properties"/>
<import file="${home}/standard.xml"/>
<target name="init" depends="standard.init">
<filter token="PROJECT-VERSION" value="${project.version}"/>
+ <property name="dpml.util.version" value="${project.version}"/>
+ <filter token="UTIL-MODULE-VERSION" value="${dpml.util.version}"/>
</target>
<target name="package" depends="standard.package">
Modified: development/main/home/transit/etc/project.module
==============================================================================
--- development/main/home/transit/etc/project.module (original)
+++ development/main/home/transit/etc/project.module Wed Feb 16 20:43:29
2005
@@ -22,7 +22,7 @@
<!-- imports -->
- <import uri="artifact:module:dpml/util/dpml-util#@PROJECT-VERSION@"/>
+ <import uri="artifact:module:dpml/util/dpml-util#@UTIL-MODULE-VERSION@"/>
<!-- module resources -->
Modified: development/main/magic/core/src/main/net/dpml/magic/Index.java
==============================================================================
--- development/main/magic/core/src/main/net/dpml/magic/Index.java
(original)
+++ development/main/magic/core/src/main/net/dpml/magic/Index.java Wed
Feb 16 20:43:29 2005
@@ -129,13 +129,13 @@
m_index = resolveIndex( index );
- File base = m_index.getParentFile();
- processModuleProperties( project, base );
-
final File user = new File( System.getProperty( "user.home" ) );
final File props = new File( user, "magic.properties" );
loadProperties( project, props );
+ File base = m_index.getParentFile();
+ processModuleProperties( project, base );
+
//
// load the initial context
//
@@ -153,6 +153,9 @@
// load the system wide properties
//
+ File siteUserProperties = new File( Transit.DPML_PREFS,
"magic/user.properties" );
+ loadProperties( project, siteUserProperties );
+
File siteProperties = new File( Transit.DPML_PREFS,
"magic/magic.properties" );
loadProperties( project, siteProperties );
@@ -177,7 +180,6 @@
processModuleProperties( project, parent );
}
-
//-------------------------------------------------------------
// implementation
//-------------------------------------------------------------
@@ -681,7 +683,7 @@
if( "import".equals( element.getTagName() ) )
{
final String filename = element.getAttribute( "index" );
- final String urn = element.getAttribute( "uri" );
+ String urn = parse( element.getAttribute( "uri" ) );
if(( null != filename ) && ( !"".equals( filename )))
{
final File index = IndexBuilder.getFile( anchor,
filename );
@@ -755,6 +757,23 @@
}
}
+ private String parse( String value )
+ {
+ if( null == value )
+ {
+ return value;
+ }
+ String result = getProject().replaceProperties( value );
+ if( !result.equals( value ) )
+ {
+ return parse( result );
+ }
+ else
+ {
+ return result;
+ }
+ }
+
private Resource createResource(
final Element element, final File anchor, String uri )
{
Modified:
development/main/magic/core/src/main/net/dpml/magic/builder/IndexBuilder.java
==============================================================================
---
development/main/magic/core/src/main/net/dpml/magic/builder/IndexBuilder.java
(original)
+++
development/main/magic/core/src/main/net/dpml/magic/builder/IndexBuilder.java
Wed Feb 16 20:43:29 2005
@@ -76,8 +76,13 @@
log( "magic builder established", Project.MSG_VERBOSE );
m_signature = getBuildSignature();
- if( null != m_signature )
+ if( null == m_signature )
{
+ project.setProperty( "project.build.id", "SNAPSHOT" );
+ }
+ else
+ {
+ project.setProperty( "project.build.id", m_signature );
log( "release: " + m_signature, Project.MSG_VERBOSE );
}
Modified:
development/main/magic/core/src/main/net/dpml/magic/tasks/JUnitTestTask.java
==============================================================================
---
development/main/magic/core/src/main/net/dpml/magic/tasks/JUnitTestTask.java
(original)
+++
development/main/magic/core/src/main/net/dpml/magic/tasks/JUnitTestTask.java
Wed Feb 16 20:43:29 2005
@@ -358,6 +358,11 @@
basedir.setValue( project.getBaseDir().toString() );
junit.addConfiguredSysproperty( basedir );
+ final Environment.Variable version = new Environment.Variable();
+ version.setKey( "project.version" );
+ version.setValue( getDefinition().getInfo().getVersion() );
+ junit.addConfiguredSysproperty( version );
+
final Environment.Variable cache = new Environment.Variable();
cache.setKey( CACHE_PATH_KEY );
cache.setValue( getCachePath() );
Modified: development/main/magic/index.xml
==============================================================================
--- development/main/magic/index.xml (original)
+++ development/main/magic/index.xml Wed Feb 16 20:43:29 2005
@@ -21,7 +21,8 @@
<index key="dpml-magic">
- <import uri="artifact:module:dpml/transit/dpml-transit#SNAPSHOT"/>
+ <!--<import uri="artifact:module:dpml/transit/dpml-transit#SNAPSHOT"/>-->
+ <import uri="${dpml.transit.uri}"/>
<!--
Magic Module
Added: development/main/magic/module.properties
==============================================================================
--- (empty file)
+++ development/main/magic/module.properties Wed Feb 16 20:43:29 2005
@@ -0,0 +1,3 @@
+
+dpml.transit.version = ${project.build.id}
+dpml.transit.uri =
artifact:module:dpml/transit/dpml-transit#${dpml.transit.version}
Modified: development/main/magic/module.xml
==============================================================================
--- development/main/magic/module.xml (original)
+++ development/main/magic/module.xml Wed Feb 16 20:43:29 2005
@@ -25,6 +25,8 @@
<transit:import uri="artifact:template:dpml/magic/standard"/>
<target name="init" depends="standard.init">
+ <property name="dpml.transit.version" value="${project.version}"/>
+ <filter token="TRANSIT-MODULE-VERSION" value="${dpml.transit.version}"/>
<filter token="PROJECT-NAME" value="${project.name}"/>
<filter token="PROJECT-VERSION" value="${project.version}"/>
<property name="bundle" value="${basedir}/target/bundle"/>
Modified: development/main/magic/template.magic.properties
==============================================================================
--- development/main/magic/template.magic.properties (original)
+++ development/main/magic/template.magic.properties Wed Feb 16 20:43:29
2005
@@ -1,2 +1,3 @@
# site wide customization of magic properties
+
- svn commit: r1792 - in development/main: . home home/transit home/transit/etc magic magic/core/src/main/net/dpml/magic magic/core/src/main/net/dpml/magic/builder magic/core/src/main/net/dpml/magic/tasks, mcconnell, 02/16/2005
Archive powered by MHonArc 2.6.24.