Skip to Content.
Sympa Menu

notify-dpml - svn commit: r1931 - in development/laboratory/ant: . main main/src/main/net/dpml/ant

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell AT netcompartner.com
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r1931 - in development/laboratory/ant: . main main/src/main/net/dpml/ant
  • Date: Thu, 03 Mar 2005 08:35:58 +0100

Author: mcconnell
Date: Thu Mar 3 08:35:57 2005
New Revision: 1931

Removed:

development/laboratory/ant/main/src/main/net/dpml/ant/TransitProjectHelper.java
Modified:
development/laboratory/ant/README.TXT
development/laboratory/ant/index.xml
development/laboratory/ant/main/ (props changed)
development/laboratory/ant/main/build.xml
development/laboratory/ant/main/src/main/net/dpml/ant/AntPlugin.java
Log:
Update the demo of running magic from with ant where ant is a plugin loaded
by transit.

Modified: development/laboratory/ant/README.TXT
==============================================================================
--- development/laboratory/ant/README.TXT (original)
+++ development/laboratory/ant/README.TXT Thu Mar 3 08:35:57 2005
@@ -2,17 +2,24 @@
Overview
--------

-This package contains an plugin that launches the Ant build system. To use
this package you need to build the plugin using classic ant.
+This package contains an plugin that launches the Ant build system.
+
+The plugin declares dependencies on the core ant jar, ant-junit, and
+the jdk tools jar. You will need to place a copy of tools.jar in you
+local repository under sun/jars/tools-1.4.2.jar.
+
+To use this package you need to build the plugin using classic ant.

$ cd main
$ ant

-The plugin declares dependencies on the core ant jar, ant-launcher,
ant-junit, and the jdk tools jar. You will need to place a copy of tools.jar
in you local repository under sun/jars/tools-1.4.2.jar.

Demonstration:
--------------

-To execute a demonstration of a ant-on-transit you can invoke the following
command from the main directory:
+To execute a demonstration of a ant-on-transit you can invoke the following
+command from the main directory (i.e. build the project using magic via ant
+via transit):

$ magic clean install

@@ -23,6 +30,7 @@
Known issues:
-------------

-The plugin is demonstrating a problem with xls sheet handling which appears
to be related to classloader assumptions in ant's junit task.
+The plugin is demonstrating a problem with xls sheet handling which appears
to
+be related to classloader assumptions in ant's junit task.



Modified: development/laboratory/ant/index.xml
==============================================================================
--- development/laboratory/ant/index.xml (original)
+++ development/laboratory/ant/index.xml Thu Mar 3 08:35:57 2005
@@ -21,100 +21,35 @@

<index>

- <import uri="artifact:module:dpml/metro/dpml-metro#SNAPSHOT"/>
+ <import uri="artifact:module:dpml/magic/dpml-magic#SNAPSHOT"/>

<project basedir="main">
<info>
- <group>dpml/magic</group>
- <name>dpml-magic-main</name>
+ <group>dpml/transit</group>
+ <name>dpml-transit-ant</name>
<type>jar</type>
</info>
<dependencies>
- <include key="dpml-magic-bootstrap"/>
- <include key="dpml-transit-plugin"/>
+ <include key="dpml-transit-tools"/>
<include key="ant"/>
- <include key="ant-launcher"/>
<include key="ant-junit"/>
<include key="commons-cli"/>
<include key="tools"/>
</dependencies>
</project>

- <resource>
- <info>
- <group>sun</group>
- <name>tools</name>
- <version>1.4.2</version>
- <type>jar</type>
- </info>
- </resource>
-
- <resource>
- <info>
- <group>ant</group>
- <name>ant-launcher</name>
- <version>1.6.2</version>
- <type>jar</type>
- </info>
- </resource>
-
-
<!--
Resources
-->

- <!--
- <resource>
- <info>
- <group>dpml/transit</group>
- <name>dpml-transit-main</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
- <type>jar</type>
- </info>
- </resource>
-
<resource>
<info>
- <group>ant</group>
- <name>ant</name>
- <version>1.6.2</version>
- <type>jar</type>
- </info>
- <dependencies>
- <include key="tools" build="false" runtime="true"/>
- </dependencies>
- </resource>
-
- <resource>
- <info>
- <group>ant</group>
- <name>ant-junit</name>
- <version>1.6.2</version>
- <type>jar</type>
- </info>
- <dependencies>
- <include key="junit" />
- </dependencies>
- </resource>
-
- <resource>
- <info>
- <group>junit</group>
- <name>junit</name>
- <version>3.8.1</version>
+ <group>sun</group>
+ <name>tools</name>
+ <version>1.4.2</version>
<type>jar</type>
</info>
</resource>

