notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r2243 - in development/main: magic/core/src/main/net/dpml/magic/model magic/core/src/main/net/dpml/magic/tasks transit/core/handler/src/main/net/dpml/transit/artifact
- From: mcconnell AT dpml.net
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r2243 - in development/main: magic/core/src/main/net/dpml/magic/model magic/core/src/main/net/dpml/magic/tasks transit/core/handler/src/main/net/dpml/transit/artifact
- Date: Thu, 07 Apr 2005 21:09:50 -0400
Author: mcconnell AT dpml.net
Date: Thu Apr 7 21:09:23 2005
New Revision: 2243
Modified:
development/main/magic/core/src/main/net/dpml/magic/model/Resource.java
development/main/magic/core/src/main/net/dpml/magic/tasks/ReplicateTask.java
development/main/transit/core/handler/src/main/net/dpml/transit/artifact/ArtifactURLConnection.java
Log:
Revert changes to the Resource class so that we pump files into the ant path
object and NOT artifact uris. Artifacts are not handled by Ant - in fact
they get totally screwed up. Some minor changes to the replicator task
(nothing important). Updated Transit ArtifactURLConnection to return the
cache based file location and *not* a temporary file as magic needs to be in
sync with transit about the cache root directory when constructing relative
filesets otherwise the replicate task is seriously broken. Longer term
solution is perhaps to move a part of replicator logic into transit-tools and
have transit to the construction of filesets based on a supplied set of
artifacts.
Modified:
development/main/magic/core/src/main/net/dpml/magic/model/Resource.java
==============================================================================
--- development/main/magic/core/src/main/net/dpml/magic/model/Resource.java
(original)
+++ development/main/magic/core/src/main/net/dpml/magic/model/Resource.java
Thu Apr 7 21:09:23 2005
@@ -268,10 +268,11 @@
String type = types[j];
if( !"theme".equals( type ) )
{
- //final File file = resource.getArtifact(
project, type );
- //path.createPathElement().setLocation( file
);
- final URI uri = resource.getArtifactURI(
type );
- path.createPathElement().setPath(
uri.toString() );
+ final File file = resource.getArtifact(
project, type );
+ path.createPathElement().setLocation( file );
+
+ //final URI uri = resource.getArtifactURI(
type );
+ //path.createPathElement().setPath(
uri.toString() );
}
}
}
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
Thu Apr 7 21:09:23 2005
@@ -118,9 +118,9 @@
{
getProject().log( "using replication path: " + m_path,
Project.MSG_VERBOSE );
- String root = cache.toString();
- String sequence = path.toString();
- String[] translation = Path.translatePath( getProject(), sequence );
+ String[] translation = path.list();
+ String root = cache.toString();
+
final FileSet fileset = new FileSet();
fileset.setDir( cache );
@@ -137,9 +137,14 @@
fileset.createInclude().setName( relativeFilename + ".*" );
count++;
}
+ else
+ {
+ log( "ignoring " + trans, Project.MSG_VERBOSE );
+ }
}
if( count > 0 )
{
+ log( "entries: " + count );
return fileset;
}
else
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/artifact/ArtifactURLConnection.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/artifact/ArtifactURLConnection.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/artifact/ArtifactURLConnection.java
Thu Apr 7 21:09:23 2005
@@ -190,6 +190,12 @@
InputStream content = getInputStream();
LocationResolver resolver = new ClassicResolver();
String name = resolver.resolvePath( m_artifact );
+
+ // DISABLED FOLLOWING CODE AS IT BREAKS MAGIC
+ // (IN PARTICULAR - REPLICATE TASK BREAKS WHICH IN TURN
BREAKS
+ // DISTRIBUTION BUILDS)
+
+ /*
File tempDir = new File( Transit.DPML_DATA, "temp" );
File destFile = new File( tempDir, name );
File parent = destFile.getParentFile();
@@ -197,6 +203,12 @@
FileOutputStream output = new FileOutputStream( destFile );
StreamUtils.copyStream( content, output, true );
return destFile;
+ */
+
+ // WORKAROUND
+
+ File cache = new File( Transit.DPML_DATA, "cache" );
+ return new File( cache, name );
}
}
return null;
- svn commit: r2243 - in development/main: magic/core/src/main/net/dpml/magic/model magic/core/src/main/net/dpml/magic/tasks transit/core/handler/src/main/net/dpml/transit/artifact, mcconnell, 04/07/2005
Archive powered by MHonArc 2.6.24.