notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r1347 - in development/laboratory/maven/magic-migrate: . src/conf src/main/net/dpml/magic/maven/migrate src/test src/test/net src/test/net/dpml src/test/net/dpml/magic src/test/net/dpml/magic/maven src/test/net/dpml/magic/maven/migrate
- From: mraad23 AT earthlink.net
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r1347 - in development/laboratory/maven/magic-migrate: . src/conf src/main/net/dpml/magic/maven/migrate src/test src/test/net src/test/net/dpml src/test/net/dpml/magic src/test/net/dpml/magic/maven src/test/net/dpml/magic/maven/migrate
- Date: Mon, 03 Jan 2005 03:49:06 +0100
Author: mraad23 AT earthlink.net
Date: Mon Jan 3 03:49:06 2005
New Revision: 1347
Added:
development/laboratory/maven/magic-migrate/src/conf/
development/laboratory/maven/magic-migrate/src/conf/defaults.properties
development/laboratory/maven/magic-migrate/src/conf/driver.properties
development/laboratory/maven/magic-migrate/src/conf/log4j.properties
development/laboratory/maven/magic-migrate/src/test/
development/laboratory/maven/magic-migrate/src/test/net/
development/laboratory/maven/magic-migrate/src/test/net/dpml/
development/laboratory/maven/magic-migrate/src/test/net/dpml/magic/
development/laboratory/maven/magic-migrate/src/test/net/dpml/magic/maven/
development/laboratory/maven/magic-migrate/src/test/net/dpml/magic/maven/migrate/
development/laboratory/maven/magic-migrate/src/test/net/dpml/magic/maven/migrate/MigateTest.java
Modified:
development/laboratory/maven/magic-migrate/maven.xml
development/laboratory/maven/magic-migrate/project.xml
development/laboratory/maven/magic-migrate/src/main/net/dpml/magic/maven/migrate/Migrate.java
Log:
Modified: development/laboratory/maven/magic-migrate/maven.xml
==============================================================================
--- development/laboratory/maven/magic-migrate/maven.xml (original)
+++ development/laboratory/maven/magic-migrate/maven.xml Mon Jan 3
03:49:06 2005
@@ -1,23 +1,26 @@
-<!--
+<!--
Copyright 2004 Stephen J McConnell
Copyright 2004 Niclas Hedhman
-
+
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
+ You may obtain a copy of the License at
+
http://www.apache.org/licenses/LICENSE-2.0
-
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
-
+
See the License for the specific language governing permissions and
limitations under the License.
-->
<project default="plugin:install" xmlns:ant="jelly:ant">
+ <preGoal name="test:test">
+ <delete file="build.xml"/>
+ </preGoal>
</project>
Modified: development/laboratory/maven/magic-migrate/project.xml
==============================================================================
--- development/laboratory/maven/magic-migrate/project.xml (original)
+++ development/laboratory/maven/magic-migrate/project.xml Mon Jan 3
03:49:06 2005
@@ -1,104 +1,431 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
Copyright 2004 Stephen J McConnell
Copyright 2004 Niclas Hedhman
-
+
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
+ You may obtain a copy of the License at
+
http://www.apache.org/licenses/LICENSE-2.0
-
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
-
+
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-<project>
- <pomVersion>3</pomVersion>
- <groupId>dpml/magic/maven</groupId>
- <id>magic-migrate</id>
- <currentVersion>1.0</currentVersion>
-
- <name>Magic Migration Plugin</name>
- <description>
+<project>
+ <pomVersion>3</pomVersion>
+ <id>magic-migrate</id>
+ <name>Magic Migration Plugin</name>
+ <groupId>dpml/magic/maven</groupId>
+ <currentVersion>1.0</currentVersion>
+ <organization>
+ <name>Digital Product Meta Library</name>
+ </organization>
+ <inceptionYear>2004</inceptionYear>
+ <description>
This Plugin will liberate your projects from using Maven to the more
sophisticated, flexible and powerful Magic build system from Digital
Product Meta Library.
- </description>
- <shortDescription>Migration from Maven to Magic.</shortDescription>
-
- <organization>
- <name>Digital Product Meta Library</name>
- </organization>
- <inceptionYear>2004</inceptionYear>
-
- <developers>
- <developer>
- <name>Niclas Hedhman</name>
- <id>niclas</id>
- <email>niclas AT hedhman.org</email>
- <organization>Digital Product Meta Library</organization>
- <roles>
- <role>Developer</role>
- <role>Architect</role>
- <role>Visionary</role>
- <role>Janitor</role>
- </roles>
- </developer>
- </developers>
-
- <dependencies>
-
- <dependency>
- <groupId>maven</groupId>
- <artifactId>maven</artifactId>
- <version>1.0.2</version>
- </dependency>
-
- <dependency>
- <groupId>dpml/magic</groupId>
- <artifactId>dpml-magic</artifactId>
- <version>LATEST</version>
- </dependency>
-
- <dependency>
- <groupId>dpml/transit</groupId>
- <artifactId>dpml-transit</artifactId>
- <version>LATEST</version>
- </dependency>
-
- </dependencies>
-
- <build>
- <!-- Useful if your plugin uses some beans -->
- <sourceDirectory>src/main</sourceDirectory>
- <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
-
- <unitTest>
- <includes>
- <include>**/*Test.java</include>
- </includes>
- </unitTest>
-
- <resources>
- <resource>
- <directory>${basedir}/src/plugin-resources</directory>
- <targetPath>plugin-resources</targetPath>
- </resource>
- <resource>
- <directory>${basedir}</directory>
- <includes>
- <include>plugin.jelly</include>
- <include>plugin.properties</include>
- <include>project.properties</include>
- <include>project.xml</include>
- </includes>
- </resource>
- </resources>
- </build>
+ </description>
+ <shortDescription>Migration from Maven to Magic.</shortDescription>
+ <developers>
+ <developer>
+ <name>Niclas Hedhman</name>
+ <id>niclas</id>
+ <email>niclas AT hedhman.org</email>
+ <organization>Digital Product Meta Library</organization>
+ <roles>
+ <role>Developer</role>
+ <role>Architect</role>
+ <role>Visionary</role>
+ <role>Janitor</role>
+ </roles>
+ </developer>
+ </developers>
+ <contributors>
+ <contributor>
+ <name>Mansour Raad</name>
+ <email>mraad23 AT earthlink.net</email>
+ </contributor>
+ </contributors>
+ <dependencies>
+
+ <dependency>
+ <groupId>dpml/magic</groupId>
+ <artifactId>dpml-magic</artifactId>
+ <version>LATEST</version>
+ </dependency>
+ <dependency>
+ <groupId>dpml/transit</groupId>
+ <artifactId>dpml-transit</artifactId>
+ <version>LATEST</version>
+ </dependency>
+
+ <dependency>
+ <id>dom4j</id>
+ <version>1.4-dev-8</version>
+ <url>http://www.dom4j.org/</url>
+ <properties>
+ <description>ouch</description>
+ </properties>
+ </dependency>
+ <dependency>
+ <id>ant</id>
+ <version>1.5.3-1</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-optional</artifactId>
+ <version>1.5.3-1</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <!-- ant 1.6 deps - Ant 1.6 messes up any use of the "root" classloader
for taskdefs
+ <dependency>
+ <id>ant</id>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-antlr</artifactId>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-apache-bsf</artifactId>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-apache-resolver</artifactId>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-commons-logging</artifactId>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-commons-net</artifactId>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-icontract</artifactId>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-jai</artifactId>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-jakarta-bcel</artifactId>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-jakarta-log4j</artifactId>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-jakarta-oro</artifactId>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-jakarta-regexp</artifactId>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-javamail</artifactId>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-jdepend</artifactId>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-jmf</artifactId>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-jsch</artifactId>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-junit</artifactId>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-launcher</artifactId>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-nodeps</artifactId>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-starteam</artifactId>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-swing</artifactId>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-trax</artifactId>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-weblogic</artifactId>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-xalan2</artifactId>
+ <version>1.6</version>
+ <url>http://ant.apache.org/</url>
+ </dependency>
+ ant-netrexx.jar
+ ant-stylebook.jar
+ ant-vaj.jar
+ ant-xalan1.jar
+ ant-xslp.jar
+ -->
+ <dependency>
+ <id>commons-betwixt</id>
+ <version>1.0-beta-1.20030111.103454</version>
+ <url>http://jakarta.apache.org/commons/betwixt/</url>
+ </dependency>
+ <!-- TODO: can be removed? -->
+ <dependency>
+ <id>commons-digester</id>
+ <version>1.4.1</version>
+ <url>http://jakarta.apache.org/commons/digester/</url>
+ </dependency>
+ <dependency>
+ <id>commons-jelly</id>
+ <version>1.0-beta-4</version>
+ <url>http://jakarta.apache.org/commons/jelly/</url>
+ </dependency>
+ <dependency>
+ <groupId>commons-jelly</groupId>
+ <artifactId>commons-jelly-tags-ant</artifactId>
+ <version>1.0</version>
+ <url>http://jakarta.apache.org/commons/jelly/tags/ant/</url>
+ </dependency>
+ <dependency>
+ <groupId>commons-jelly</groupId>
+ <artifactId>commons-jelly-tags-define</artifactId>
+ <version>1.0</version>
+ <url>http://jakarta.apache.org/commons/jelly/tags/define/</url>
+ </dependency>
+ <dependency>
+ <groupId>commons-jelly</groupId>
+ <artifactId>commons-jelly-tags-util</artifactId>
+ <version>1.0</version>
+ <url>http://jakarta.apache.org/commons/jelly/tags/util/</url>
+ </dependency>
+ <dependency>
+ <groupId>commons-jelly</groupId>
+ <artifactId>commons-jelly-tags-xml</artifactId>
+ <version>1.0</version>
+ <url>http://jakarta.apache.org/commons/jelly/tags/xml/</url>
+ </dependency>
+ <!-- TODO: can be removed? -->
+ <dependency>
+ <id>commons-graph</id>
+ <version>0.8.1</version>
+ <url>http://jakarta.apache.org/commons/sandbox/graph/</url>
+ </dependency>
+ <dependency>
+ <id>commons-jexl</id>
+ <version>1.0</version>
+ <url>http://jakarta.apache.org/commons/jexl/</url>
+ </dependency>
+ <dependency>
+ <id>commons-logging</id>
+ <version>1.0.3</version>
+ <url>http://jakarta.apache.org/commons/logging/</url>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <id>werkz</id>
+ <version>20040426.222000</version>
+ <url>http://werkz.codehaus.org/</url>
+ </dependency>
+ <!-- Runtime dependencies -->
+ <dependency>
+ <id>commons-beanutils</id>
+ <version>1.6.1</version>
+ <url>http://jakarta.apache.org/commons/</url>
+ </dependency>
+ <dependency>
+ <id>commons-cli</id>
+ <version>1.0-beta-2</version>
+ <url>http://jakarta.apache.org/commons/cli/</url>
+ </dependency>
+ <dependency>
+ <id>commons-collections</id>
+ <version>2.1</version>
+ <url>http://jakarta.apache.org/commons/</url>
+ </dependency>
+ <dependency>
+ <id>commons-grant</id>
+ <version>1.0-beta-4</version>
+ <url>http://jakarta.apache.org/commons/sandbox/grant/</url>
+ </dependency>
+ <dependency>
+ <id>commons-io</id>
+ <version>1.0</version>
+ <url>http://jakarta.apache.org/commons/</url>
+ </dependency>
+ <dependency>
+ <id>commons-lang</id>
+ <version>2.0</version>
+ <url>http://jakarta.apache.org/commons/lang/</url>
+ </dependency>
+ <dependency>
+ <id>forehead</id>
+ <version>1.0-beta-5</version>
+ </dependency>
+ <dependency>
+ <id>log4j</id>
+ <version>1.2.8</version>
+ <url>http://logging.apache.org/log4j/</url>
+ </dependency>
+ <!-- TODO: can be removed? -->
+ <dependency>
+ <id>which</id>
+ <version>1.0</version>
+ <url>http://xml.apache.org/commons/components/which/index.html</url>
+ </dependency>
+ <!-- this is a dependency, but as the classes ship with ant, bootstrap
will
+ fail with linkage errors if it's included and the junit tests are not
+ forked
+ -->
+ <dependency>
+ <id>xml-apis</id>
+ <version>1.0.b2</version>
+ <url>http://xml.apache.org/xerces2-j/</url>
+ <properties>
+ <endorsed>true</endorsed>
+ </properties>
+ </dependency>
+ <dependency>
+ <id>xerces</id>
+ <version>2.4.0</version>
+ <url>http://xml.apache.org/xerces2-j/</url>
+ <properties>
+ <endorsed>true</endorsed>
+ </properties>
+ </dependency>
+ <dependency>
+ <groupId>plexus</groupId>
+ <artifactId>plexus</artifactId>
+ <version>0.6</version>
+ </dependency>
+ <dependency>
+ <groupId>maven</groupId>
+ <artifactId>maven</artifactId>
+ <version>1.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>maven</groupId>
+ <artifactId>maven-jelly-tags</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+<!--
+ <dependency>
+ <groupId>maven</groupId>
+ <artifactId>maven-model</artifactId>
+ <version>1.1-SNAPSHOT</version>
+ </dependency>
+-->
+ <dependency>
+ <groupId>xpp3</groupId>
+ <artifactId>xpp3</artifactId>
+ <version>1.1.3.3</version>
+ </dependency>
+
+ </dependencies>
+ <build>
+ <!-- Useful if your plugin uses some beans -->
+ <sourceDirectory>src/main</sourceDirectory>
+ <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
+ <unitTest>
+ <includes>
+ <include>**/*Test.java</include>
+ </includes>
+ </unitTest>
+ <resources>
+ <resource>
+ <directory>${basedir}/src/plugin-resources</directory>
+ <targetPath>plugin-resources</targetPath>
+ </resource>
+ <resource>
+ <directory>${basedir}</directory>
+ <includes>
+ <include>plugin.jelly</include>
+ <include>plugin.properties</include>
+ <include>project.properties</include>
+ <include>project.xml</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>${basedir}/src/conf</directory>
+ <includes>
+ <include>*.properties</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </build>
</project>
Added: development/laboratory/maven/magic-migrate/src/conf/defaults.properties
==============================================================================
--- (empty file)
+++ development/laboratory/maven/magic-migrate/src/conf/defaults.properties
Mon Jan 3 03:49:06 2005
@@ -0,0 +1,88 @@
+# -------------------------------------------------------------------
+# Copyright 2001-2004 The Apache Software Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# -------------------------------------------------------------------
+
+# -------------------------------------------------------------------
+# D R I V E R P R O P E R T I E S
+# -------------------------------------------------------------------
+
+maven.home.local = ${user.home}/.maven
+
+maven.property.inheritance=true
+
+maven.src.dir = ${basedir}/src
+maven.conf.dir = ${basedir}/conf
+maven.build.dir = ${basedir}/target
+maven.build.src = ${maven.build.dir}/src
+maven.build.dest = ${maven.build.dir}/classes
+
+# These should be in the java plugin
+maven.compile.debug = on
+maven.compile.optimize = off
+maven.compile.deprecation = off
+
+# ------------------------------------------------------------------
+# R E P O R T I N G P R O P E R T I E S
+# ------------------------------------------------------------------
+maven.docs.src = ${basedir}/xdocs
+maven.docs.dest = ${maven.build.dir}/docs
+maven.docs.outputencoding = ISO-8859-1
+maven.docs.omitXmlDeclaration=false
+maven.gen.docs = ${maven.build.dir}/generated-xdocs
+
+
+# -------------------------------------------------------------------
+# M A V E N L O C A L R E P O
+# -------------------------------------------------------------------
+
+maven.repo.local = ${maven.home.local}/repository
+
+# -------------------------------------------------------------------
+# M A V E N P L U G - I N D I R E C T O R Y
+# -------------------------------------------------------------------
+maven.plugin.dir = ${maven.home}/plugins
+maven.plugin.user.dir = ${maven.home.local}/plugins
+maven.plugin.unpacked.dir = ${maven.home.local}/cache
+
+# -------------------------------------------------------------------
+# M A V E N R E M O T E R E P O S
+# -------------------------------------------------------------------
+
+maven.repo.remote = http://www.ibiblio.org/maven
+# No longer default to publishing to ibiblio
+#maven.repo.central = login.ibiblio.org
+#maven.repo.central.directory = /public/html/maven
+maven.repo.remote.enabled = true
+maven.mode.online = true
+
+# -------------------------------------------------------------------
+# M A V E N D I S T R I B U T I O N S
+# -------------------------------------------------------------------
+# DEPRECATED: remove
+maven.distBuildDirectory = ${basedir}/target
+maven.distBuildIndicator = DIST_BUILD_DIRECTORY
+maven.distDirectory = ${basedir}/dist
+
+# -------------------------------------------------------------------
+# E N V I R O N M E N T D E P E N D E N T T O O L S
+# -------------------------------------------------------------------
+maven.scp.executable = scp
+maven.ssh.executable = ssh
+maven.username=USERNAME_NOT_SET
+maven.remote.group=maven
+
+# DEPRECATED: remove
+maven.build = MAVEN_BUILD_NOT_SET
+
Added: development/laboratory/maven/magic-migrate/src/conf/driver.properties
==============================================================================
--- (empty file)
+++ development/laboratory/maven/magic-migrate/src/conf/driver.properties
Mon Jan 3 03:49:06 2005
@@ -0,0 +1,5 @@
+# -------------------------------------------------------------------
+# D R I V E R P R O P E R T I E S
+# -------------------------------------------------------------------
+# maven.final.name = ${pom.artifactId}-${pom.currentVersion}
+# maven.final.dir = ${basedir}/${maven.final.name}
Added: development/laboratory/maven/magic-migrate/src/conf/log4j.properties
==============================================================================
--- (empty file)
+++ development/laboratory/maven/magic-migrate/src/conf/log4j.properties
Mon Jan 3 03:49:06 2005
@@ -0,0 +1,27 @@
+# ------------------------------------------------------------------------
+# L O G 4 J C O N F I G U R A T I O N
+# ------------------------------------------------------------------------
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%m%n
+
+# ------------------------------------------------------------------------
+# R O O T C A T E G O R Y
+# ------------------------------------------------------------------------
+log4j.rootCategory=ERROR, console
+
+# ------------------------------------------------------------------------
+# J E L L Y T A G S
+# ------------------------------------------------------------------------
+log4j.category.org.apache.commons.jelly.tags.log=INFO
+log4j.category.org.apache.commons.jelly.tags.ant=OFF
+
+# ------------------------------------------------------------------------
+# M A V E N
+# ------------------------------------------------------------------------
+log4j.category.org.apache.maven=DEBUG
+
+# ------------------------------------------------------------------------
+# C O M M O N S
+# ------------------------------------------------------------------------
+log4j.category.org.apache.commons=WARN
Modified:
development/laboratory/maven/magic-migrate/src/main/net/dpml/magic/maven/migrate/Migrate.java
==============================================================================
---
development/laboratory/maven/magic-migrate/src/main/net/dpml/magic/maven/migrate/Migrate.java
(original)
+++
development/laboratory/maven/magic-migrate/src/main/net/dpml/magic/maven/migrate/Migrate.java
Mon Jan 3 03:49:06 2005
@@ -1,22 +1,22 @@
-/*
+/*
Copyright 2004 Stephen J McConnell
Copyright 2004 Niclas Hedhman
-
+
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
+ You may obtain a copy of the License at
+
http://www.apache.org/licenses/LICENSE-2.0
-
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
-
+
See the License for the specific language governing permissions and
limitations under the License.
*/
-
+
package net.dpml.magic.maven.migrate;
import java.io.File;
@@ -25,130 +25,130 @@
import org.apache.maven.project.Project;
-public class Migrate
-{
- public void migrate( Project proj, String dpml )
- {
- }
-
- public void createDpml( Project proj, String dpml )
- {
- System.out.println( "Project:" + proj.getName() );
- System.out.println( "DPML_HOME=" + dpml );
- if( dpml == null )
- dpml = System.getProperty( "user.home" + "/.dpml" );
- File dpml_home = new File( dpml );
- dpml_home.mkdirs();
-
- File bindir = new File( dpml_home, "bin" );
- bindir.mkdirs();
-
- File transitdir = new File( dpml_home, "transit/authority" );
- transitdir.mkdirs();
-
- File cachedir = new File( dpml_home, "main" );
- cachedir.mkdirs();
-
- File docsdir = new File( dpml_home, "docs" );
- docsdir.mkdirs();
-
- String magicPath = proj.getDependencyPath( "dpml-magic" );
- System.out.println( "Magic path=" + magicPath );
-
- String transitPath = proj.getDependencyPath( "dpml-transit" );
- System.out.println( "Transit path=" + transitPath );
-
-
- }
+public class Migrate {
+ public void migrate(
+ Project proj,
+ String dpml
+ ) {
+ }
- public void createBuilds( Project proj, String dpml )
- throws IOException
- {
- File cwd = new File( "." );
- processDir( cwd );
- }
-
- private void processDir( File dir )
- throws IOException
- {
- File[] entries = dir.listFiles();
- if( isProjectDir( dir ) )
- {
- createStandardBuild( dir, entries );
- }
- else
- {
- createReactorBuild( dir );
- recurse( entries );
- }
- }
+ public void createDpml(
+ Project proj,
+ String dpml
+ ) {
+ System.out.println("Project:" + proj.getName());
+ System.out.println("DPML_HOME=" + dpml);
+ if (dpml == null) {
+ dpml = System.getProperty("user.home" + "/.dpml");
+ }
+ System.out.println("dpml = " + dpml);
+ File dpml_home = new File(dpml);
+ dpml_home.mkdirs();
- private void recurse( File[] entries )
- {
- for( int i = 0 ; i < entries.length ; i++ )
- processDir( entries[i] );
- }
-
- private boolean isProjectDir( File dir, File[] entries )
- {
- for( int i=0 ; i < entries.length ; i++ )
- {
- if( entries[i].getName().equals( "src" ) )
- return true;
- }
- return false;
- }
-
- private void createStandardBuild( File dir )
- throws IOException
- {
- StringBuffer content = new StringBuffer( 500 );
- content.append( "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" );
- content.append( "<project name=\"dpml-runtime\" default=\"default\"
basedir=\".\"\n" );
- content.append( " xmlns:magic=\"antlib:net.dpml.magic\">\n" );
- content.append( "\n" );
- content.append( " <magic:import
uri=\"artifact:template:dpml/magic/standard\"/>\n" );
- content.append( "\n" );
- content.append( "</project>\n" );
- write( dir, content.toString() );
+ File bindir = new File(dpml_home, "bin");
+ bindir.mkdirs();
+
+ File transitdir = new File(dpml_home, "transit/authority");
+ transitdir.mkdirs();
+
+ File cachedir = new File(dpml_home, "main");
+ cachedir.mkdirs();
+
+ File docsdir = new File(dpml_home, "docs");
+ docsdir.mkdirs();
+
+ String magicPath = proj.getDependencyPath("dpml-magic");
+ System.out.println("Magic path=" + magicPath);
+
+ String transitPath = proj.getDependencyPath("dpml-transit");
+ System.out.println("Transit path=" + transitPath);
+
+
+ }
+
+ public void createBuilds(
+ Project proj,
+ String dpml
+ )
+ throws IOException {
+ File cwd = new File(".");
+ processDir(cwd);
+ }
+
+ private void processDir(File dir)
+ throws IOException {
+ File[] entries = dir.listFiles();
+ if (isProjectDir(dir, entries)) {
+ createStandardBuild(dir);
+ } else {
+ createReactorBuild(dir);
+ recurse(entries);
}
-
-
- private void createReactorBuild( File dir )
- throws IOException
- {
- StringBuffer content = new StringBuffer( 500 );
- content.append( "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" );
- content.append( "<project name=\"dpml-runtime\" default=\"default\"
basedir=\".\"\n" );
- content.append( " xmlns:magic=\"antlib:net.dpml.magic\">\n" );
- content.append( "\n" );
- content.append( " <magic:import
uri=\"artifact:template:dpml/magic/reactor\"/>\n" );
- content.append( "\n" );
- content.append( "</project>\n" );
- write( dir, content.toString() );
+ }
+
+ private void recurse(File[] entries) throws java.io.IOException {
+ for (int i = 0; i < entries.length; i++)
+ processDir(entries[i]);
+ }
+
+ private boolean isProjectDir(
+ File dir,
+ File[] entries
+ ) {
+ for (int i = 0; i < entries.length; i++) {
+ if (entries[i].getName().equals("src"))
+ return true;
}
-
- private void write( File dir, String content )
- throws IOException
- {
- FileOutputStream fos;
- try
- {
- File f = new File( dir, "build.xml" );
- if( f.exists() )
- throw new IOException( "File already exists: " + f );
- fos = new FileOutputStream( f );
- OutputStreamWriter osw = new OutputStreamWriter( fos, "UTF-8" );
- BufferedWriter writer = new BufferedWriter( osw );
- writer.write( content );
- writer.flush();
- writer.close();
-
- } finally
- {
- fos.close();
- }
+ return false;
+ }
+
+ private void createStandardBuild(File dir)
+ throws IOException {
+ StringBuffer content = new StringBuffer(500);
+ content.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n");
+ content.append("<project name=\"dpml-runtime\" default=\"default\"
basedir=\".\"\n");
+ content.append(" xmlns:magic=\"antlib:net.dpml.magic\">\n");
+ content.append("\n");
+ content.append(" <magic:import
uri=\"artifact:template:dpml/magic/standard\"/>\n");
+ content.append("\n");
+ content.append("</project>\n");
+ write(dir, content.toString());
+ }
+
+
+ private void createReactorBuild(File dir)
+ throws IOException {
+ StringBuffer content = new StringBuffer(500);
+ content.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n");
+ content.append("<project name=\"dpml-runtime\" default=\"default\"
basedir=\".\"\n");
+ content.append(" xmlns:magic=\"antlib:net.dpml.magic\">\n");
+ content.append("\n");
+ content.append(" <magic:import
uri=\"artifact:template:dpml/magic/reactor\"/>\n");
+ content.append("\n");
+ content.append("</project>\n");
+ write(dir, content.toString());
+ }
+
+ private void write(
+ File dir,
+ String content
+ )
+ throws IOException {
+ File f = new File(dir, "build.xml");
+ if (f.exists())
+ throw new IOException("File already exists: " + f);
+ final java.io.FileOutputStream fos = new FileOutputStream(f);
+ try {
+ java.io.OutputStreamWriter osw = new java.io.OutputStreamWriter(fos,
"UTF-8");
+ java.io.BufferedWriter writer = new java.io.BufferedWriter(osw);
+ writer.write(content);
+ writer.flush();
+ writer.close();
+ } finally {
+ fos.close();
}
+ }
+
}
-
-
+
+
Added:
development/laboratory/maven/magic-migrate/src/test/net/dpml/magic/maven/migrate/MigateTest.java
==============================================================================
--- (empty file)
+++
development/laboratory/maven/magic-migrate/src/test/net/dpml/magic/maven/migrate/MigateTest.java
Mon Jan 3 03:49:06 2005
@@ -0,0 +1,17 @@
+package net.dpml.magic.maven.migrate;
+
+/**
+ * @author <a href="mailto:mraad AT e-iit.com";>mansour</a>
+ * @version $Revision$ $Date$
+ */
+public class MigateTest
+ extends junit.framework.TestCase {
+
+ public void testMigrate() throws java.net.URISyntaxException,
org.apache.maven.MavenException, java.io.IOException {
+ final java.io.File basedir = new java.io.File(".");
+ final java.io.File mavenFile = new java.io.File(basedir, "project.xml");
// Create file with parent file, or NPE will be thrown.
+ final org.apache.maven.project.Project project =
org.apache.maven.MavenUtils.getProject(mavenFile, null, false);
+ final Migrate migrate = new Migrate();
+ migrate.createBuilds(project, null);
+ }
+}
- svn commit: r1347 - in development/laboratory/maven/magic-migrate: . src/conf src/main/net/dpml/magic/maven/migrate src/test src/test/net src/test/net/dpml src/test/net/dpml/magic src/test/net/dpml/magic/maven src/test/net/dpml/magic/maven/migrate, mraad23, 01/02/2005
Archive powered by MHonArc 2.6.24.