- <resource>
- <info>
- <group>commons-cli</group>
- <name>commons-cli</name>
- <version>1.0</version>
- <type>jar</type>
- </info>
- </resource>
- -->

-</index>
+ </index>

Modified: development/laboratory/ant/main/build.xml
==============================================================================
--- development/laboratory/ant/main/build.xml (original)
+++ development/laboratory/ant/main/build.xml Thu Mar 3 08:35:57 2005
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>

-<project name="dpml-magic-main" default="install" basedir="."
- xmlns:magic="antlib:net.dpml.magic"
xmlns:x="plugin:dpml/magic/dpml-magic-core" >
+<project name="dpml-transit-ant" default="install" basedir="."
+ xmlns:transit="antlib:net.dpml.transit"
xmlns:x="plugin:dpml/magic/dpml-magic-core" >

- <magic:import uri="artifact:template:dpml/magic/standard"/>
+ <transit:import uri="artifact:template:dpml/magic/standard"/>

<target name="init" depends="standard.init">
<x:filter feature="plugin" token="MAGIC-CLI-PLUGIN-URI"/>
@@ -16,11 +16,10 @@
<target name="install" depends="standard.install,bin"/>

<target name="bin" depends="prepare">
- <mkdir dir="${dpml.home}/bin"/>
- <copy todir="${dpml.home}/bin" overwrite="true">
+ <copy todir="${basedir}" overwrite="true">
<fileset dir="${basedir}/target/bin"/>
</copy>
- <chmod file="${dpml.home}/bin/magic" perm="755"/>
</target>

</project>
+

Modified: development/laboratory/ant/main/src/main/net/dpml/ant/AntPlugin.java
==============================================================================
--- development/laboratory/ant/main/src/main/net/dpml/ant/AntPlugin.java
(original)
+++ development/laboratory/ant/main/src/main/net/dpml/ant/AntPlugin.java
Thu Mar 3 08:35:57 2005
@@ -26,9 +26,9 @@

import net.dpml.transit.Transit;

-import net.dpml.magic.bootstrap.TransitComponentHelper;
-import net.dpml.magic.bootstrap.Map;
-import net.dpml.magic.bootstrap.MainTask;
+import net.dpml.transit.tools.TransitComponentHelper;
+import net.dpml.transit.tools.Map;
+import net.dpml.transit.tools.MainTask;

import org.apache.tools.ant.Main;
import org.apache.tools.ant.Project;
@@ -134,25 +134,24 @@
public void run()
{
Throwable error = null;
- Project project = new Project();

+ Project project = new Project();
project.setDefaultInputStream( System.in );
- //System.setIn(new DemuxInputStream(project));
- //System.setOut(new PrintStream(new DemuxOutputStream(project,
false)));
- //System.setErr(new PrintStream(new DemuxOutputStream(project,
true)));
-
setupTransitComponentHelper( project );
- //setupTransitProperties( project );

try
{
project.setCoreLoader( getClass().getClassLoader() );
project.addBuildListener( createLogger() );
+
+ System.setIn(new DemuxInputStream(project));
project.setProjectReference(new DefaultInputHandler());
project.fireBuildStarted();
+ project.setUserProperty( "ant.file", m_file.getAbsolutePath() );
project.init();

- ProjectHelper helper = setupTransitProjectHelper( project );
+ ProjectHelper helper = ProjectHelper.getProjectHelper();
+ ProjectHelper.configureProject( project, m_file );
helper.parse( project, m_file );

Vector targets = new Vector();
@@ -168,9 +167,7 @@
targets.addElement( project.getDefaultTarget() );
}
}
-
project.executeTargets(targets);
-
}
catch( Throwable e )
{
@@ -185,9 +182,9 @@
}
else
{
- project.fireBuildFinished( error );
System.out.println( "done" );
}
+ project.fireBuildFinished( error );
}
}

@@ -199,25 +196,6 @@
task.execute();
}

- private ProjectHelper setupTransitProjectHelper( Project project )
- {
- ProjectHelper helper = new TransitProjectHelper();
- project.addReference( "ant.projectHelper", helper );
- return helper;
- }
-
- /*
- private void setupTransitProperties( Project project )
- {
- File home = Transit.HOME;
- File docs = new File( home, "docs" );
- File cache = new File( home, "main" );
- project.setNewProperty( "dpml.home", home.getAbsolutePath() );
- project.setNewProperty( "dpml.docs", docs.getAbsolutePath() );
- project.setNewProperty( "dpml.cache", cache.getAbsolutePath() );
- }
- */
-
private BuildLogger createLogger()
{
BuildLogger logger = new DefaultLogger();



  • svn commit: r1931 - in development/laboratory/ant: . main main/src/main/net/dpml/ant, mcconnell, 03/03/2005

Archive powered by MHonArc 2.6.24.

Top of Page