Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2982 - in development/main: magic/core/src/main/net/dpml/magic/tasks test/components test/unit transit/core/handler/src/main/net/dpml/transit/unit transit/core/handler/src/test/net/dpml/transit/manager transit/core/tools/src/main/net/dpml/transit/tools

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: r2982 - in development/main: magic/core/src/main/net/dpml/magic/tasks test/components test/unit transit/core/handler/src/main/net/dpml/transit/unit transit/core/handler/src/test/net/dpml/transit/manager transit/core/tools/src/main/net/dpml/transit/tools
  • Date: Wed, 06 Jul 2005 16:28:12 -0400

Author: mcconnell AT dpml.net
Date: Wed Jul 6 16:28:12 2005
New Revision: 2982

Added:
development/main/test/components/build.xml
development/main/test/unit/build.xml

development/main/transit/core/handler/src/test/net/dpml/transit/manager/AuthorityTestCase.java
Modified:

development/main/magic/core/src/main/net/dpml/magic/tasks/ReplicateTask.java

development/main/transit/core/handler/src/main/net/dpml/transit/unit/TransitPreferences.java

development/main/transit/core/tools/src/main/net/dpml/transit/tools/TransitTask.java
Log:
o Fix issues concerning reslution of host urls anbd added a supporting
testcase
o FIx issue in replacate task to include links in replication
o added a couple of reactor builds

Modified:
development/main/magic/core/src/main/net/dpml/magic/tasks/ReplicateTask.java
==============================================================================
---
development/main/magic/core/src/main/net/dpml/magic/tasks/ReplicateTask.java
(original)
+++
development/main/magic/core/src/main/net/dpml/magic/tasks/ReplicateTask.java
Wed Jul 6 16:28:12 2005
@@ -135,6 +135,7 @@
log( relativeFilename, Project.MSG_VERBOSE );
fileset.createInclude().setName( relativeFilename );
fileset.createInclude().setName( relativeFilename + ".*" );
+ fileset.createInclude().setName( relativeFilename + ".*.*" );
count++;
}
else

Added: development/main/test/components/build.xml
==============================================================================
--- (empty file)
+++ development/main/test/components/build.xml Wed Jul 6 16:28:12 2005
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Copyright 2005 Stephen J McConnell
+
+ 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.
+-->
+
+<project name="dpml-test-components" default="default" basedir="."
+ xmlns:transit="antlib:net.dpml.transit">
+
+ <transit:import uri="artifact:template:dpml/magic/reactor"/>
+
+</project>

Added: development/main/test/unit/build.xml
==============================================================================
--- (empty file)
+++ development/main/test/unit/build.xml Wed Jul 6 16:28:12 2005
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Copyright 2005 Stephen J McConnell
+
+ 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.
+-->
+
+<project name="dpml-test-unit" default="default" basedir="."
+ xmlns:transit="antlib:net.dpml.transit">
+
+ <transit:import uri="artifact:template:dpml/magic/reactor"/>
+
+</project>

Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/unit/TransitPreferences.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/unit/TransitPreferences.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/unit/TransitPreferences.java
Wed Jul 6 16:28:12 2005
@@ -186,7 +186,15 @@
for( int i=0; i < paths.length; i++ )
{
String path = paths[i];
- URL spec = new URL( path );
+ URL spec = null;
+ try
+ {
+ spec = new URL( path );
+ }
+ catch( MalformedURLException e )
+ {
+ spec = new URL( authority, path );
+ }
setupHost( hostsPrefs, spec );
}
}

Added:
development/main/transit/core/handler/src/test/net/dpml/transit/manager/AuthorityTestCase.java
==============================================================================
--- (empty file)
+++
development/main/transit/core/handler/src/test/net/dpml/transit/manager/AuthorityTestCase.java
Wed Jul 6 16:28:12 2005
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2005 Stephen J. McConnell.
+ *
+ * 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.
+ */
+
+package net.dpml.transit.manager;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+
+import junit.framework.TestCase;
+
+import net.dpml.transit.model.TransitModel;
+import net.dpml.transit.model.HostModel;
+import net.dpml.transit.model.DefaultTransitModel;
+
+/**
+ * @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
+ */
+public class AuthorityTestCase extends TestCase
+{
+ static
+ {
+ System.setProperty(
+ "java.util.prefs.PreferencesFactory",
+ "net.dpml.transit.unit.LocalPreferencesFactory" );
+ System.setProperty( "dpml.transit.authority",
"http://staging.dpml.net/test/"; );
+ }
+
+ public void testAuthority() throws Exception
+ {
+ TransitModel model = new DefaultTransitModel();
+ HostModel[] hosts = model.getCacheModel().getHostModels();
+ assertEquals( "hosts", 2, hosts.length );
+ }
+}
+

Modified:
development/main/transit/core/tools/src/main/net/dpml/transit/tools/TransitTask.java
==============================================================================
---
development/main/transit/core/tools/src/main/net/dpml/transit/tools/TransitTask.java
(original)
+++
development/main/transit/core/tools/src/main/net/dpml/transit/tools/TransitTask.java
Wed Jul 6 16:28:12 2005
@@ -50,7 +50,6 @@
static
{
System.setProperty( "java.protocol.handler.pkgs", "net.dpml.transit"
);
- System.setProperty( "dpml.transit.authority",
"file:${dpml.prefs}/transit/authority" );
System.setProperty( "dpml.transit.profile", "development" );
}

@@ -118,6 +117,14 @@
updateProperty( project, "dpml.dist", dist.getAbsolutePath() );
updateProperty( project, "dpml.logs", dist.getAbsolutePath() );
updateProperty( project, "dpml.prefs", prefs.getAbsolutePath() );
+
+ String auth = project.getProperty( "dpml.transit.authority" );
+ if( null != auth )
+ {
+
+ System.setProperty( "dpml.transit.authority",
+ System.getProperty( "dpml.transit.authority", auth ) );
+ }
}

/**



  • svn commit: r2982 - in development/main: magic/core/src/main/net/dpml/magic/tasks test/components test/unit transit/core/handler/src/main/net/dpml/transit/unit transit/core/handler/src/test/net/dpml/transit/manager transit/core/tools/src/main/net/dpml/transit/tools, mcconnell, 07/06/2005

Archive powered by MHonArc 2.6.24.

Top of Page