notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r2444 - in development/main: magic magic/core magic/core/src/main/net/dpml/magic magic/core/src/main/net/dpml/magic/builder magic/core/src/main/net/dpml/magic/model magic/core/src/main/net/dpml/magic/tasks metro transit transit/core transit/core/handler/etc/test/trusted/dpml/test/plugins transit/core/handler/src/main/net/dpml/transit transit/core/handler/src/main/net/dpml/transit/cache transit/core/handler/src/test transit/core/handler/src/test/net/dpml/transit/repository transit/core/plugin transit/core/tools/src/main/net/dpml/transit/tools
- From: niclas AT hedhman.org
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r2444 - in development/main: magic magic/core magic/core/src/main/net/dpml/magic magic/core/src/main/net/dpml/magic/builder magic/core/src/main/net/dpml/magic/model magic/core/src/main/net/dpml/magic/tasks metro transit transit/core transit/core/handler/etc/test/trusted/dpml/test/plugins transit/core/handler/src/main/net/dpml/transit transit/core/handler/src/main/net/dpml/transit/cache transit/core/handler/src/test transit/core/handler/src/test/net/dpml/transit/repository transit/core/plugin transit/core/tools/src/main/net/dpml/transit/tools
- Date: Thu, 28 Apr 2005 19:14:07 -0400
Author: niclas AT hedhman.org
Date: Thu Apr 28 19:13:59 2005
New Revision: 2444
Removed:
development/main/transit/core/handler/src/main/net/dpml/transit/cache/RemoteCacheHandler.java
Modified:
development/main/magic/core/build.xml
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/builder/XMLDefinitionBuilder.java
development/main/magic/core/src/main/net/dpml/magic/model/Definition.java
development/main/magic/core/src/main/net/dpml/magic/model/Info.java
development/main/magic/core/src/main/net/dpml/magic/model/Resource.java
development/main/magic/core/src/main/net/dpml/magic/tasks/BarTask.java
development/main/magic/core/src/main/net/dpml/magic/tasks/BlockTask.java
development/main/magic/core/src/main/net/dpml/magic/tasks/DistTask.java
development/main/magic/core/src/main/net/dpml/magic/tasks/ExportTask.java
development/main/magic/core/src/main/net/dpml/magic/tasks/InstallTask.java
development/main/magic/core/src/main/net/dpml/magic/tasks/JavadocTask.java
development/main/magic/core/src/main/net/dpml/magic/tasks/ModuleTask.java
development/main/magic/core/src/main/net/dpml/magic/tasks/ReactorTask.java
development/main/magic/core/src/main/net/dpml/magic/tasks/TarTask.java
development/main/magic/index.xml
development/main/metro/index.xml
development/main/transit/core/handler/etc/test/trusted/dpml/test/plugins/sample.plugin
development/main/transit/core/handler/src/main/net/dpml/transit/Main.java
development/main/transit/core/handler/src/main/net/dpml/transit/SecuredTransitContext.java
development/main/transit/core/handler/src/main/net/dpml/transit/TransitException.java
development/main/transit/core/handler/src/main/net/dpml/transit/cache/CacheHandler.java
development/main/transit/core/handler/src/main/net/dpml/transit/cache/FileCacheHandler.java
development/main/transit/core/handler/src/test/net/dpml/transit/repository/PropertiesPluginTestCase.java
development/main/transit/core/handler/src/test/plugin.properties
development/main/transit/core/overview.html
development/main/transit/core/plugin/core-plugin.iml
development/main/transit/core/tools/src/main/net/dpml/transit/tools/TransitComponentHelper.java
development/main/transit/core/tools/src/main/net/dpml/transit/tools/package.html
development/main/transit/standard.xml
development/main/transit/transit.iws
Log:
o Removal of <version> and <status> elements in index.xml
o Removal of Remote/RMI handling in Transit.
o Fixed that dpml.release.signature works again.
o Formatting and house keeping.
Modified: development/main/magic/core/build.xml
==============================================================================
--- development/main/magic/core/build.xml (original)
+++ development/main/magic/core/build.xml Thu Apr 28 19:13:59 2005
@@ -1,24 +1,24 @@
<?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 name="dpml-magic-core" default="install" basedir="."
+<project name="dpml-magic-core" default="install" basedir="."
xmlns:transit="antlib:net.dpml.transit">
<transit:import uri="artifact:template:dpml/transit/standard"/>
@@ -44,8 +44,9 @@
<taskdef name="export" classname="net.dpml.magic.tasks.ExportTask">
<classpath refid="project.main.path"/>
</taskdef>
+ <echo>plugin:dpml/magic/dpml-magic-core#${dpml.build.signature}</echo>
<export>
- <antlib resource="net/dpml/magic/plugin.xml"
urn="plugin:dpml/magic/dpml-magic-core"/>
+ <antlib resource="net/dpml/magic/plugin.xml"
urn="plugin:dpml/magic/dpml-magic-core#${dpml.build.signature}"/>
</export>
</target>
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 Thu
Apr 28 19:13:59 2005
@@ -296,7 +296,7 @@
* @return array of know definitions
*/
public Definition[] getDefinitions()
- throws BuildException
+ throws BuildException
{
final ArrayList list = new ArrayList();
final Resource[] resources = getResources();
@@ -319,7 +319,7 @@
* @return array of subsidiary resources
*/
public ResourceRef[] getSubsidiaryRefs( Resource module )
- throws BuildException
+ throws BuildException
{
if( !"module".equals( module.getInfo().getType() ) )
{
@@ -364,7 +364,7 @@
* @return array of subsidiary definitions
*/
public Definition[] getSubsidiaryDefinitions( Resource module )
- throws BuildException
+ throws BuildException
{
final String group = module.getInfo().getGroup();
final ArrayList list = new ArrayList();
@@ -391,7 +391,7 @@
* @exception BuildException if the resource is unknown
*/
public Resource getResource( final String key )
- throws BuildException
+ throws BuildException
{
final ResourceRef reference = new ResourceRef( key );
return getResource( reference );
@@ -403,7 +403,7 @@
* @exception BuildException if the resource is unknown
*/
public Resource getResource( final ResourceRef reference )
- throws BuildException
+ throws BuildException
{
final String key = reference.getKey();
final Resource resource = (Resource) m_resources.get( key );
@@ -420,7 +420,7 @@
* @exception BuildException if the definition is unknown
*/
public Definition getDefinition( final String key )
- throws BuildException
+ throws BuildException
{
final ResourceRef reference = new ResourceRef( key );
return getDefinition( reference );
@@ -432,7 +432,7 @@
* @exception BuildException if the definition is unknown
*/
public Definition getDefinition( final ResourceRef reference )
- throws BuildException
+ throws BuildException
{
final Resource resource = getResource( reference );
if( resource instanceof Definition )
@@ -462,13 +462,15 @@
private void buildList( final File source, String uri )
{
- if( m_includes.contains( source.toString() ) )
+ final String filename = source.toString();
+ final boolean exists = m_includes.contains( filename );
+ if( exists )
{
return;
}
log( "import: " + source, Project.MSG_DEBUG );
- m_includes.add( source.toString() );
+ m_includes.add( filename );
try
{
@@ -531,19 +533,19 @@
}
else
{
- final String error =
- "Unexpected root module element name ["
- + rootElementName
- + "] while reading source ["
+ final String error =
+ "Unexpected root module element name ["
+ + rootElementName
+ + "] while reading source ["
+ source + "].";
throw new BuildException( error );
}
}
catch( Throwable e )
{
- final String error =
- "Module construction failure using source ["
- + source
+ final String error =
+ "Module construction failure using source ["
+ + source
+ "]";
throw new BuildException( error, e );
}
@@ -565,7 +567,7 @@
+ uri
+ "]."
+ ioe.toString();
- throw new BuildException( error, ioe );
+ throw new BuildException( error, ioe );
}
}
@@ -580,7 +582,7 @@
if( "".equals( moduleUri ) || ( null == moduleUri ) )
{
String mess =
- "Modules must contain a \"uri\" attribute in the root module
element: "
+ "Modules must contain a \"uri\" attribute in the root module
element: "
+ source;
throw new BuildException( mess );
}
@@ -597,11 +599,11 @@
}
else
{
- final String error =
- "Source index or module ["
- + source
- + "] declares the key ["
- + key
+ final String error =
+ "Source index or module ["
+ + source
+ + "] declares the key ["
+ + key
+ "] that is already bound.";
throw new BuildException( error );
}
@@ -616,8 +618,19 @@
Module link = buildModule( spec );
refs[i] = new ResourceRef( link.getKey() );
}
-
+
final Element resources = ElementHelper.getChild( root, "resources"
);
+ final ResourceRef[] children = buildResources( resources, source,
moduleUri );
+
+ Module module = new Module( this, key, info, refs, "key:NULL",
header, children );
+ m_resources.put( key, module );
+ log( "module: " + module, Project.MSG_VERBOSE );
+
+ return module;
+ }
+
+ private ResourceRef[] buildResources( final Element resources, File
source, final String moduleUri )
+ {
final Element[] elements = ElementHelper.getChildren( resources,
"resource" );
final File anchor = source.getParentFile();
final ResourceRef[] children = new ResourceRef[ elements.length ];
@@ -631,12 +644,7 @@
log( "resource: " + resource, Project.MSG_VERBOSE );
}
}
-
- Module module = new Module( this, key, info, refs, "key:NULL",
header, children );
- m_resources.put( key, module );
- log( "module: " + module, Project.MSG_VERBOSE );
-
- return module;
+ return children;
}
private Info createInfo( String uri )
@@ -666,77 +674,17 @@
private void buildLocalList( final File anchor, final Element[]
children, String uri )
{
log( "entries: " + children.length, Project.MSG_VERBOSE );
- for( int i=0; i<children.length; i++ )
+ for( int i = 0; i < children.length; i++ )
{
final Element element = children[i];
final String tag = element.getTagName();
if( "import".equals( element.getTagName() ) )
{
- final String filename = element.getAttribute( "index" );
- String urn = parse( element.getAttribute( "uri" ) );
- if(( null != filename ) && ( !"".equals( filename )))
- {
- final File index = IndexBuilder.getFile( anchor,
filename );
- buildList( index, uri );
- }
- else if(( null != urn ) && ( !"".equals( urn )))
- {
- // switch to artifact
- if( !m_includes.contains( urn ) )
- {
- m_includes.add( urn );
- try
- {
- URL artifact = new URL( null, urn, new Handler()
);
- File local = (File) artifact.getContent( new
Class[]{ File.class } );
- buildList( local, urn );
- }
- catch( IOException ioe )
- {
- final String error =
- "Failed to load module ["
- + urn
- + "]."
- + ioe.toString();
- throw new BuildException( error, ioe );
- }
- }
- }
- else
- {
- final String error =
- "Invalid import statement. No uri, index attribute.";
- throw new BuildException( error );
- }
+ buildImport( element, anchor, uri );
}
else if( isaResource( tag ) )
{
- final Resource resource = createResource( element, anchor,
uri );
- final String key = resource.getKey();
- if( !m_resources.containsKey( key ) )
- {
- m_resources.put( key, resource );
- if( key.equals( resource.getInfo().getName() ) )
- {
- log( "resource: " + resource, Project.MSG_VERBOSE );
- }
- else
- {
- log( "resource: " + resource + " key=" + key,
Project.MSG_VERBOSE );
- }
- }
- else
- {
- Resource r = (Resource) m_resources.get( key );
- if( !r.equals( resource ) )
- {
- final String error =
- "WARNING: Ignoring duplicate key reference ["
- + key
- + "].";
- log( error, Project.MSG_WARN );
- }
- }
+ buildResource( element, anchor, uri );
}
else
{
@@ -747,6 +695,77 @@
}
}
+ private void buildResource(final Element element, final File anchor,
String uri)
+ {
+ final Resource resource = createResource( element, anchor, uri );
+ final String key = resource.getKey();
+ if( !m_resources.containsKey( key ) )
+ {
+ m_resources.put( key, resource );
+ if( key.equals( resource.getInfo().getName() ) )
+ {
+ log( "resource: " + resource, Project.MSG_VERBOSE );
+ }
+ else
+ {
+ log( "resource: " + resource + " key=" + key,
Project.MSG_VERBOSE );
+ }
+ }
+ else
+ {
+ Resource r = (Resource) m_resources.get( key );
+ if( !r.equals( resource ) )
+ {
+ final String error =
+ "WARNING: Ignoring duplicate key reference ["
+ + key
+ + "].";
+ log( error, Project.MSG_WARN );
+ }
+ }
+ }
+
+ private void buildImport(final Element element, final File anchor,
String uri)
+ {
+ final String filename = element.getAttribute( "index" );
+ final String uriAttribute = element.getAttribute( "uri" );
+ String urn = parse( uriAttribute );
+ if(( null != filename ) && ( !"".equals( filename )))
+ {
+ final File index = IndexBuilder.getFile( anchor, filename );
+ buildList( index, uri );
+ }
+ else if(null == urn || "".equals(urn))
+ {
+ final String error =
+ "Invalid import statement. No uri, index attribute.";
+ throw new BuildException( error );
+ }
+ else
+ {
+ // switch to artifact
+ if( !m_includes.contains( urn ) )
+ {
+ m_includes.add( urn );
+ try
+ {
+ URL artifact = new URL( null, urn, new Handler() );
+ File local = (File) artifact.getContent( new Class[]{
File.class } );
+ buildList( local, urn );
+ }
+ catch( IOException ioe )
+ {
+ final String error =
+ "Failed to load module ["
+ + urn
+ + "]."
+ + ioe.toString();
+ throw new BuildException( error, ioe );
+ }
+ }
+ }
+ }
+
private String parse( String value )
{
if( null == value )
@@ -764,8 +783,7 @@
}
}
- private Resource createResource(
- final Element element, final File anchor, String uri )
+ private Resource createResource( final Element element, final File
anchor, String uri )
{
return XMLDefinitionBuilder.createResource( this, element, anchor,
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
Thu Apr 28 19:13:59 2005
@@ -1,5 +1,7 @@
/*
- * Copyright 2004 Apache Software Foundation
+ * Copyright 2004-2005 Stephen McConnell
+ * Copyright 2005 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
@@ -33,7 +35,7 @@
* The Magic class is the application root of the magic system. It is
responsible
* for the onetime establishment of an index
*
- * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
+ * @author <a href="http://www.dpml.net">The Digital Product Meta Library</a>
* @version $Revision: 1.2 $ $Date: 2004/03/17 10:30:09 $
*/
public class IndexBuilder extends DataType
@@ -43,15 +45,14 @@
//-------------------------------------------------------------
/**
- * Immutable key to the gump signature identifier used when magic
- * is executed under control of the gump integration plartform.
+ * Immutable key to the signature identifier used.
*/
- public static final String RELEASE_SIGNATURE_KEY =
"dpml.release.signature";
+ private static final String RELEASE_SIGNATURE_KEY =
"dpml.release.signature";
/**
* Immutable key to the build identifier.
*/
- public static final String BUILD_SIGNATURE_KEY = "dpml.build.signature";
+ private static final String BUILD_SIGNATURE_KEY = "dpml.build.signature";
/**
* Immutable key to the magic docs cache directory.
@@ -62,36 +63,35 @@
// immutable state
//-------------------------------------------------------------
- private final String m_signature;
private final Index m_index;
//-------------------------------------------------------------
// constructor
//-------------------------------------------------------------
- public IndexBuilder( final Project proj ) throws BuildException
+ public IndexBuilder( final Project proj )
+ throws BuildException
{
this( proj, null );
}
- public IndexBuilder( final Project proj, File index ) throws
BuildException
+ public IndexBuilder( final Project proj, File index )
+ throws BuildException
{
setProject( proj );
log( "magic builder established", Project.MSG_VERBOSE );
- m_signature = getBuildSignature();
+ String signature = getBuildSignature();
- if( null == m_signature )
+ if( null == signature )
{
- proj.setProperty( BUILD_SIGNATURE_KEY, "SNAPSHOT" );
- }
- else
- {
- proj.setProperty( BUILD_SIGNATURE_KEY, m_signature );
- log( "release: " + m_signature, Project.MSG_VERBOSE );
+ signature = "SNAPSHOT";
}
+ proj.setProperty( BUILD_SIGNATURE_KEY, signature );
+ log( "release: " + signature, Project.MSG_VERBOSE );
+
if( null == index )
{
log( "locating index", Project.MSG_VERBOSE );
@@ -140,18 +140,20 @@
*/
public boolean isaRelease()
{
- return m_signature != null;
+ String signature = getReleaseSignature();
+ return signature != null;
}
/**
- * Return the gump signature. If not null magic we assume that
- * magic is running under gump.
+ * Return the signature.
*
* @return the release signature
*/
public String getReleaseSignature()
{
- return m_signature;
+ Project project = getProject();
+ String signature = project.getProperty( BUILD_SIGNATURE_KEY );
+ return signature;
}
//-------------------------------------------------------------
Modified:
development/main/magic/core/src/main/net/dpml/magic/builder/XMLDefinitionBuilder.java
==============================================================================
---
development/main/magic/core/src/main/net/dpml/magic/builder/XMLDefinitionBuilder.java
(original)
+++
development/main/magic/core/src/main/net/dpml/magic/builder/XMLDefinitionBuilder.java
Thu Apr 28 19:13:59 2005
@@ -45,11 +45,11 @@
public static Resource createResource( final Index home, final Element
element, String uri )
{
boolean external = isExternal( element );
- final Info info =
- createInfo( home, ElementHelper.getChild( element, "info" ),
external );
+ final Element infoElement = ElementHelper.getChild( element, "info"
);
+ final Info info = createInfo( home, infoElement, external );
final String key = getDefinitionKey( element, info );
- final Element dependenciesElement = ElementHelper.getChild( element,
"dependencies" );
- final ResourceRef[] resources = createResourceRefs(
dependenciesElement );
+ final Element dependenciesElement = ElementHelper.getChild( element,
"dependencies" );
+ final ResourceRef[] resources = createResourceRefs(
dependenciesElement );
return new Resource( home, key, info, resources, uri );
}
@@ -65,8 +65,7 @@
}
}
- public static Resource createResource(
- final Index home, final Element element, final File anchor, String uri
)
+ public static Resource createResource( Index home, Element element, File
anchor, String uri )
{
final String tag = element.getTagName();
@@ -83,8 +82,8 @@
boolean external = isExternal( element );
- final Info info =
- createInfo( home, ElementHelper.getChild( element, "info" ),
external );
+ Element infoElement = ElementHelper.getChild( element, "info" );
+ final Info info = createInfo( home, infoElement, external );
final String key = getDefinitionKey( element, info );
final String path = element.getAttribute( "basedir" );
@@ -101,14 +100,13 @@
final Element partsElement = ElementHelper.getChild( element,
"parts" );
final ResourceRef[] parts = createResourceRefs( partsElement );
- return new Definition(
- home, key, basedir, file, path, info, resources, plugins,
parts, uri );
+ return new Definition( home, key, basedir, file, path, info,
resources, plugins, parts, uri );
}
else
{
final String error =
- "Unrecognized element name \""
- + tag
+ "Unrecognized element name \""
+ + tag
+ "\" (recognized types include 'resource', 'project' and
'import').";
throw new BuildException( error );
}
@@ -178,8 +176,7 @@
final String[] types = createTypes( info );
final String version = createVersion( home, info, external );
- final boolean status = createSnapshotPolicy( home, info, external );
- return Info.create( group, name, version, types, status );
+ return Info.create( group, name, version, types );
}
private static String[] createTypes( Element info )
@@ -229,34 +226,15 @@
return version;
}
- if( home.isaRelease() )
- {
- if( null == version )
- {
- return null;
- }
- else
- {
- return home.getReleaseSignature();
- }
- }
- else
- {
- return version;
- }
- }
+ boolean release = home.isaRelease();
- private static boolean createSnapshotPolicy( Index home, final Element
info, boolean external )
- {
- if( home.isaRelease() && !external )
+ if( version == null || release )
{
- return false;
+ return home.getReleaseSignature();
}
else
{
- final Element statusElement = ElementHelper.getChild( info,
"status" );
- final String status = ElementHelper.getValue( statusElement );
- return Info.SNAPSHOT.equalsIgnoreCase( status );
+ return version;
}
}
Modified:
development/main/magic/core/src/main/net/dpml/magic/model/Definition.java
==============================================================================
--- development/main/magic/core/src/main/net/dpml/magic/model/Definition.java
(original)
+++ development/main/magic/core/src/main/net/dpml/magic/model/Definition.java
Thu Apr 28 19:13:59 2005
@@ -30,8 +30,7 @@
/**
* A definition is an immutable description of a project including its name,
- * group, version, structrual dependencies, plugin dependecies, and gump
- * idiosyncrasies.
+ * group, version, structrual dependencies and plugin dependencies.
*
* @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
* @version $Revision: 1.2 $ $Date: 2004/03/17 10:30:09 $
@@ -46,7 +45,7 @@
/**
* Creation of a new definition relative to a supplied home, a unique
project key,
- * project base directory and path, statatory info, gump extras,
dependencies and
+ * project base directory and path, statatory info, dependencies and
* plugin assumptions.
*
* @param index the index into which this project is bound
Modified: development/main/magic/core/src/main/net/dpml/magic/model/Info.java
==============================================================================
--- development/main/magic/core/src/main/net/dpml/magic/model/Info.java
(original)
+++ development/main/magic/core/src/main/net/dpml/magic/model/Info.java Thu
Apr 28 19:13:59 2005
@@ -22,8 +22,6 @@
import net.dpml.lang.NullArgumentException;
import net.dpml.transit.artifact.Artifact;
-import org.apache.tools.ant.BuildException;
-
/**
* Project info.
*
@@ -32,10 +30,6 @@
*/
public class Info
{
- /**
- * The static immutable element value to declare a SNAPSHOT artifact.
- */
- public static final String SNAPSHOT = "SNAPSHOT";
/**
* The static immutable value of the artifact protocol.
@@ -55,7 +49,7 @@
final String name = artifact.getName();
final String version = artifact.getVersion();
final String type = artifact.getType();
- return create( group, name, version, new String[]{ type },
SNAPSHOT.equalsIgnoreCase( version ) );
+ return create( group, name, version, new String[]{ type } );
}
/**
@@ -64,25 +58,21 @@
* @param name the artifact name
* @param version the artifact version
* @param types the artifact types
- * @param snapshot the artiact snapshot status
* @return the immutable info descriptor
*/
public static Info create(
final String group, final String name, final String version,
- String[] types, boolean snapshot )
+ String[] types )
{
- return new Info( group, name, version, types, snapshot );
+ return new Info( group, name, version, types );
}
private final String m_name;
private final String m_group;
private final String m_version;
private final String[] m_types;
- private final boolean m_snapshot;
- private Info(
- final String group, final String name, final String version,
- String[] types, boolean snapshot )
+ private Info( String group, String name, String version, String[] types )
{
assertNotNull( "group", group );
assertNotNull( "name", name );
@@ -91,7 +81,6 @@
m_name = name;
m_version = version;
m_types = types;
- m_snapshot = snapshot;
if( m_types.length < 1 )
{
@@ -120,30 +109,13 @@
}
/**
- * Return the version identifier. If the build policy is SNAPSHOT
- * the version value returned is replaced with "SNAPSHOT".
+ * Return the version identifier.
*
* @return a string identifying the build version.
*/
public String getVersion()
{
- if( isaSnapshot() )
- {
- return "SNAPSHOT";
- }
- else
- {
- return m_version;
- }
- }
-
- /**
- * Return the snapshot staus of this artifact.
- * @return true if this artifact is marked as a snapshot
- */
- public boolean isaSnapshot()
- {
- return m_snapshot;
+ return m_version;
}
/**
@@ -376,10 +348,6 @@
}
final Info info = (Info) other;
- if( isaSnapshot() != info.isaSnapshot() )
- {
- return false;
- }
if( ! getName().equals( info.getName() ) )
{
return false;
@@ -410,11 +378,6 @@
else
hash = getVersion().hashCode();
- if( isaSnapshot() )
- hash = hash + 982734897;
- else
- hash = hash - 1227783123;
-
hash = hash ^ m_name.hashCode();
hash = hash ^ m_group.hashCode();
@@ -435,51 +398,4 @@
{
if( null == object ) throw new NullArgumentException( key );
}
-
- private static int getGroupIndex( final String id )
- {
- final int n = id.lastIndexOf( "/" );
- if( n < 0 )
- {
- final String error =
- "Invalid resource identifier \"" + id + "\". "
- + "A resource identifier must be in for for
[group]/[name]#[version]";
- throw new BuildException( error );
- }
- else
- {
- return n;
- }
- }
-
- private static String getGroupFromId( final String id, final int n )
- {
- return id.substring( 0, n );
- }
-
- private static String getNameFromId( final String id, final int n )
- {
- final int j = id.indexOf( "#" );
- if( j < 0 )
- {
- return id.substring( n+1 );
- }
- else
- {
- return id.substring( n+1, j );
- }
- }
-
- private static String getVersionFromId( final String id )
- {
- final int j = id.indexOf( "#" );
- if( j < 0 )
- {
- return null;
- }
- else
- {
- return id.substring( j+1 );
- }
- }
}
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 28 19:13:59 2005
@@ -40,8 +40,6 @@
*/
public class Resource
{
- private static final ResourceRef[] EMPTY_REFS = new ResourceRef[0];
-
private final String m_key;
private Info m_info;
private ResourceRef[] m_resources;
Modified:
development/main/magic/core/src/main/net/dpml/magic/tasks/BarTask.java
==============================================================================
--- development/main/magic/core/src/main/net/dpml/magic/tasks/BarTask.java
(original)
+++ development/main/magic/core/src/main/net/dpml/magic/tasks/BarTask.java
Thu Apr 28 19:13:59 2005
@@ -60,15 +60,9 @@
m_filesets.add( set );
}
- private void setClassic( boolean flag )
- {
- m_classic = flag;
- }
-
public void execute() throws BuildException
{
final String filename = getDefinition().getFilename( BAR_EXT );
- final File deliverables = getContext().getDeliverablesDirectory() ;
if( isContent() )
{
@@ -117,7 +111,6 @@
if( m_classic )
{
- final String path = BAR_EXT + "s/" + filename;
final FileSet fileset = new FileSet();
fileset.setDir( deliverables );
fileset.createInclude().setName( "**/*" );
Modified:
development/main/magic/core/src/main/net/dpml/magic/tasks/BlockTask.java
==============================================================================
--- development/main/magic/core/src/main/net/dpml/magic/tasks/BlockTask.java
(original)
+++ development/main/magic/core/src/main/net/dpml/magic/tasks/BlockTask.java
Thu Apr 28 19:13:59 2005
@@ -52,7 +52,6 @@
// static
//--------------------------------------------------------------------------
- private static final String BLOCK = "block";
private static final String MAIN = "main";
private static final String TEST = "test";
@@ -66,9 +65,6 @@
private boolean m_standalone = true;
private Service m_service;
- // TODO : m_type is assigned but is never used.
- private String m_type = BLOCK;
-
//--------------------------------------------------------------------------
// features
//--------------------------------------------------------------------------
@@ -157,11 +153,6 @@
}
}
- protected void setType( String type )
- {
- m_type = type;
- }
-
/**
* Execute the task.
*/
@@ -169,7 +160,6 @@
{
if( null != m_target )
{
- setType( BLOCK );
File file = getEmbeddedFile();
execute( file, false ); // generate the embedded block
}
@@ -1350,7 +1340,7 @@
private String m_path;
private Configuration m_configuration;
- // TODO: Never used.
+ // TODO: Parameters is never assigned!!!! - detected by Niclas
private Parameters m_parameters;
/**
@@ -1408,7 +1398,6 @@
return m_configuration;
}
-
/**
* Return the parameters assigned this target override (possibly
null).
* @return the parameters directive
Modified:
development/main/magic/core/src/main/net/dpml/magic/tasks/DistTask.java
==============================================================================
--- development/main/magic/core/src/main/net/dpml/magic/tasks/DistTask.java
(original)
+++ development/main/magic/core/src/main/net/dpml/magic/tasks/DistTask.java
Thu Apr 28 19:13:59 2005
@@ -21,16 +21,13 @@
import java.util.LinkedList;
import java.util.Iterator;
-import net.dpml.magic.model.Definition;
import net.dpml.magic.project.Context;
import net.dpml.magic.project.DeliverableHelper;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.taskdefs.Zip;
import org.apache.tools.ant.types.FileSet;
-import org.apache.tools.ant.types.selectors.FileSelector;
import org.apache.tools.ant.types.ZipFileSet;
-import org.apache.tools.ant.taskdefs.Tar;
import java.io.File;
Modified:
development/main/magic/core/src/main/net/dpml/magic/tasks/ExportTask.java
==============================================================================
--- development/main/magic/core/src/main/net/dpml/magic/tasks/ExportTask.java
(original)
+++ development/main/magic/core/src/main/net/dpml/magic/tasks/ExportTask.java
Thu Apr 28 19:13:59 2005
@@ -164,7 +164,7 @@
}
}
- public void writePluginDescriptor( final OutputStream output, final
Definition def, final File file )
+ private void writePluginDescriptor( final OutputStream output, final
Definition def, final File file )
throws IOException
{
final Writer writer = new OutputStreamWriter( output );
Modified:
development/main/magic/core/src/main/net/dpml/magic/tasks/InstallTask.java
==============================================================================
---
development/main/magic/core/src/main/net/dpml/magic/tasks/InstallTask.java
(original)
+++
development/main/magic/core/src/main/net/dpml/magic/tasks/InstallTask.java
Thu Apr 28 19:13:59 2005
@@ -20,7 +20,6 @@
import net.dpml.magic.model.Definition;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
-import org.apache.tools.ant.taskdefs.Copy;
import org.apache.tools.ant.types.FileSet;
import java.io.File;
Modified:
development/main/magic/core/src/main/net/dpml/magic/tasks/JavadocTask.java
==============================================================================
---
development/main/magic/core/src/main/net/dpml/magic/tasks/JavadocTask.java
(original)
+++
development/main/magic/core/src/main/net/dpml/magic/tasks/JavadocTask.java
Thu Apr 28 19:13:59 2005
@@ -339,32 +339,6 @@
}
}
-/* TODO: Remove. Never used.
- private String getTitle( final Definition def, final int category )
- {
- final String extra = getTitleSuppliment( def, category );
- if( null == m_title )
- {
- return def.getInfo().getName() + extra;
- }
- return m_title + extra;
- }
-
- private String getTitleSuppliment( final Definition def, final int cat )
- {
- final String category = ResourceRef.getCategoryName( cat
).toUpperCase();
- final String version = def.getInfo().getVersion();
- if( null == version )
- {
- return " : " + category;
- }
- else
- {
- return ", Version " + version + " : " + category;
- }
- }
-*/
-
private Definition getReferenceDefinition()
{
if( null != m_id )
Modified:
development/main/magic/core/src/main/net/dpml/magic/tasks/ModuleTask.java
==============================================================================
--- development/main/magic/core/src/main/net/dpml/magic/tasks/ModuleTask.java
(original)
+++ development/main/magic/core/src/main/net/dpml/magic/tasks/ModuleTask.java
Thu Apr 28 19:13:59 2005
@@ -19,10 +19,7 @@
import net.dpml.magic.Index;
import net.dpml.magic.builder.IndexBuilder;
-import net.dpml.magic.model.Definition;
-import net.dpml.magic.model.Policy;
-import net.dpml.magic.model.Resource;
-import net.dpml.magic.model.ResourceRef;
+import net.dpml.magic.model.*;
import net.dpml.magic.project.Context;
import net.dpml.magic.project.DeliverableHelper;
@@ -128,10 +125,9 @@
public void execute() throws BuildException
{
Definition definition = getDefinition();
- String type = definition.getInfo().getType();
- String filename = definition.getInfo().getFilename();
- String group = definition.getInfo().getGroup();
- String version = definition.getInfo().getVersion();
+ final Info info = definition.getInfo();
+ String type = info.getType();
+ String filename = info.getFilename();
File deliverables = getContext().getDeliverablesDirectory();
File modules = new File( deliverables, type + "s" );
Modified:
development/main/magic/core/src/main/net/dpml/magic/tasks/ReactorTask.java
==============================================================================
---
development/main/magic/core/src/main/net/dpml/magic/tasks/ReactorTask.java
(original)
+++
development/main/magic/core/src/main/net/dpml/magic/tasks/ReactorTask.java
Thu Apr 28 19:13:59 2005
@@ -27,8 +27,6 @@
import org.apache.tools.ant.taskdefs.Ant;
import org.apache.tools.ant.taskdefs.Sequential;
-import sun.security.action.GetBooleanAction;
-
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
Modified:
development/main/magic/core/src/main/net/dpml/magic/tasks/TarTask.java
==============================================================================
--- development/main/magic/core/src/main/net/dpml/magic/tasks/TarTask.java
(original)
+++ development/main/magic/core/src/main/net/dpml/magic/tasks/TarTask.java
Thu Apr 28 19:13:59 2005
@@ -50,7 +50,8 @@
* @since Ant 1.1
*
*/
-public class TarTask extends MatchingTask {
+public class TarTask extends MatchingTask
+{
/**
* @deprecated Tar.WARN is deprecated and is replaced with
Modified: development/main/magic/index.xml
==============================================================================
--- development/main/magic/index.xml (original)
+++ development/main/magic/index.xml Thu Apr 28 19:13:59 2005
@@ -31,8 +31,6 @@
<info>
<group>dpml/magic</group>
<name>dpml-magic</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<type>module</type>
</info>
<dependencies>
@@ -48,8 +46,6 @@
<info>
<group>dpml/magic</group>
<name>dpml-magic-core</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
<type>plugin</type>
@@ -66,8 +62,6 @@
<info>
<group>dpml/magic</group>
<name>dpml-magic-bar</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
<type>plugin</type>
@@ -82,8 +76,6 @@
<info>
<group>dpml/magic</group>
<name>dpml-magic-publish</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
<type>plugin</type>
@@ -98,8 +90,6 @@
<info>
<group>dpml/magic</group>
<name>dpml-magic-doc</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
<type>plugin</type>
@@ -122,27 +112,10 @@
</dependencies>
</project>
-<!-- Need to take this out, since inclusion of Saxon in the build creates
- unwanted side effects.
- <project basedir="spells/doc/themes/docbook.sf.net">
- <info>
- <group>dpml/magic</group>
- <name>dpml-magic-themes-docbook.sf.net</name>
- <type>theme</type>
- </info>
- <dependencies>
- <include key="dpml-magic-core" build="false"/>
- <include key="dpml-magic-doc" />
- </dependencies>
- </project>
--->
-
<project basedir="spells/upload">
<info>
<group>dpml/magic</group>
<name>dpml-magic-upload</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
<type>plugin</type>
@@ -159,8 +132,6 @@
<info>
<group>dpml/test</group>
<name>dpml-magic-example</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
<type>plugin</type>
Modified: development/main/metro/index.xml
==============================================================================
--- development/main/metro/index.xml (original)
+++ development/main/metro/index.xml Thu Apr 28 19:13:59 2005
@@ -13,8 +13,6 @@
<info>
<group>dpml/metro</group>
<name>dpml-metro</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<type>module</type>
</info>
<dependencies>
@@ -29,8 +27,6 @@
<info>
<group>dpml/metro/protected</group>
<name>dpml-parts-api</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -43,8 +39,6 @@
<info>
<group>dpml/metro/public</group>
<name>dpml-activity-api</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -57,8 +51,6 @@
<info>
<group>dpml/metro/public</group>
<name>dpml-configuration-api</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -69,8 +61,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-configuration-impl</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -87,8 +77,6 @@
<info>
<group>dpml/metro/public</group>
<name>dpml-parameters-api</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -99,8 +87,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-parameters-impl</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -118,8 +104,6 @@
<info>
<group>dpml/metro/public</group>
<name>dpml-context-api</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -130,8 +114,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-context-impl</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -148,8 +130,6 @@
<info>
<group>dpml/metro/public</group>
<name>dpml-service-api</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -162,8 +142,6 @@
<info>
<group>dpml/metro/public</group>
<name>dpml-logging-api</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -176,8 +154,6 @@
<info>
<group>dpml/metro/protected</group>
<name>dpml-meta-api</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -194,8 +170,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-meta-spi</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -211,8 +185,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-meta-impl</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -230,8 +202,6 @@
<info>
<group>dpml/metro/tools</group>
<name>dpml-meta-tools</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
<type>plugin</type>
@@ -251,8 +221,6 @@
<info>
<group>dpml/metro/tools</group>
<name>dpml-metro-main</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
<type>plugin</type>
@@ -279,8 +247,6 @@
<info>
<group>dpml/metro/tools</group>
<name>dpml-classic-unit</name>
- <version>1.0.0</version>
- <type>jar</type>
<status>SNAPSHOT</status>
<types>
<type>jar</type>
@@ -311,8 +277,6 @@
<info>
<group>dpml/metro/protected</group>
<name>dpml-classic-api</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -337,8 +301,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-classic-spi</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -354,8 +316,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-classic-impl</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
<type>plugin</type>
@@ -387,8 +347,6 @@
<info>
<group>dpml/test</group>
<name>dpml-classic-test</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -419,8 +377,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-composition-part</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -441,8 +397,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-composition-control</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
<type>plugin</type>
@@ -467,8 +421,6 @@
<info>
<group>dpml/metro/tools</group>
<name>dpml-composition-builder</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -491,8 +443,6 @@
<info>
<group>dpml/tools</group>
<name>dpml-composition-unit</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
<type>part</type>
@@ -509,8 +459,6 @@
<info>
<group>dpml/test</group>
<name>dpml-composition-testing-acme</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
<type>part</type>
@@ -525,8 +473,6 @@
<info>
<group>dpml/test</group>
<name>dpml-composition-testing-test</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
<type>part</type>
@@ -554,8 +500,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-util-defaults</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<type>jar</type>
</info>
<dependencies>
@@ -569,8 +513,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-system-api</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -586,8 +528,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-system-impl</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
<type>plugin</type>
@@ -607,8 +547,6 @@
<info>
<group>dpml/test</group>
<name>dpml-system-test</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -625,8 +563,6 @@
<info>
<group>dpml/metro/protected</group>
<name>dpml-logging-data</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -637,8 +573,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-logging-spi</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -654,8 +588,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-logging-criteria</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -672,8 +604,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-logging-log4j</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
<type>plugin</type>
@@ -692,8 +622,6 @@
<info>
<group>dpml/test</group>
<name>dpml-logging-log4j-test</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -709,8 +637,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-logging-logkit-api</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -725,8 +651,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-logging-logkit-impl</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
<type>plugin</type>
@@ -747,8 +671,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-logging-logkit-datagram</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
<type>plugin</type>
@@ -765,8 +687,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-logging-logkit-socket</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
<type>plugin</type>
@@ -783,8 +703,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-logging-logkit-syslog</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
<type>plugin</type>
@@ -802,8 +720,6 @@
<info>
<group>dpml/test</group>
<name>dpml-logging-logkit-test</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -826,8 +742,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-activation-api</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -841,8 +755,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-activation-metro-provider</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
<type>plugin</type>
@@ -864,8 +776,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-activation-avalon-provider</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
<type>plugin</type>
@@ -889,8 +799,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-activation-impl</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
<type>plugin</type>
@@ -911,8 +819,6 @@
<info>
<group>dpml/test</group>
<name>dpml-activation-test</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
Modified:
development/main/transit/core/handler/etc/test/trusted/dpml/test/plugins/sample.plugin
==============================================================================
---
development/main/transit/core/handler/etc/test/trusted/dpml/test/plugins/sample.plugin
(original)
+++
development/main/transit/core/handler/etc/test/trusted/dpml/test/plugins/sample.plugin
Thu Apr 28 19:13:59 2005
@@ -10,7 +10,7 @@
#
dpml.artifact.group = dpml/metro
dpml.artifact.name = dpml-metro-cli
-dpml.artifact.version = SNAPSHOT
+dpml.artifact.version = 123
dpml.artifact.signature = 20041031.131418
#
@@ -21,25 +21,25 @@
#
# API dependencies.
#
-dpml.artifact.dependency.api.0 =
artifact:jar:dpml/logging/dpml-logging-api#SNAPSHOT
-dpml.artifact.dependency.api.1 =
artifact:jar:dpml/activity/dpml-activity-api#SNAPSHOT
-dpml.artifact.dependency.api.2 =
artifact:jar:dpml/context/dpml-context-api#SNAPSHOT
-dpml.artifact.dependency.api.3 =
artifact:jar:dpml/transit/dpml-transit-main#SNAPSHOT
+dpml.artifact.dependency.api.0 =
artifact:jar:dpml/logging/dpml-logging-api#123
+dpml.artifact.dependency.api.1 =
artifact:jar:dpml/activity/dpml-activity-api#123
+dpml.artifact.dependency.api.2 =
artifact:jar:dpml/context/dpml-context-api#123
+dpml.artifact.dependency.api.3 =
artifact:jar:dpml/transit/dpml-transit-main#123
#
# SPI dependencies.
#
-dpml.artifact.dependency.spi.0 =
artifact:jar:dpml/transit/dpml-transit-spi#SNAPSHOT
-dpml.artifact.dependency.spi.1 =
artifact:jar:dpml/logging/dpml-logging-spi#SNAPSHOT
+dpml.artifact.dependency.spi.0 =
artifact:jar:dpml/transit/dpml-transit-spi#123
+dpml.artifact.dependency.spi.1 =
artifact:jar:dpml/logging/dpml-logging-spi#123
#
# Implementation dependencies.
#
-dpml.artifact.dependency.0 = artifact:jar:dpml/util/dpml-util-i18n#SNAPSHOT
-dpml.artifact.dependency.1 =
artifact:jar:dpml/util/dpml-util-exception#SNAPSHOT
-dpml.artifact.dependency.2 = artifact:jar:dpml/util/dpml-util-cli#SNAPSHOT
+dpml.artifact.dependency.0 = artifact:jar:dpml/util/dpml-util-i18n#123
+dpml.artifact.dependency.1 = artifact:jar:dpml/util/dpml-util-exception#123
+dpml.artifact.dependency.2 = artifact:jar:dpml/util/dpml-util-cli#123
dpml.artifact.dependency.3 = artifact:jar:commons-cli/commons-cli#1.0
-dpml.artifact.dependency.4 = artifact:jar:dpml/metro/dpml-metro-cli#SNAPSHOT
+dpml.artifact.dependency.4 = artifact:jar:dpml/metro/dpml-metro-cli#123
#
# EOF.
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/Main.java
==============================================================================
--- development/main/transit/core/handler/src/main/net/dpml/transit/Main.java
(original)
+++ development/main/transit/core/handler/src/main/net/dpml/transit/Main.java
Thu Apr 28 19:13:59 2005
@@ -128,26 +128,10 @@
SystemMonitor monitor = new SystemMonitor( console );
//
- // setup server mode
- //
-
- boolean server = false;
- for( int i=0; i < args.length; i++ )
- {
- String arg = args[i];
- if( arg.equals( "-Xserver" ) )
- {
- server = true;
- }
- }
-
- //
// setup transit
//
Transit transit = Transit.getInstance( monitor );
- SecuredTransitContext context = transit.getTransitContext();
- context.setServer( monitor, server );
Adapter adapter = new ConsoleAdapter( debug );
RepositoryMonitor repoMonitor = new RepositoryMonitorAdapter(
adapter );
@@ -214,7 +198,6 @@
data.put( "urn:transit.repository.monitor", repoMonitor );
data.put( "urn:transit.cache.monitor", cacheMonitor );
data.put( "urn:transit.network.monitor", netMonitor );
- data.put( "urn:transit.server", new Boolean( server ) );
data.put( "urn:transit.args", arguments );
Map map = new Dictionary( data );
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/SecuredTransitContext.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/SecuredTransitContext.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/SecuredTransitContext.java
Thu Apr 28 19:13:59 2005
@@ -21,7 +21,6 @@
import net.dpml.io.ResourceHelper;
import net.dpml.lang.NullArgumentException;
import net.dpml.transit.cache.CacheHandler;
-import net.dpml.transit.cache.RemoteCacheHandler;
import net.dpml.transit.host.ResourceManager;
import net.dpml.transit.link.FileLinkManager;
import net.dpml.transit.link.LinkManager;
@@ -37,14 +36,9 @@
import java.io.FileNotFoundException;
import java.io.IOException;
import java.lang.reflect.Constructor;
-import java.net.InetAddress;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.UnknownHostException;
-import java.rmi.NotBoundException;
-import java.rmi.RemoteException;
-import java.rmi.registry.LocateRegistry;
-import java.rmi.registry.Registry;
import java.util.Properties;
/**
@@ -129,12 +123,6 @@
*/
private static final String DEFAULT_REMOTE_AUTHORITY =
"http://repository.dpml.net";
- /**
- * Transit cache handler service name.
- */
- private static final String TRANSIT_NAME = "transit";
-
-
//------------------------------------------------------------------
// state
//------------------------------------------------------------------
@@ -155,11 +143,6 @@
private URL m_authorativeHost;
/**
- * Server mode flag.
- */
- private boolean m_server = false;
-
- /**
* Return the singleton context.
* @return the secure context
*/
@@ -221,34 +204,6 @@
monitor.trace( "creating secure transit context" );
}
- // if the cache service is available on localhost then use it
otherwise
- // continue with the classic per jvm approach
- try
- {
- Registry reg = LocateRegistry.getRegistry( 1099 );
- CacheHandler handler = (CacheHandler) reg.lookup(
TRANSIT_NAME );
- if( monitor.isTraceEnabled() )
- {
- monitor.trace( "binding to shared cache handler" );
- }
- m_CONTEXT = new SecuredTransitContext( handler );
- return m_CONTEXT;
- }
- catch( NotBoundException e )
- {
- // Ignore and continue
- }
- catch( java.rmi.ConnectException e )
- {
- // Ignore and continue
- }
- catch( RemoteException e )
- {
- // Ignore and continue
- }
-
- // proceed with context establishment
-
try
{
URL authorative = establishAuthority( monitor );
@@ -270,33 +225,6 @@
}
}
- /** Set the Transit instance into Server mode.
- * @param serverMode true to operate Transit in Server mode.
- * @exception TransitException if not possible to make this Transit into
a server.
- */
- public void setServer( SystemMonitor monitor, boolean serverMode )
- throws TransitException
- {
- boolean current = m_server;
- if( current ^ serverMode )
- {
- m_server = serverMode;
- if( m_server )
- {
- bindServer( monitor );
- }
- else
- {
- unbindServer();
- }
- }
- }
-
- public boolean isServer()
- {
- return m_server;
- }
-
/**
* Create the resource manager that will be responsible for the
establishment
* of the transit cache handler. The class implementating the resource
manager
@@ -722,53 +650,4 @@
RequestIdentifier id = new RequestIdentifier( proxy, port, protocol,
scheme, prompt );
return id;
}
-
- private void unbindServer()
- throws TransitException
- {
- try
- {
- Registry reg = LocateRegistry.getRegistry( 1099 );
- reg.unbind( TRANSIT_NAME );
- }
- catch( Throwable e )
- {
- String error = "Could not remove the cache handler as a remote
service.";
- throw new TransitException( error, e );
- }
- }
-
- private void bindServer( SystemMonitor monitor )
- throws TransitException
- {
- // publish the cache handler as a remotely accessible
- // service on localhost
- try
- {
- try
- {
- LocateRegistry.createRegistry( 1099 );
- } catch( Throwable t )
- {} // ignore
-
- CacheHandler lch = m_CONTEXT.getCacheHandler();
- RemoteCacheHandler rch = new RemoteCacheHandler( lch );
- Registry reg = LocateRegistry.getRegistry( 1099 );
- reg.bind( TRANSIT_NAME, rch );
- if( monitor.isTraceEnabled() )
- {
- final String message =
- "Server registered on port 1099 as ["
- + TRANSIT_NAME
- + "].";
- monitor.trace( message );
- }
- }
- catch( Throwable e )
- {
- final String error =
- "Could not establish the cache handler as a remote service.";
- throw new TransitException( error, e );
- }
- }
}
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/TransitException.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/TransitException.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/TransitException.java
Thu Apr 28 19:13:59 2005
@@ -1,6 +1,6 @@
/*
* Copyright 2004 Stephen J. McConnell.
- * Copyright 2004 Niclas Hedhman.
+ * Copyright 2004-2005 Niclas Hedhman.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@
/**
* Exception to indicate that there was a transit artifact related error.
*
- * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
+ * @author <a href="http://www.dpml.net">The Digital Product Meta Library</a>
* @version $Id$
*/
public class TransitException extends IOException
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/cache/CacheHandler.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/cache/CacheHandler.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/cache/CacheHandler.java
Thu Apr 28 19:13:59 2005
@@ -19,23 +19,16 @@
package net.dpml.transit.cache;
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-import java.util.Map;
-
import net.dpml.lang.NullArgumentException;
-
-import net.dpml.transit.TransitException;
-import net.dpml.transit.SecuredTransitContext;
import net.dpml.transit.SecuredTransitContext;
+import net.dpml.transit.TransitException;
import net.dpml.transit.artifact.Artifact;
import net.dpml.transit.artifact.ArtifactAlreadyExistsException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
/**
* The CacheHandler interface defines the contract for classes capable of
* supporting the cache mentement aspects of a transit system. Cache
management
@@ -44,7 +37,7 @@
* Selection of a cache manager is defined under the transit cache
configuration
* properties.
*/
-public interface CacheHandler extends Remote
+public interface CacheHandler
{
/**
* The domain identifier.
@@ -76,7 +69,7 @@
* @exception TransitException is a transit system error occurs
*/
InputStream getResource( Artifact artifact )
- throws IOException, TransitException, RemoteException;
+ throws IOException, TransitException;
/**
* Attempts to download and cache a remote artifact using a set of remote
@@ -96,7 +89,7 @@
* @exception TransitException is a transit system error occurs
*/
InputStream getResource( Artifact artifact, String internalReference )
- throws IOException, TransitException, RemoteException;
+ throws IOException, TransitException;
/** Creates an output stream to where the artifact content can be written
* to.
@@ -112,6 +105,6 @@
* in the cache.
*/
OutputStream createOutputStream( Artifact artifact )
- throws NullArgumentException, ArtifactAlreadyExistsException,
IOException, RemoteException;
+ throws NullArgumentException, ArtifactAlreadyExistsException,
IOException;
}
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/cache/FileCacheHandler.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/cache/FileCacheHandler.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/cache/FileCacheHandler.java
Thu Apr 28 19:13:59 2005
@@ -19,36 +19,31 @@
package net.dpml.transit.cache;
+import net.dpml.lang.NullArgumentException;
+import net.dpml.transit.Transit;
+import net.dpml.transit.TransitException;
+import net.dpml.transit.artifact.Artifact;
+import net.dpml.transit.artifact.ArtifactAlreadyExistsException;
+import net.dpml.transit.artifact.ArtifactNotFoundException;
+import net.dpml.transit.host.ResourceHost;
+import net.dpml.transit.layout.LocationResolver;
+import net.dpml.transit.monitors.CacheMonitorRouter;
+import net.dpml.transit.monitors.Monitor;
+import net.dpml.transit.util.Util;
+
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
-import java.io.InputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.io.OutputStream;
-
import java.util.Date;
-import java.util.Map;
import java.util.Iterator;
import java.util.Properties;
import java.util.TreeMap;
-
-import java.util.zip.ZipFile;
import java.util.zip.ZipEntry;
-
-import net.dpml.lang.NullArgumentException;
-
-import net.dpml.transit.Transit;
-import net.dpml.transit.TransitException;
-import net.dpml.transit.util.StreamUtils;
-import net.dpml.transit.util.Util;
-import net.dpml.transit.host.ResourceHost;
-import net.dpml.transit.layout.LocationResolver;
-import net.dpml.transit.artifact.*;
-import net.dpml.transit.cache.CacheHandler;
-import net.dpml.transit.monitors.Monitor;
-
-import net.dpml.transit.monitors.CacheMonitorRouter;
+import java.util.zip.ZipFile;
/**
* Default cache handler that maintains a file based cache.
Modified:
development/main/transit/core/handler/src/test/net/dpml/transit/repository/PropertiesPluginTestCase.java
==============================================================================
---
development/main/transit/core/handler/src/test/net/dpml/transit/repository/PropertiesPluginTestCase.java
(original)
+++
development/main/transit/core/handler/src/test/net/dpml/transit/repository/PropertiesPluginTestCase.java
Thu Apr 28 19:13:59 2005
@@ -50,7 +50,7 @@
Artifact artifact = Artifact.createArtifact( m_Plugin.getURI() );
assertEquals( "Artifact name", "dpml-metro-cli", artifact.getName()
);
- URI uri = URI.create(
"artifact:plugin:dpml/metro/dpml-metro-cli#SNAPSHOT" );
+ URI uri = URI.create(
"artifact:plugin:dpml/metro/dpml-metro-cli#123" );
assertEquals( "Artifact URI", uri, artifact.toURI() );
}
@@ -85,13 +85,13 @@
URI[] facts = m_Plugin.getDependencies( Plugin.API_KEY );
assertEquals( "API deps", 4, facts.length );
- URI uri = URI.create(
"artifact:jar:dpml/logging/dpml-logging-api#SNAPSHOT" );
+ URI uri = URI.create(
"artifact:jar:dpml/logging/dpml-logging-api#123" );
assertEquals( "API Artifact URI", uri, facts[0] );
- uri = URI.create(
"artifact:jar:dpml/activity/dpml-activity-api#SNAPSHOT" );
+ uri = URI.create( "artifact:jar:dpml/activity/dpml-activity-api#123"
);
assertEquals( "API Artifact URI", uri, facts[1] );
- uri = URI.create(
"artifact:jar:dpml/context/dpml-context-api#SNAPSHOT" );
+ uri = URI.create( "artifact:jar:dpml/context/dpml-context-api#123" );
assertEquals( "API Artifact URI", uri, facts[2] );
- uri = URI.create(
"artifact:jar:dpml/transit/dpml-transit-main#SNAPSHOT" );
+ uri = URI.create( "artifact:jar:dpml/transit/dpml-transit-main#123"
);
assertEquals( "API Artifact URI", uri, facts[3] );
}
@@ -101,9 +101,9 @@
URI[] facts = m_Plugin.getDependencies( Plugin.SPI_KEY );
assertEquals( "SPI deps", 2, facts.length );
- URI uri = URI.create(
"artifact:jar:dpml/transit/dpml-transit-spi#SNAPSHOT" );
+ URI uri = URI.create(
"artifact:jar:dpml/transit/dpml-transit-spi#123" );
assertEquals( "SPI Artifact URI", uri, facts[0] );
- uri = URI.create(
"artifact:jar:dpml/logging/dpml-logging-spi#SNAPSHOT" );
+ uri = URI.create( "artifact:jar:dpml/logging/dpml-logging-spi#123" );
assertEquals( "SPI Artifact URI", uri, facts[1] );
}
@@ -113,15 +113,15 @@
URI[] facts = m_Plugin.getDependencies( Plugin.IMPL_KEY );
assertEquals( "Impl deps", 5, facts.length );
- URI uri = URI.create(
"artifact:jar:dpml/util/dpml-util-i18n#SNAPSHOT" );
+ URI uri = URI.create( "artifact:jar:dpml/util/dpml-util-i18n#123" );
assertEquals( "Impl Artifact URI", uri, facts[0] );
- uri = URI.create(
"artifact:jar:dpml/util/dpml-util-exception#SNAPSHOT" );
+ uri = URI.create( "artifact:jar:dpml/util/dpml-util-exception#123" );
assertEquals( "Impl Artifact URI", uri, facts[1] );
- uri = URI.create( "artifact:jar:dpml/util/dpml-util-cli#SNAPSHOT" );
+ uri = URI.create( "artifact:jar:dpml/util/dpml-util-cli#123" );
assertEquals( "Impl Artifact URI", uri, facts[2] );
uri = URI.create( "artifact:jar:commons-cli/commons-cli#1.0" );
assertEquals( "Impl Artifact URI", uri, facts[3] );
- uri = URI.create( "artifact:jar:dpml/metro/dpml-metro-cli#SNAPSHOT"
);
+ uri = URI.create( "artifact:jar:dpml/metro/dpml-metro-cli#123" );
assertEquals( "Impl Artifact URI", uri, facts[4] );
}
@@ -131,29 +131,29 @@
URI[] facts = m_Plugin.getDependencies();
assertEquals( "All deps", 11, facts.length );
- URI uri = URI.create(
"artifact:jar:dpml/logging/dpml-logging-api#SNAPSHOT" );
+ URI uri = URI.create(
"artifact:jar:dpml/logging/dpml-logging-api#123" );
assertEquals( "API Artifact URI", uri, facts[0] );
- uri = URI.create(
"artifact:jar:dpml/activity/dpml-activity-api#SNAPSHOT" );
+ uri = URI.create( "artifact:jar:dpml/activity/dpml-activity-api#123"
);
assertEquals( "API Artifact URI", uri, facts[1] );
- uri = URI.create(
"artifact:jar:dpml/context/dpml-context-api#SNAPSHOT" );
+ uri = URI.create( "artifact:jar:dpml/context/dpml-context-api#123" );
assertEquals( "API Artifact URI", uri, facts[2] );
- uri = URI.create(
"artifact:jar:dpml/transit/dpml-transit-main#SNAPSHOT" );
+ uri = URI.create( "artifact:jar:dpml/transit/dpml-transit-main#123"
);
assertEquals( "API Artifact URI", uri, facts[3] );
- uri = URI.create(
"artifact:jar:dpml/transit/dpml-transit-spi#SNAPSHOT" );
+ uri = URI.create( "artifact:jar:dpml/transit/dpml-transit-spi#123" );
assertEquals( "SPI Artifact URI", uri, facts[4] );
- uri = URI.create(
"artifact:jar:dpml/logging/dpml-logging-spi#SNAPSHOT" );
+ uri = URI.create( "artifact:jar:dpml/logging/dpml-logging-spi#123" );
assertEquals( "SPI Artifact URI", uri, facts[5] );
- uri = URI.create( "artifact:jar:dpml/util/dpml-util-i18n#SNAPSHOT" );
+ uri = URI.create( "artifact:jar:dpml/util/dpml-util-i18n#123" );
assertEquals( "Impl Artifact URI", uri, facts[6] );
- uri = URI.create(
"artifact:jar:dpml/util/dpml-util-exception#SNAPSHOT" );
+ uri = URI.create( "artifact:jar:dpml/util/dpml-util-exception#123" );
assertEquals( "Impl Artifact URI", uri, facts[7] );
- uri = URI.create( "artifact:jar:dpml/util/dpml-util-cli#SNAPSHOT" );
+ uri = URI.create( "artifact:jar:dpml/util/dpml-util-cli#123" );
assertEquals( "Impl Artifact URI", uri, facts[8] );
uri = URI.create( "artifact:jar:commons-cli/commons-cli#1.0" );
assertEquals( "Impl Artifact URI", uri, facts[9] );
- uri = URI.create( "artifact:jar:dpml/metro/dpml-metro-cli#SNAPSHOT"
);
+ uri = URI.create( "artifact:jar:dpml/metro/dpml-metro-cli#123" );
assertEquals( "Impl Artifact URI", uri, facts[10] );
}
}
Modified: development/main/transit/core/handler/src/test/plugin.properties
==============================================================================
--- development/main/transit/core/handler/src/test/plugin.properties
(original)
+++ development/main/transit/core/handler/src/test/plugin.properties Thu
Apr 28 19:13:59 2005
@@ -10,7 +10,7 @@
#
dpml.artifact.group = dpml/metro
dpml.artifact.name = dpml-metro-cli
-dpml.artifact.version = SNAPSHOT
+dpml.artifact.version = 123
dpml.artifact.signature = 20041031.131418
#
@@ -21,25 +21,25 @@
#
# API dependencies.
#
-dpml.artifact.dependency.api.0 =
artifact:jar:dpml/logging/dpml-logging-api#SNAPSHOT
-dpml.artifact.dependency.api.1 =
artifact:jar:dpml/activity/dpml-activity-api#SNAPSHOT
-dpml.artifact.dependency.api.2 =
artifact:jar:dpml/context/dpml-context-api#SNAPSHOT
-dpml.artifact.dependency.api.3 =
artifact:jar:dpml/transit/dpml-transit-main#SNAPSHOT
+dpml.artifact.dependency.api.0 =
artifact:jar:dpml/logging/dpml-logging-api#123
+dpml.artifact.dependency.api.1 =
artifact:jar:dpml/activity/dpml-activity-api#123
+dpml.artifact.dependency.api.2 =
artifact:jar:dpml/context/dpml-context-api#123
+dpml.artifact.dependency.api.3 =
artifact:jar:dpml/transit/dpml-transit-main#123
#
# SPI dependencies.
#
-dpml.artifact.dependency.spi.0 =
artifact:jar:dpml/transit/dpml-transit-spi#SNAPSHOT
-dpml.artifact.dependency.spi.1 =
artifact:jar:dpml/logging/dpml-logging-spi#SNAPSHOT
+dpml.artifact.dependency.spi.0 =
artifact:jar:dpml/transit/dpml-transit-spi#123
+dpml.artifact.dependency.spi.1 =
artifact:jar:dpml/logging/dpml-logging-spi#123
#
# Implementation dependencies.
#
-dpml.artifact.dependency.0 = artifact:jar:dpml/util/dpml-util-i18n#SNAPSHOT
-dpml.artifact.dependency.1 =
artifact:jar:dpml/util/dpml-util-exception#SNAPSHOT
-dpml.artifact.dependency.2 = artifact:jar:dpml/util/dpml-util-cli#SNAPSHOT
+dpml.artifact.dependency.0 = artifact:jar:dpml/util/dpml-util-i18n#123
+dpml.artifact.dependency.1 = artifact:jar:dpml/util/dpml-util-exception#123
+dpml.artifact.dependency.2 = artifact:jar:dpml/util/dpml-util-cli#123
dpml.artifact.dependency.3 = artifact:jar:commons-cli/commons-cli#1.0
-dpml.artifact.dependency.4 = artifact:jar:dpml/metro/dpml-metro-cli#SNAPSHOT
+dpml.artifact.dependency.4 = artifact:jar:dpml/metro/dpml-metro-cli#123
#
# EOF.
Modified: development/main/transit/core/overview.html
==============================================================================
--- development/main/transit/core/overview.html (original)
+++ development/main/transit/core/overview.html Thu Apr 28 19:13:59 2005
@@ -5,7 +5,7 @@
</p>
<p>
Identifiers typically reference content in the form of an artifact url such
- as artifact:block:dpml/http/dpml-http-server#SNAPSHOT. These
+ as artifact:block:dpml/http/dpml-http-server#123. These
identifiers disassociate the definition of an application from the source
of
the resources needed to build and deploy the application. Repository
enabled
applications leverage a local cache management system to resolve artifact
Modified: development/main/transit/core/plugin/core-plugin.iml
==============================================================================
--- development/main/transit/core/plugin/core-plugin.iml (original)
+++ development/main/transit/core/plugin/core-plugin.iml Thu Apr 28
19:13:59 2005
@@ -11,6 +11,10 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Jakarta Commons" level="application" />
+ <orderEntry type="module" module-name="util-cli" />
+ <orderEntry type="module" module-name="core-handler" />
+ <orderEntry type="module" module-name="util-i18n" />
+ <orderEntry type="module" module-name="util-exception" />
<orderEntryProperties />
</component>
</module>
Modified:
development/main/transit/core/tools/src/main/net/dpml/transit/tools/TransitComponentHelper.java
==============================================================================
---
development/main/transit/core/tools/src/main/net/dpml/transit/tools/TransitComponentHelper.java
(original)
+++
development/main/transit/core/tools/src/main/net/dpml/transit/tools/TransitComponentHelper.java
Thu Apr 28 19:13:59 2005
@@ -46,7 +46,7 @@
/**
* A component helper that handles automatic loading of plugins into the
* ant plugin based on namespace declarations in the project file. This is
similar
- * to the 'antlib:' coonvention except we use the 'plugin:' convention.
+ * to the 'antlib:' convention except we use the 'plugin:' convention.
*
* @author <a href="mailto:dev@dpmlnet">Stephen J. McConnell</a>
* @version $Id: Metro.java 916 2004-11-25 12:15:17Z niclas AT apache.org $
@@ -238,7 +238,7 @@
if( k > 0 )
{
String urn = name.substring( 0, k );
- String task = name.substring( k+1 );
+ String task = name.substring( k + 1 );
URI uri = convertUrnToURI( urn );
if( null != uri )
{
@@ -250,7 +250,7 @@
}
else
{
- final String error =
+ final String error =
"Mapped urn returned a null object.";
throw new BuildException( error );
}
@@ -268,7 +268,7 @@
/**
* Convert a urn to a uri taking into account possible urn alias names.
- * TODO: turn this inot a parameteizable namespace to artifact map.
+ * TODO: turn this into a parameteizable namespace to artifact map.
*
* @param urn the urn to convert to a uri
*/
@@ -310,7 +310,7 @@
try
{
- m_project.log( "installing plugin: " + urn );
+ m_project.log( "installing plugin: " + urn + " / " + label );
StandardLoader loader = new StandardLoader();
Plugin descriptor = loader.getPluginDescriptor( uri );
Modified:
development/main/transit/core/tools/src/main/net/dpml/transit/tools/package.html
==============================================================================
---
development/main/transit/core/tools/src/main/net/dpml/transit/tools/package.html
(original)
+++
development/main/transit/core/tools/src/main/net/dpml/transit/tools/package.html
Thu Apr 28 19:13:59 2005
@@ -24,7 +24,7 @@
<pre>
<project name="example" xmlns:transit="antlib:net.dpml.transit">
- <transit:plugin
uri="artifact:plugin:dpml/magic/dpml-magic-doc#SNAPSHOT">
+ <transit:plugin
uri="artifact:plugin:dpml/magic/dpml-magic-doc#123">
<task class="net.dpml.magic.doc.DocTask" name="docs"/>
</transit:plugin>
Modified: development/main/transit/standard.xml
==============================================================================
--- development/main/transit/standard.xml (original)
+++ development/main/transit/standard.xml Thu Apr 28 19:13:59 2005
@@ -402,9 +402,9 @@
<target name="test" depends="build-tests" if="src.test.available">
<mkdir dir="${target.test.dir}"/>
<mkdir dir="${target.test-reports.dir}"/>
- <junit fork="true" dir="${basedir}"
- printsummary="yes"
- showoutput="true"
+ <junit fork="true" dir="${basedir}"
+ printsummary="yes"
+ showoutput="true"
haltonfailure="yes" failureproperty="junit.failure"
haltonerror="no" errorproperty="junit.error">
<sysproperty key="dpml.build.signature"
value="${dpml.build.signature}"/>
Modified: development/main/transit/transit.iws
==============================================================================
--- development/main/transit/transit.iws (original)
+++ development/main/transit/transit.iws Thu Apr 28 19:13:59 2005
@@ -146,10 +146,10 @@
<option name="HIDE_WARNINGS" value="false" />
</component>
<component name="FileEditorManager" split-orientation="vertical"
split-proportion="0.5">
- <first-group
selected-file="file://$PROJECT_DIR$/core/plugin/src/main/net/dpml/transit/control/CommandHandler.java">
+ <first-group
selected-file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/cache/CacheHandler.java">
<entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/SecuredTransitContext.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="144" column="0" selection-start="4195"
selection-end="4195" vertical-scroll-proportion="0.15625">
+ <state line="144" column="0" selection-start="4195"
selection-end="4195" vertical-scroll-proportion="0.16087516">
<folding>
<element signature="imports" expanded="true" />
</folding>
@@ -158,20 +158,36 @@
</entry>
<entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/Main.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="134" column="0" selection-start="4452"
selection-end="4452" vertical-scroll-proportion="0.33251533">
+ <state line="134" column="0" selection-start="4452"
selection-end="4452" vertical-scroll-proportion="0.34217173">
<folding />
</state>
</provider>
</entry>
<entry
file="file://$PROJECT_DIR$/core/plugin/src/main/net/dpml/transit/control/CommandHandler.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="28" column="20" selection-start="866"
selection-end="866" vertical-scroll-proportion="0.21472393">
+ <state line="60" column="110" selection-start="1970"
selection-end="1970" vertical-scroll-proportion="0.8270202">
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
+ <entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/cache/CacheHandler.java"
pinned="false">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="39" column="17" selection-start="1456"
selection-end="1456" vertical-scroll-proportion="0.33333334">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ <entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/cache/FileCacheHandler.java"
pinned="false">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="50" column="13" selection-start="1655"
selection-end="1655" vertical-scroll-proportion="0.17045455">
+ <folding />
+ </state>
+ </provider>
+ </entry>
</first-group>
<second-group />
</component>
@@ -191,11 +207,16 @@
</component>
<component name="NamedScopeManager" />
<component name="PackagesPane">
- <expanded_node url="net" module="core-plugin" type="package" />
- <expanded_node url="net.dpml.transit.control" module="core-plugin"
type="package" />
<expanded_node url="" module="core-plugin" type="module" />
- <expanded_node url="net.dpml" module="core-plugin" type="package" />
<expanded_node url="net.dpml.transit" module="core-plugin"
type="package" />
+ <expanded_node url="net.dpml" module="core-plugin" type="package" />
+ <expanded_node url="net" module="core-handler" type="package" />
+ <expanded_node url="net" module="core-plugin" type="package" />
+ <expanded_node url="net.dpml" module="core-handler" type="package" />
+ <expanded_node url="net.dpml.transit.control" module="core-plugin"
type="package" />
+ <expanded_node url="" module="core-handler" type="module" />
+ <expanded_node url="net.dpml.transit.cache" module="core-handler"
type="package" />
+ <expanded_node url="net.dpml.transit" module="core-handler"
type="package" />
</component>
<component name="ProjectPane">
<expanded_node url="" module="core-handler" type="module" />
@@ -310,13 +331,13 @@
</component>
<component name="ToolWindowManager">
<frame x="-4" y="-6" width="1288" height="987" extended-state="6" />
- <editor active="false" />
+ <editor active="true" />
<layout>
<window_info id="CheckStyle" active="false" anchor="bottom"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.33" order="-1" />
<window_info id="CVS" active="false" anchor="bottom" auto_hide="false"
internal_type="docked" type="docked" visible="false" weight="0.33" order="8"
/>
<window_info id="TODO" active="false" anchor="bottom"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.33" order="7" />
<window_info id="SvgViewer" active="false" anchor="right"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.33" order="3" />
- <window_info id="Project" active="true" anchor="left"
auto_hide="false" internal_type="docked" type="docked" visible="true"
weight="0.24511401" order="0" />
+ <window_info id="Project" active="false" anchor="left"
auto_hide="false" internal_type="docked" type="docked" visible="true"
weight="0.24511401" order="0" />
<window_info id="Find" active="false" anchor="bottom"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.3302217" order="1" />
<window_info id="Structure" active="false" anchor="left"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.25" order="1" />
<window_info id="Messages" active="false" anchor="bottom"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.3302217" order="8" />
@@ -448,29 +469,45 @@
</entry>
<entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/SecuredTransitContext.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="144" column="0" selection-start="4195"
selection-end="4195" vertical-scroll-proportion="0.15625">
+ <state line="144" column="0" selection-start="4195"
selection-end="4195" vertical-scroll-proportion="0.16087516">
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
+ <entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/Main.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="134" column="0" selection-start="4452"
selection-end="4452" vertical-scroll-proportion="0.34217173">
+ <folding />
+ </state>
+ </provider>
+ </entry>
<entry
file="file://$PROJECT_DIR$/core/plugin/src/main/net/dpml/transit/control/CommandHandler.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="28" column="20" selection-start="866"
selection-end="866" vertical-scroll-proportion="0.21472393">
+ <state line="60" column="110" selection-start="1970"
selection-end="1970" vertical-scroll-proportion="0.8270202">
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/Main.java">
+ <entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/cache/FileCacheHandler.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="134" column="0" selection-start="4452"
selection-end="4452" vertical-scroll-proportion="0.33251533">
+ <state line="50" column="13" selection-start="1655"
selection-end="1655" vertical-scroll-proportion="0.17045455">
<folding />
</state>
</provider>
</entry>
+ <entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/cache/CacheHandler.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="39" column="17" selection-start="1456"
selection-end="1456" vertical-scroll-proportion="0.33333334">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
</component>
<component name="simpleUML.DiagramSettingsWorkspace" />
<component name="simpleUML.UMLToolWindowPlugin">
- svn commit: r2444 - in development/main: magic magic/core magic/core/src/main/net/dpml/magic magic/core/src/main/net/dpml/magic/builder magic/core/src/main/net/dpml/magic/model magic/core/src/main/net/dpml/magic/tasks metro transit transit/core transit/core/handler/etc/test/trusted/dpml/test/plugins transit/core/handler/src/main/net/dpml/transit transit/core/handler/src/main/net/dpml/transit/cache transit/core/handler/src/test transit/core/handler/src/test/net/dpml/transit/repository transit/core/plugin transit/core/tools/src/main/net/dpml/transit/tools, niclas, 04/28/2005
Archive powered by MHonArc 2.6.24.