Skip to Content.
Sympa Menu

notify-dpml - r1339 - in trunk/main: . central/src/docs/depot central/src/docs/depot/library central/src/docs/transit depot depot/build depot/core depot/library/etc/test/samples depot/library/src/main/net/dpml/library depot/library/src/main/net/dpml/library/impl depot/library/src/main/net/dpml/library/info depot/library/src/test/net/dpml/library/impl depot/library/src/test/net/dpml/library/info depot/tools/builder/etc/prefs/templates depot/tools/builder/src/main/net/dpml/tools/impl depot/tools/builder/src/main/net/dpml/tools/model depot/tools/builder/src/main/net/dpml/tools/process depot/tools/builder/src/main/net/dpml/tools/tasks lang/application lang/common/etc lang/module/etc lang/type/etc metro metro/component metro/component/src/main/net/dpml/component metro/model metro/state/api util util/i18n util/logging

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1339 - in trunk/main: . central/src/docs/depot central/src/docs/depot/library central/src/docs/transit depot depot/build depot/core depot/library/etc/test/samples depot/library/src/main/net/dpml/library depot/library/src/main/net/dpml/library/impl depot/library/src/main/net/dpml/library/info depot/library/src/test/net/dpml/library/impl depot/library/src/test/net/dpml/library/info depot/tools/builder/etc/prefs/templates depot/tools/builder/src/main/net/dpml/tools/impl depot/tools/builder/src/main/net/dpml/tools/model depot/tools/builder/src/main/net/dpml/tools/process depot/tools/builder/src/main/net/dpml/tools/tasks lang/application lang/common/etc lang/module/etc lang/type/etc metro metro/component metro/component/src/main/net/dpml/component metro/model metro/state/api util util/i18n util/logging
  • Date: Sat, 8 Apr 2006 19:26:22 +0200

Author: mcconnell
Date: 2006-04-08 19:25:53 +0200 (Sat, 08 Apr 2006)
New Revision: 1339

Added:
trunk/main/depot/library/etc/test/samples/filters.xml
trunk/main/depot/library/src/main/net/dpml/library/Feature.java

trunk/main/depot/library/src/main/net/dpml/library/FeatureRuntimeException.java
trunk/main/depot/library/src/main/net/dpml/library/Filter.java

trunk/main/depot/library/src/main/net/dpml/library/info/FeatureFilterDirective.java

trunk/main/depot/library/src/main/net/dpml/library/info/FilterDirective.java

trunk/main/depot/library/src/main/net/dpml/library/info/SimpleFilterDirective.java

trunk/main/depot/library/src/test/net/dpml/library/impl/FiltersTestCase.java
Removed:
trunk/main/metro/model/build.xml
trunk/main/metro/state/api/build.xml
trunk/main/util/build.xml
trunk/main/util/i18n/build.xml
trunk/main/util/logging/build.xml
Modified:
trunk/main/central/src/docs/depot/library/projects.xml
trunk/main/central/src/docs/depot/navigation.xml
trunk/main/central/src/docs/transit/navigation.xml
trunk/main/depot/build/build.xml
trunk/main/depot/core/build.xml
trunk/main/depot/library/src/main/net/dpml/library/Dictionary.java
trunk/main/depot/library/src/main/net/dpml/library/Resource.java

trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultDictionary.java
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultModule.java

trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultResource.java
trunk/main/depot/library/src/main/net/dpml/library/impl/LibraryDecoder.java

trunk/main/depot/library/src/main/net/dpml/library/info/ModuleDirective.java

trunk/main/depot/library/src/main/net/dpml/library/info/ResourceDirective.java

trunk/main/depot/library/src/test/net/dpml/library/info/ModuleDirectiveTestCase.java
trunk/main/depot/module.xml
trunk/main/depot/tools/builder/etc/prefs/templates/standard.template

trunk/main/depot/tools/builder/src/main/net/dpml/tools/impl/DefaultContext.java

trunk/main/depot/tools/builder/src/main/net/dpml/tools/impl/StandardBuilder.java
trunk/main/depot/tools/builder/src/main/net/dpml/tools/model/Context.java

trunk/main/depot/tools/builder/src/main/net/dpml/tools/process/JarProcess.java

trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/InitializationTask.java
trunk/main/lang/application/build.xml
trunk/main/lang/common/etc/common.xsd
trunk/main/lang/module/etc/module.xsd
trunk/main/lang/type/etc/type.xsd
trunk/main/library.xml
trunk/main/metro/component/build.xml
trunk/main/metro/component/src/main/net/dpml/component/Controller.java
trunk/main/metro/module.xml
trunk/main/util/module.xml
Log:
add support for filter declarations within a <project> definition

Modified: trunk/main/central/src/docs/depot/library/projects.xml
===================================================================
--- trunk/main/central/src/docs/depot/library/projects.xml 2006-04-07
20:10:49 UTC (rev 1338)
+++ trunk/main/central/src/docs/depot/library/projects.xml 2006-04-08
17:25:53 UTC (rev 1339)
@@ -121,8 +121,6 @@
</types>
<dependencies>
<include ref="dpml/util/dpml-logging-api" tag="public"/>
- <include ref="dpml/util/dpml-parameters-impl"/>
- <include ref="dpml/util/dpml-configuration-impl"/>
<include key="dpml-metro-component" tag="protected"/>
<include key="dpml-metro-model" tag="protected"/>
<include key="dpml-state-impl"/>

Modified: trunk/main/central/src/docs/depot/navigation.xml
===================================================================
--- trunk/main/central/src/docs/depot/navigation.xml 2006-04-07 20:10:49
UTC (rev 1338)
+++ trunk/main/central/src/docs/depot/navigation.xml 2006-04-08 17:25:53
UTC (rev 1339)
@@ -26,7 +26,7 @@

<menu>
<item name="Overview" href="concepts/index.html"/>
- <item name="Library" href="library/index.html"/>
+ <item name="Library Directive" href="library/index.html"/>
<item name="Builder" href="tools/index.html"/>
<item name="Antlib" href="tasks/index.html"/>
<item name="CLI" href="cli/index.html"/>

Modified: trunk/main/central/src/docs/transit/navigation.xml
===================================================================
--- trunk/main/central/src/docs/transit/navigation.xml 2006-04-07 20:10:49
UTC (rev 1338)
+++ trunk/main/central/src/docs/transit/navigation.xml 2006-04-08 17:25:53
UTC (rev 1339)
@@ -27,7 +27,7 @@
<menu>
<item name="Overview" href="concepts/index.html"/>
<item name="Protocols" href="technical/index.html"/>
- <item name="Directives" href="parts/index.html"/>
+ <item name="Part Directive" href="parts/index.html"/>
<item name="Setup" href="setup/index.html"/>
<item name="Antlib" href="tasks/index.html"/>
<item name="CLI" href="cli/index.html"/>

Modified: trunk/main/depot/build/build.xml
===================================================================
--- trunk/main/depot/build/build.xml 2006-04-07 20:10:49 UTC (rev 1338)
+++ trunk/main/depot/build/build.xml 2006-04-08 17:25:53 UTC (rev 1339)
@@ -8,10 +8,6 @@

<available property="builder.exe.available"
file="${dpml.system}/bin/build.exe"/>

- <target name="init" depends="standard.init">
- <x:filter token="ANT-BUILDER-URI" ref="dpml/depot/dpml-tools-builder"
feature="uri" type="part"/>
- </target>
-
<target name="install" depends="bin,standard.install">
<copy todir="${dpml.system}" preservelastmodified="true"
overwrite="true">
<fileset dir="target">

Modified: trunk/main/depot/core/build.xml
===================================================================
--- trunk/main/depot/core/build.xml 2006-04-07 20:10:49 UTC (rev 1338)
+++ trunk/main/depot/core/build.xml 2006-04-08 17:25:53 UTC (rev 1339)
@@ -6,6 +6,7 @@

<transit:import uri="local:template:dpml/tools/standard"/>

+ <!--
<target name="init" depends="standard.init">
<property name="depot.short.filename" value="${project.name}.jar"/>
<property name="transit.short.filename" value="dpml-transit-main.jar"/>
@@ -22,6 +23,7 @@
<x:filter token="DEPOT-STATION-URI"
ref="dpml/station/dpml-station-console" feature="uri" type="part"
alias="true"/>
<x:filter token="DEPOT-STATION-SERVER-URI"
ref="dpml/station/dpml-station-server" feature="uri" type="part"
alias="true"/>
</target>
+ -->

<!--
BOOTSTRAP TARGETS

Added: trunk/main/depot/library/etc/test/samples/filters.xml
===================================================================
--- trunk/main/depot/library/etc/test/samples/filters.xml 2006-04-07
20:10:49 UTC (rev 1338)
+++ trunk/main/depot/library/etc/test/samples/filters.xml 2006-04-08
17:25:53 UTC (rev 1339)
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<library xmlns="@MODULE-XSD-URI@"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+ xmlns:part="artifact:xsd:dpml/lang/dpml-part#1.0">
+
+ <modules>
+ <module name="acme">
+ <filters>
+ <filter token="PUBLISHER" value="ACME"/>
+ </filters>
+ <project name="widget" basedir=".">
+ <filters>
+ <filter token="NAME" value="Widget"/>
+ <filter token="DESCRIPTION" value="A Widget."/>
+ </filters>
+ </project>
+ </module>
+ </modules>
+
+</library>

Modified: trunk/main/depot/library/src/main/net/dpml/library/Dictionary.java
===================================================================
--- trunk/main/depot/library/src/main/net/dpml/library/Dictionary.java
2006-04-07 20:10:49 UTC (rev 1338)
+++ trunk/main/depot/library/src/main/net/dpml/library/Dictionary.java
2006-04-08 17:25:53 UTC (rev 1339)
@@ -53,4 +53,11 @@
*/
String getProperty( String key, String value );

+ /**
+ * Evaluate and expand any symbolic references in the supplied value.
+ * @param value the value to resolve
+ * @return the resolved value
+ */
+ String resolve( String value );
+
}

Added: trunk/main/depot/library/src/main/net/dpml/library/Feature.java
===================================================================
--- trunk/main/depot/library/src/main/net/dpml/library/Feature.java
2006-04-07 20:10:49 UTC (rev 1338)
+++ trunk/main/depot/library/src/main/net/dpml/library/Feature.java
2006-04-08 17:25:53 UTC (rev 1339)
@@ -0,0 +1,145 @@
+/*
+ * 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.library;
+
+import net.dpml.lang.Enum;
+
+/**
+ * Enumeration identifying resource features.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public final class Feature extends Enum
+{
+ static final long serialVersionUID = 1L;
+
+ /**
+ * Resource name.
+ */
+ public static final Feature NAME = new Feature( "name" );
+
+ /**
+ * Resource group.
+ */
+ public static final Feature GROUP = new Feature( "group" );
+
+ /**
+ * Resource version.
+ */
+ public static final Feature VERSION = new Feature( "version" );
+
+ /**
+ * Resource version.
+ */
+ public static final Feature URI = new Feature( "uri" );
+
+ /**
+ * Resource spec.
+ */
+ public static final Feature SPEC = new Feature( "spec" );
+
+ /**
+ * Resource path.
+ */
+ public static final Feature PATH = new Feature( "path" );
+
+ /**
+ * Resource filename.
+ */
+ public static final Feature FILENAME = new Feature( "filename" );
+
+ /**
+ * Array of scope enumeration values.
+ */
+ private static final Feature[] ENUM_VALUES = new Feature[]{NAME, GROUP,
VERSION, URI, SPEC, PATH, FILENAME};
+
+ /**
+ * Returns an array of activation enum values.
+ * @return the activation policies array
+ */
+ public static Feature[] values()
+ {
+ return ENUM_VALUES;
+ }
+
+ /**
+ * Internal constructor.
+ * @param label the enumeration label.
+ * @param index the enumeration index.
+ */
+ private Feature( String label )
+ {
+ super( label );
+ }
+
+ /**
+ * Return a string representation of the scope.
+ * @return the string value
+ */
+ public String toString()
+ {
+ return getName().toUpperCase();
+ }
+
+ /**
+ * Return a feature.
+ * @param value the feature name
+ * @return the feature
+ * @exception IllegalArgumentException if the name if not a recognized
feature.
+ */
+ public static Feature parse( String value ) throws
IllegalArgumentException
+ {
+ if( value.equalsIgnoreCase( "name" ) )
+ {
+ return NAME;
+ }
+ else if( value.equalsIgnoreCase( "group" ) )
+ {
+ return GROUP;
+ }
+ else if( value.equalsIgnoreCase( "version" ) )
+ {
+ return VERSION;
+ }
+ else if( value.equalsIgnoreCase( "uri" ) )
+ {
+ return URI;
+ }
+ else if( value.equalsIgnoreCase( "spec" ) )
+ {
+ return SPEC;
+ }
+ else if( value.equalsIgnoreCase( "path" ) )
+ {
+ return PATH;
+ }
+ else if( value.equalsIgnoreCase( "filename" ) )
+ {
+ return FILENAME;
+ }
+ else
+ {
+ final String error =
+ "Unrecognized feature argument [" + value + "]";
+ throw new IllegalArgumentException( error );
+ }
+ }
+}
+

Added:
trunk/main/depot/library/src/main/net/dpml/library/FeatureRuntimeException.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/FeatureRuntimeException.java
2006-04-07 20:10:49 UTC (rev 1338)
+++
trunk/main/depot/library/src/main/net/dpml/library/FeatureRuntimeException.java
2006-04-08 17:25:53 UTC (rev 1339)
@@ -0,0 +1,48 @@
+/*
+ * 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.library;
+
+/**
+ * A FeatureRuntimeException is thrown when a requested for a feature cannot
+ * be resolved.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public class FeatureRuntimeException extends RuntimeException
+{
+ /**
+ * Creation of a new FeatureRuntimeException.
+ * @param message the exception message
+ */
+ public FeatureRuntimeException( String message )
+ {
+ this( message, null );
+ }
+
+ /**
+ * Creation of a new FeatureRuntimeException.
+ * @param message the exception message
+ * @param cause the causal excetion
+ */
+ public FeatureRuntimeException( String message, Throwable cause )
+ {
+ super( message, cause );
+ }
+}

Added: trunk/main/depot/library/src/main/net/dpml/library/Filter.java
===================================================================
--- trunk/main/depot/library/src/main/net/dpml/library/Filter.java
2006-04-07 20:10:49 UTC (rev 1338)
+++ trunk/main/depot/library/src/main/net/dpml/library/Filter.java
2006-04-08 17:25:53 UTC (rev 1339)
@@ -0,0 +1,44 @@
+/*
+ * 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.library;
+
+import net.dpml.lang.AbstractDirective;
+
+/**
+ * Interface implemented by content filters.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public interface Filter
+{
+ /**
+ * Return the filter token.
+ * @return the token
+ */
+ String getToken();
+
+ /**
+ * Return the filter value.
+ * @param resource the enclosing resource
+ * @return the value
+ * @exception ResourceNotFoundException if the feature referneces an
invalid reference
+ */
+ String getValue( Resource resource ) throws ResourceNotFoundException;
+}

Modified: trunk/main/depot/library/src/main/net/dpml/library/Resource.java
===================================================================
--- trunk/main/depot/library/src/main/net/dpml/library/Resource.java
2006-04-07 20:10:49 UTC (rev 1338)
+++ trunk/main/depot/library/src/main/net/dpml/library/Resource.java
2006-04-08 17:25:53 UTC (rev 1339)
@@ -24,6 +24,7 @@
import net.dpml.library.info.ResourceDirective.Classifier;

import net.dpml.transit.Artifact;
+import net.dpml.transit.Transit;
import net.dpml.lang.Category;

/**
@@ -35,6 +36,12 @@
public interface Resource extends Dictionary
{
/**
+ * Return the singleton library.
+ * @return the library
+ */
+ Library getLibrary();
+
+ /**
* Return the name of the resource.
* @return the resource name
*/
@@ -164,4 +171,16 @@
*/
Resource[] getConsumers( boolean expand, boolean sort );

+ /**
+ * Return an array of filters associated with the resource.
+ * @return the array of filters
+ */
+ Filter[] getFilters();
+
+ /**
+ * Return a filename using the layout strategy employed by the cache.
+ * @param id the artifact type
+ * @return the filename
+ */
+ String getLayoutPath( String id );
}

Modified:
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultDictionary.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultDictionary.java
2006-04-07 20:10:49 UTC (rev 1338)
+++
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultDictionary.java
2006-04-08 17:25:53 UTC (rev 1339)
@@ -112,9 +112,19 @@
public String getProperty( String key, String value )
{
String result = m_properties.getProperty( key, value );
- return PropertyResolver.resolve( m_properties, result );
+ return resolve( result );
}

+ /**
+ * Evaluate and expand any symbolic references in the supplied value.
+ * @param value the value to resolve
+ * @return the resolved value
+ */
+ public String resolve( String value )
+ {
+ return PropertyResolver.resolve( m_properties, value );
+ }
+

//----------------------------------------------------------------------------
// internal

//----------------------------------------------------------------------------

Modified:
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultModule.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultModule.java
2006-04-07 20:10:49 UTC (rev 1338)
+++
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultModule.java
2006-04-08 17:25:53 UTC (rev 1339)
@@ -413,7 +413,7 @@

return new ModuleDirective(
name, version, Classifier.EXTERNAL, basedir,
- exportedTypes, new DependencyDirective[0], directives, properties
);
+ exportedTypes, new DependencyDirective[0], directives, properties,
null );
}


//----------------------------------------------------------------------------

Modified:
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultResource.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultResource.java
2006-04-07 20:10:49 UTC (rev 1338)
+++
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultResource.java
2006-04-08 17:25:53 UTC (rev 1339)
@@ -28,12 +28,16 @@
import java.util.Date;
import java.util.TimeZone;
import java.util.Properties;
+import java.util.Map;
+import java.util.Hashtable;

import net.dpml.lang.Category;

+import net.dpml.library.Filter;
+import net.dpml.library.Library;
+import net.dpml.library.Module;
+import net.dpml.library.Resource;
import net.dpml.library.Type;
-import net.dpml.library.Resource;
-import net.dpml.library.Module;
import net.dpml.library.info.TypeDirective;
import net.dpml.library.info.ResourceDirective;
import net.dpml.library.info.ResourceDirective.Classifier;
@@ -41,11 +45,13 @@
import net.dpml.library.info.DependencyDirective;
import net.dpml.library.info.AbstractDirective;
import net.dpml.library.info.ValidationException;
+import net.dpml.library.info.FilterDirective;
import net.dpml.library.info.Scope;

import net.dpml.util.Logger;

import net.dpml.transit.Artifact;
+import net.dpml.transit.Transit;

/**
* Implementation of a resource.
@@ -73,6 +79,7 @@
private final String m_path;
private final File m_basedir;
private final Logger m_logger;
+ private final Map m_filters = new Hashtable();

/**
* Creation of a new default resource.
@@ -163,16 +170,30 @@
}
}

- setProperty( "name", getName() );
+ // setup the default properties
+
+ setProperty( "project.name", getName() );
if( null != m_parent )
{
- setProperty( "group", m_parent.getResourcePath() );
+ setProperty( "project.group", m_parent.getResourcePath() );
}
+ else
+ {
+ setProperty( "project.group", "" );
+ }
String version = getVersion();
if( null != version )
{
- setProperty( "version", getVersion() );
+ setProperty( "project.version", getVersion() );
}
+
+ FilterDirective[] filters = directive.getFilterDirectives();
+ for( int i=0; i<filters.length; i++ )
+ {
+ FilterDirective filter = filters[i];
+ String token = filter.getToken();
+ m_filters.put( token, filter );
+ }
}

private Type[] buildTypes( TypeDirective[] directives )
@@ -191,6 +212,15 @@

//----------------------------------------------------------------------------

/**
+ * Return the singleton library.
+ * @return the library
+ */
+ public Library getLibrary()
+ {
+ return m_library;
+ }
+
+ /**
* Return the name of the resource.
* @return the resource name
*/
@@ -415,6 +445,48 @@
}

/**
+ * Return an array of filters associated with the resource.
+ * @return the array of filters
+ */
+ public Filter[] getFilters()
+ {
+ DefaultModule module = getDefaultParent();
+ if( null != module )
+ {
+ Map map = new Hashtable();
+ Filter[] filters = module.getFilters();
+ for( int i=0; i<filters.length; i++ )
+ {
+ Filter filter = filters[i];
+ String token = filter.getToken();
+ map.put( token, filter );
+ }
+ Filter[] local = getLocalFilters();
+ for( int i=0; i<local.length; i++ )
+ {
+ Filter filter = local[i];
+ String token = filter.getToken();
+ map.put( token, filter );
+ }
+ return (Filter[]) map.values().toArray( new Filter[0] );
+ }
+ else
+ {
+ return getLocalFilters();
+ }
+ }
+
+ Map getFilterMap()
+ {
+ return m_filters;
+ }
+
+ Filter[] getLocalFilters()
+ {
+ return (Filter[]) getFilterMap().values().toArray( new Filter[0] );
+ }
+
+ /**
* Return an array of resource that are providers to this resource.
* @param scope the operational scope
* @param expand if true include transitive dependencies
@@ -501,6 +573,17 @@
}

/**
+ * Return a filename using the layout strategy employed by the cache.
+ * @param id the artifact type
+ * @return the filename
+ */
+ public String getLayoutPath( String id )
+ {
+ Artifact artifact = getArtifact( id );
+ return Transit.getInstance().getCacheLayout().resolveFilename(
artifact );
+ }
+
+ /**
* Return a directive suitable for publication as an external description.
* @param module the enclosing module
* @return the resource directive
@@ -666,6 +749,10 @@
// internals

//----------------------------------------------------------------------------

+ /**
+ * Return the singlton library.
+ * @return the library
+ */
DefaultLibrary getDefaultLibrary()
{
return m_library;

Modified:
trunk/main/depot/library/src/main/net/dpml/library/impl/LibraryDecoder.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/impl/LibraryDecoder.java
2006-04-07 20:10:49 UTC (rev 1338)
+++
trunk/main/depot/library/src/main/net/dpml/library/impl/LibraryDecoder.java
2006-04-08 17:25:53 UTC (rev 1339)
@@ -26,6 +26,7 @@
import java.util.ArrayList;
import java.util.Properties;

+import net.dpml.library.Feature;
import net.dpml.library.TypeBuilder;
import net.dpml.library.info.LibraryDirective;
import net.dpml.library.info.ImportDirective;
@@ -35,12 +36,17 @@
import net.dpml.library.info.ResourceDirective.Classifier;
import net.dpml.library.info.DependencyDirective;
import net.dpml.library.info.TypeDirective;
+import net.dpml.library.info.FilterDirective;
+import net.dpml.library.info.SimpleFilterDirective;
+import net.dpml.library.info.FeatureFilterDirective;
import net.dpml.library.info.Scope;

import net.dpml.lang.Category;
import net.dpml.lang.Part;

import net.dpml.util.DecodingException;
+
+import net.dpml.util.DecodingException;
import net.dpml.util.DOM3DocumentBuilder;
import net.dpml.util.ElementHelper;

@@ -314,20 +320,8 @@
{
Element child = children[i];
final String tag = child.getTagName();
- if( PROPERTIES_ELEMENT_NAME.equals( tag ) )
+ if( MODULE_ELEMENT_NAME.equals( tag ) )
{
- boolean ok = true; // already processed
- }
- else if( DEPENDENCIES_ELEMENT_NAME.equals( tag ) )
- {
- boolean ok = true; // already processed
- }
- else if( TYPES_ELEMENT_NAME.equals( tag ) )
- {
- boolean ok = true; // already processed
- }
- else if( MODULE_ELEMENT_NAME.equals( tag ) )
- {
ResourceDirective directive =
buildResourceDirectiveFromElement( base, child, null );
list.add( directive );
@@ -350,12 +344,6 @@
buildResourceDirective( child );
list.add( directive );
}
- else
- {
- final String error =
- "Illegal element name [" + tag + "] within 'module'
element.";
- throw new IllegalArgumentException( error );
- }
}
ResourceDirective[] resources = (ResourceDirective[])
list.toArray( new ResourceDirective[0] );
return new ModuleDirective( resource, resources );
@@ -553,6 +541,11 @@
}
}

+ // add filter definitions
+ FilterDirective[] filters = null;
+ Element filtersElement = ElementHelper.getChild( element,
"filters" );
+ filters = buildFilters( filtersElement );
+
if( PROJECT_ELEMENT_NAME.equals( tag ) )
{
classifier = Classifier.LOCAL;
@@ -605,7 +598,7 @@
}
DependencyDirective[] deps =
(DependencyDirective[]) dependencies.toArray( new
DependencyDirective[0] );
- return new ResourceDirective( name, version, classifier,
basedir, types, deps, properties );
+ return new ResourceDirective( name, version, classifier,
basedir, types, deps, properties, filters );
}
else
{
@@ -617,6 +610,47 @@
}
}

+ private FilterDirective[] buildFilters( Element element ) throws
Exception
+ {
+ if( null == element )
+ {
+ return new FilterDirective[0];
+ }
+ else
+ {
+ Element[] children = ElementHelper.getChildren( element );
+ FilterDirective[] filters = new FilterDirective[ children.length
];
+ for( int i=0; i<children.length; i++ )
+ {
+ Element child = children[i];
+ String token = ElementHelper.getAttribute( child, "token" );
+ if( "filter".equals( child.getTagName() ) )
+ {
+ String value = ElementHelper.getAttribute( child,
"value" );
+ filters[i] = new SimpleFilterDirective( token, value );
+ }
+ else if( "feature".equals( child.getTagName() ) )
+ {
+ String id = ElementHelper.getAttribute( child, "id" );
+ Feature feature = Feature.parse( id );
+ String ref = ElementHelper.getAttribute( child, "ref" );
+ String type = ElementHelper.getAttribute( child, "type"
);
+ boolean alias = ElementHelper.getBooleanAttribute(
child, "alias" );
+ filters[i] = new FeatureFilterDirective( token, ref,
feature, type, alias );
+ }
+ else
+ {
+ final String error =
+ "Element name not recognized ["
+ + child.getTagName()
+ + "] (expecting 'filter').";
+ throw new DecodingException( element, error );
+ }
+ }
+ return filters;
+ }
+ }
+
private TypeDirective[] buildTypes( Element element ) throws Exception
{
Element[] children = ElementHelper.getChildren( element );
@@ -651,7 +685,6 @@
}
else
{
- System.out.println( "# UNRECOGNIZED MODULE TYPE" );
final String error =
"Element namespace is recognized as within the module
definition "
+ " however the type identifier is not recognized."
@@ -668,7 +701,6 @@
}
else
{
- System.out.println( "# UNRECOGNIZED TYPE" );
final String error =
"Element is recognized as an AbstractType however the type
id is not resolvable."
+ "\nNamespace: "
@@ -680,7 +712,6 @@
}
else
{
- System.out.println( "# INVALID ELEMENT" );
final String error =
"Element is not derivived from AbstractType defined under the
common namespace."
+ "\nNamespace: " + namespace

Added:
trunk/main/depot/library/src/main/net/dpml/library/info/FeatureFilterDirective.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/info/FeatureFilterDirective.java
2006-04-07 20:10:49 UTC (rev 1338)
+++
trunk/main/depot/library/src/main/net/dpml/library/info/FeatureFilterDirective.java
2006-04-08 17:25:53 UTC (rev 1339)
@@ -0,0 +1,271 @@
+/*
+ * 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.library.info;
+
+import java.io.File;
+
+import net.dpml.library.Feature;
+import net.dpml.library.FeatureRuntimeException;
+import net.dpml.library.Resource;
+import net.dpml.library.ResourceNotFoundException;
+import net.dpml.library.Type;
+
+import net.dpml.transit.Artifact;
+
+/**
+ * Simple value filter.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public class FeatureFilterDirective extends FilterDirective
+{
+ private final Feature m_feature;
+ private final boolean m_alias;
+ private String m_reference;
+ private String m_type;
+
+ /**
+ * Creation of a new anonymous resource directive.
+ * @param token the filter token
+ * @param ref an external resource refernce (possibly null)
+ * @param feature the resource feature
+ * @param type the resource type
+ * @param alias if the alias flag
+ */
+ public FeatureFilterDirective( String token, String ref, Feature
feature, String type, boolean alias )
+ {
+ super( token );
+ m_reference = ref;
+ m_feature = feature;
+ m_type = type;
+ m_alias = alias;
+ }
+
+ /**
+ * Get the resource ref value.
+ * If null the ref shall be interprited as the enclosing project.
+ * @return the ref value
+ */
+ public String getResourceReference()
+ {
+ return m_reference;
+ }
+
+ /**
+ * Return the filter value.
+ * @param resource the enclosing resource
+ * @return the resolved value
+ */
+ public String getValue( Resource enclosing ) throws
ResourceNotFoundException
+ {
+ Resource resource = getReferenceResource( enclosing );
+
+ if( null != m_type && !resource.isa( m_type ) )
+ {
+ final String error =
+ "The feature request for the type ["
+ + m_type
+ + "] from the resource ["
+ + resource
+ + "] cannot be fullfilled because the resource does not
declare "
+ + "production of the requested type.";
+ throw new FeatureRuntimeException( error );
+ }
+
+ if( m_feature.equals( Feature.NAME ) )
+ {
+ return resource.getName();
+ }
+ else if( m_feature.equals( Feature.GROUP ) )
+ {
+ return resource.getParent().getResourcePath();
+ }
+ else if( m_feature.equals( Feature.VERSION ) )
+ {
+ String version = resource.getVersion();
+ if( null == version )
+ {
+ return "";
+ }
+ else
+ {
+ return version;
+ }
+ }
+ else if( m_feature.equals( Feature.URI ) )
+ {
+ if( null == m_type )
+ {
+ final String error =
+ "Type attribute must be supplied in conjuction with the
uri attribute.";
+ throw new FeatureRuntimeException( error );
+ }
+ else
+ {
+ if( m_alias )
+ {
+ Type type = resource.getType( m_type );
+ if( type.getAlias() )
+ {
+ Artifact artifact = resource.getArtifact( m_type );
+ String group = artifact.getGroup();
+ String name = artifact.getName();
+ return "link:" + m_type + ":" + group + "/" + name;
+ }
+ else
+ {
+ final String error =
+ "Cannot resolve link from resource ["
+ + resource
+ + "] because the resource does not declare
production of an alias for the type ["
+ + type.getID()
+ + "].";
+ throw new FeatureRuntimeException( error );
+ }
+ }
+ else
+ {
+ Artifact artifact = resource.getArtifact( m_type );
+ return artifact.toURI().toASCIIString();
+ }
+ }
+ }
+ else if( m_feature.equals( Feature.SPEC ) )
+ {
+ String path = resource.getResourcePath();
+ String version = resource.getVersion();
+ if( null == version )
+ {
+ return path;
+ }
+ else
+ {
+ return path + "#" + version;
+ }
+ }
+ else if( m_feature.equals( Feature.PATH ) )
+ {
+ if( null == m_type )
+ {
+ final String error =
+ "Type attribute must be supplied in conjuction with the
uri attribute.";
+ throw new FeatureRuntimeException( error );
+ }
+ else
+ {
+ Artifact artifact = resource.getArtifact( m_type );
+ try
+ {
+ File cached =
+ (File) artifact.toURL().getContent( new
Class[]{File.class} );
+ return cached.getCanonicalPath();
+ }
+ catch( Exception e )
+ {
+ final String error =
+ "Unable to resolve resource path.";
+ throw new FeatureRuntimeException( error, e );
+ }
+ }
+ }
+ else if( m_feature.equals( Feature.FILENAME ) )
+ {
+ if( null == m_type )
+ {
+ final String error =
+ "Type attribute must be supplied in conjuction with the
filename attribute.";
+ throw new IllegalArgumentException( error );
+ }
+ return resource.getLayoutPath( m_type );
+ }
+ else
+ {
+ final String error =
+ "Invalid feature [" + m_feature + "].";
+ throw new FeatureRuntimeException( error );
+ }
+ }
+
+ private Resource getReferenceResource( Resource resource ) throws
ResourceNotFoundException
+ {
+ if( null == m_reference )
+ {
+ return resource;
+ }
+ else
+ {
+ return resource.getLibrary().getResource( m_reference );
+ }
+ }
+
+ /**
+ * Compare this object with another for equality.
+ * @param other the other object
+ * @return true if equal
+ */
+ public boolean equals( Object other )
+ {
+ if( super.equals( other ) && ( other instanceof
FeatureFilterDirective ) )
+ {
+ FeatureFilterDirective directive = (FeatureFilterDirective)
other;
+ if( !m_feature.equals( directive.m_feature ) )
+ {
+ return false;
+ }
+ else if( !m_type.equals( directive.m_type ) )
+ {
+ return false;
+ }
+ else if( !m_reference.equals( directive.m_reference ) )
+ {
+ return false;
+ }
+ else
+ {
+ return m_alias == directive.m_alias;
+ }
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ /**
+ * Compute the hash value.
+ * @return the hashcode value
+ */
+ public int hashCode()
+ {
+ int hash = super.hashCode();
+ hash ^= super.hashValue( m_feature );
+ hash ^= super.hashValue( m_reference );
+ hash ^= super.hashValue( m_type );
+ if( m_alias )
+ {
+ hash ^= 1;
+ }
+ else
+ {
+ hash ^= -1;
+ }
+ return hash;
+ }
+}

Added:
trunk/main/depot/library/src/main/net/dpml/library/info/FilterDirective.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/info/FilterDirective.java
2006-04-07 20:10:49 UTC (rev 1338)
+++
trunk/main/depot/library/src/main/net/dpml/library/info/FilterDirective.java
2006-04-08 17:25:53 UTC (rev 1339)
@@ -0,0 +1,92 @@
+/*
+ * 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.library.info;
+
+import java.util.Properties;
+
+import net.dpml.lang.AbstractDirective;
+
+import net.dpml.library.Filter;
+import net.dpml.library.Resource;
+import net.dpml.library.ResourceNotFoundException;
+
+/**
+ * Base class for filter directives.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public abstract class FilterDirective extends AbstractDirective implements
Filter
+{
+ private final String m_token;
+
+ /**
+ * Creation of a new anonymous resource directive.
+ * @param token the filter token
+ */
+ public FilterDirective( String token )
+ {
+ m_token = token;
+ }
+
+ /**
+ * Return the filter token.
+ * @return the token
+ */
+ public String getToken()
+ {
+ return m_token;
+ }
+
+ /**
+ * Return the filter value.
+ * @param resource the enclosing resource
+ * @return the resolved value
+ */
+ public abstract String getValue( Resource enclosing ) throws
ResourceNotFoundException;
+
+ /**
+ * Compare this object with another for equality.
+ * @param other the other object
+ * @return true if equal
+ */
+ public boolean equals( Object other )
+ {
+ if( super.equals( other ) && ( other instanceof FilterDirective ) )
+ {
+ FilterDirective directive = (FilterDirective) other;
+ return m_token.equals( directive.m_token );
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ /**
+ * Compute the hash value.
+ * @return the hashcode value
+ */
+ public int hashCode()
+ {
+ int hash = super.hashCode();
+ hash ^= super.hashValue( m_token );
+ return hash;
+ }
+}

Modified:
trunk/main/depot/library/src/main/net/dpml/library/info/ModuleDirective.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/info/ModuleDirective.java
2006-04-07 20:10:49 UTC (rev 1338)
+++
trunk/main/depot/library/src/main/net/dpml/library/info/ModuleDirective.java
2006-04-08 17:25:53 UTC (rev 1339)
@@ -43,7 +43,7 @@
this(
name, null, Classifier.ANONYMOUS, null,
new TypeDirective[0], new DependencyDirective[0],
- new ResourceDirective[]{resource}, null );
+ new ResourceDirective[]{resource}, null, null );
}

/**
@@ -62,7 +62,8 @@
resource.getTypeDirectives(),
resource.getDependencyDirectives(),
resources,
- resource.getProperties() );
+ resource.getProperties(),
+ resource.getFilterDirectives() );
}

/**
@@ -78,9 +79,9 @@
*/
public ModuleDirective(
String name, String version, Classifier classifier, String basedir,
TypeDirective[] types,
- DependencyDirective[] dependencies, ResourceDirective[] resources,
Properties properties )
+ DependencyDirective[] dependencies, ResourceDirective[] resources,
Properties properties, FilterDirective[] filters )
{
- super( name, version, classifier, basedir, types, dependencies,
properties );
+ super( name, version, classifier, basedir, types, dependencies,
properties, filters );
if( null == resources )
{
throw new NullPointerException( "resources" );

Modified:
trunk/main/depot/library/src/main/net/dpml/library/info/ResourceDirective.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/info/ResourceDirective.java
2006-04-07 20:10:49 UTC (rev 1338)
+++
trunk/main/depot/library/src/main/net/dpml/library/info/ResourceDirective.java
2006-04-08 17:25:53 UTC (rev 1339)
@@ -53,6 +53,7 @@
private final TypeDirective[] m_types;
private final DependencyDirective[] m_dependencies;
private final Classifier m_classifier;
+ private final FilterDirective[] m_filters;

/**
* Creation of a new anonymous resource directive.
@@ -83,11 +84,30 @@
* @param types types produced by the resource
* @param dependencies resource dependencies
* @param properties suppliementary properties
+ * @param filters source filters
*/
public ResourceDirective(
String name, String version, Classifier classifier, String basedir,
TypeDirective[] types,
DependencyDirective[] dependencies, Properties properties )
{
+ this( name, version, classifier, basedir, types, dependencies,
properties, null );
+ }
+
+ /**
+ * Creation of a new resource directive.
+ * @param name the resource name
+ * @param version the resource version
+ * @param classifier LOCAL or EXTERNAL classifier
+ * @param basedir the project basedir
+ * @param types types produced by the resource
+ * @param dependencies resource dependencies
+ * @param properties suppliementary properties
+ * @param filters source filters
+ */
+ public ResourceDirective(
+ String name, String version, Classifier classifier, String basedir,
TypeDirective[] types,
+ DependencyDirective[] dependencies, Properties properties,
FilterDirective[] filters )
+ {
super( properties );

if( null == name )
@@ -112,6 +132,15 @@
m_dependencies = dependencies;
m_basedir = basedir;
m_classifier = classifier;
+
+ if( null == filters )
+ {
+ m_filters = new FilterDirective[0];
+ }
+ else
+ {
+ m_filters = filters;
+ }
}

/**
@@ -179,6 +208,15 @@
}

/**
+ * Return an array of filter directives.
+ * @return the filter directives
+ */
+ public FilterDirective[] getFilterDirectives()
+ {
+ return m_filters;
+ }
+
+ /**
* Return an named type.
* @param name the type name
* @return the type directives
@@ -252,6 +290,10 @@
{
return false;
}
+ else if( !Arrays.equals( m_filters, object.m_filters ) )
+ {
+ return false;
+ }
else
{
return Arrays.equals( m_dependencies, object.m_dependencies
);
@@ -275,6 +317,7 @@
hash ^= super.hashValue( m_basedir );
hash ^= super.hashArray( m_types );
hash ^= super.hashArray( m_dependencies );
+ hash ^= super.hashArray( m_filters );
return hash;
}


Added:
trunk/main/depot/library/src/main/net/dpml/library/info/SimpleFilterDirective.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/info/SimpleFilterDirective.java
2006-04-07 20:10:49 UTC (rev 1338)
+++
trunk/main/depot/library/src/main/net/dpml/library/info/SimpleFilterDirective.java
2006-04-08 17:25:53 UTC (rev 1339)
@@ -0,0 +1,85 @@
+/*
+ * 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.library.info;
+
+import net.dpml.library.Resource;
+import net.dpml.library.ResourceNotFoundException;
+
+import net.dpml.util.PropertyResolver;
+
+/**
+ * Simple value filter.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public class SimpleFilterDirective extends FilterDirective
+{
+ private final String m_value;
+
+ /**
+ * Creation of a new anonymous resource directive.
+ * @param token the filter token
+ * @param value the substitution value
+ */
+ public SimpleFilterDirective( String token, String value )
+ {
+ super( token );
+ m_value = value;
+ }
+
+ /**
+ * Return the filter value.
+ * @param resource the enclosing resource
+ * @return the resolved value
+ */
+ public String getValue( Resource resource ) throws
ResourceNotFoundException
+ {
+ return resource.resolve( m_value );
+ }
+
+ /**
+ * Compare this object with another for equality.
+ * @param other the other object
+ * @return true if equal
+ */
+ public boolean equals( Object other )
+ {
+ if( super.equals( other ) && ( other instanceof
SimpleFilterDirective ) )
+ {
+ SimpleFilterDirective directive = (SimpleFilterDirective) other;
+ return m_value.equals( directive.m_value );
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ /**
+ * Compute the hash value.
+ * @return the hashcode value
+ */
+ public int hashCode()
+ {
+ int hash = super.hashCode();
+ hash ^= super.hashValue( m_value );
+ return hash;
+ }
+}

Added:
trunk/main/depot/library/src/test/net/dpml/library/impl/FiltersTestCase.java
===================================================================
---
trunk/main/depot/library/src/test/net/dpml/library/impl/FiltersTestCase.java
2006-04-07 20:10:49 UTC (rev 1338)
+++
trunk/main/depot/library/src/test/net/dpml/library/impl/FiltersTestCase.java
2006-04-08 17:25:53 UTC (rev 1339)
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2004-2006 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.library.impl;
+
+import java.io.File;
+
+import net.dpml.library.Filter;
+import net.dpml.library.Module;
+import net.dpml.library.Resource;
+
+import net.dpml.util.Logger;
+import net.dpml.util.DefaultLogger;
+
+import junit.framework.TestCase;
+
+
+/**
+ * Test filter definition and propergation.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public class FiltersTestCase extends TestCase
+{
+ static
+ {
+ System.setProperty( "java.protocol.handler.pkgs", "net.dpml.transit"
);
+ }
+
+ private LibraryDecoder m_decoder;
+
+ /**
+ * Setup the library directive builder.
+ * @exception Exception if an error occurs during test execution
+ */
+ public void setUp() throws Exception
+ {
+ m_decoder = new LibraryDecoder();
+ }
+
+ /**
+ * Test an library definition containing duplicate modules.
+ * @exception Exception if an error occurs during test execution
+ */
+ public void testModuleFilters() throws Exception
+ {
+ String base = System.getProperty( "project.test.dir" );
+ File test = new File( base );
+ File file = new File( test, "samples/filters.xml" );
+ Logger logger = new DefaultLogger( "test" );
+ DefaultLibrary library = new DefaultLibrary( logger, file );
+ Module acme = library.getModule( "acme" );
+ Filter[] filters = acme.getFilters();
+ assertEquals( "count", 1, filters.length );
+ Filter filter = filters[0];
+ assertEquals( "token", "PUBLISHER", filter.getToken() );
+ assertEquals( "value", "ACME", filter.getValue( acme ) );
+ }
+
+ /**
+ * Test an library definition containing duplicate modules.
+ * @exception Exception if an error occurs during test execution
+ */
+ public void testResourceFilters() throws Exception
+ {
+ String base = System.getProperty( "project.test.dir" );
+ File test = new File( base );
+ File file = new File( test, "samples/filters.xml" );
+ Logger logger = new DefaultLogger( "test" );
+ DefaultLibrary library = new DefaultLibrary( logger, file );
+ Resource widget = library.getResource( "acme/widget" );
+ Filter[] filters = widget.getFilters();
+ assertEquals( "count", 3, filters.length );
+ }
+}

Modified:
trunk/main/depot/library/src/test/net/dpml/library/info/ModuleDirectiveTestCase.java
===================================================================
---
trunk/main/depot/library/src/test/net/dpml/library/info/ModuleDirectiveTestCase.java
2006-04-07 20:10:49 UTC (rev 1338)
+++
trunk/main/depot/library/src/test/net/dpml/library/info/ModuleDirectiveTestCase.java
2006-04-08 17:25:53 UTC (rev 1339)
@@ -37,13 +37,13 @@

MODULES[0] = new ModuleDirective(
"aaa", "1.1", ResourceDirective.LOCAL, ".", types,
- dependencies, resources, PROPERTIES );
+ dependencies, resources, PROPERTIES, null );
MODULES[1] = new ModuleDirective(
"bbb", "1.1", ResourceDirective.LOCAL, ".", types,
- dependencies, resources, PROPERTIES );
+ dependencies, resources, PROPERTIES, null );
MODULES[2] = new ModuleDirective(
"ccc", "1.1", ResourceDirective.LOCAL, ".", types,
- dependencies, resources, PROPERTIES );
+ dependencies, resources, PROPERTIES, null );
}

private final Classifier m_classifier = ResourceDirective.LOCAL;
@@ -53,6 +53,7 @@
private final TypeDirective[] m_types = TypeDirectiveTestCase.TYPES;
private final DependencyDirective[] m_dependencies =
DependencyDirectiveTestCase.DEPENDENCIES;
private final ResourceDirective[] m_resources =
ResourceDirectiveTestCase.RESOURCES;
+ private final FilterDirective[] m_filters = new FilterDirective[0];

private ModuleDirective m_module;

@@ -64,7 +65,7 @@
{
m_module =
new ModuleDirective(
- m_name, m_version, m_classifier, "test", m_types,
m_dependencies, m_resources, PROPERTIES );
+ m_name, m_version, m_classifier, "test", m_types,
m_dependencies, m_resources, PROPERTIES, m_filters );
}

/**
@@ -76,7 +77,7 @@
try
{
new ModuleDirective(
- null, m_version, m_classifier, "test", m_types,
m_dependencies, m_resources, PROPERTIES );
+ null, m_version, m_classifier, "test", m_types,
m_dependencies, m_resources, PROPERTIES, m_filters );
fail( "no-NPE" );
}
catch( NullPointerException e )
@@ -94,7 +95,7 @@
try
{
new ModuleDirective(
- m_name, null, m_classifier, "test", m_types, m_dependencies,
m_resources, PROPERTIES );
+ m_name, null, m_classifier, "test", m_types, m_dependencies,
m_resources, PROPERTIES, m_filters );
}
catch( NullPointerException e )
{
@@ -111,7 +112,7 @@
try
{
new ModuleDirective(
- m_name, m_version, m_classifier, "test", m_types, null,
m_resources, PROPERTIES );
+ m_name, m_version, m_classifier, "test", m_types, null,
m_resources, PROPERTIES, m_filters );
fail( "no-NPE" );
}
catch( NullPointerException e )
@@ -129,7 +130,7 @@
try
{
new ModuleDirective(
- m_name, m_version, m_classifier, "test", m_types,
m_dependencies, null, PROPERTIES );
+ m_name, m_version, m_classifier, "test", m_types,
m_dependencies, null, PROPERTIES, m_filters );
fail( "no-NPE" );
}
catch( NullPointerException e )

Modified: trunk/main/depot/module.xml
===================================================================
--- trunk/main/depot/module.xml 2006-04-07 20:10:49 UTC (rev 1338)
+++ trunk/main/depot/module.xml 2006-04-08 17:25:53 UTC (rev 1339)
@@ -17,6 +17,9 @@
</resource>

<project name="dpml-library-build" basedir="build">
+ <filters>
+ <feature token="ANT-BUILDER-URI" ref="dpml/depot/dpml-tools-builder"
id="uri" type="part"/>
+ </filters>
<types>
<type id="jar"/>
<part:plugin alias="true"
class="net.dpml.library.console.BuilderPlugin"/>
@@ -40,7 +43,7 @@
<include ref="dpml/depot/dpml-tools-builder"/>
<include urn="artifact:jar:checkstyle/checkstyle#4.1">
<property name="project.api.host" value="http://api.dpml.net"/>
- <property name="project.api.root"
value="${project.api.host}/${group}/${version}"/>
+ <property name="project.api.root"
value="${project.api.host}/${project.group}/${project.version}"/>
</include>
<include urn="artifact:jar:commons-logging/commons-logging#1.0.4" />
<include
urn="artifact:jar:commons-collections/commons-collections#3.1" />
@@ -63,9 +66,25 @@

<project name="dpml-depot-console" basedir="core">
<properties>
+ <property name="project.test.fork" value="true"/>
+ <property name="depot.short.filename" value="${project.name}.jar"/>
+ <property name="transit.short.filename" value="dpml-transit-main.jar"/>
<property name="project.jar.main.class" value="net.dpml.depot.Main"/>
- <property name="project.test.fork" value="true"/>
</properties>
+ <filters>
+ <filter token="DEPOT-PATH" value="${depot.short.filename}"/>
+ <filter token="DEPOT-MAIN-CLASS" value="${project.jar.main.class}"/>
+ <filter token="TRANSIT-PATH" value="${transit.short.filename}"/>
+ <filter token="DEPOT-CLASSLOADER-CLASS"
value="net.dpml.lang.SystemClassLoader"/>
+ <feature token="BUILD-ID" id="version"/>
+ <feature token="DEPOT-CONSOLE-URI" id="uri" type="jar"/>
+ <feature token="TRANSIT-CORE-URI" id="uri" type="jar"
ref="dpml/transit/dpml-transit-main" />
+ <feature token="TRANSIT-CONSOLE-URI" id="uri" type="part" alias="true"
ref="dpml/transit/dpml-transit-console" />
+ <feature token="DEPOT-BUILDER-URI" id="uri" type="part" alias="true"
ref="dpml/depot/dpml-library-build" />
+ <feature token="DEPOT-EXEC-URI" id="uri" type="part" alias="true"
ref="dpml/station/dpml-station-exec" />
+ <feature token="DEPOT-STATION-URI" id="uri" type="part" alias="true"
ref="dpml/station/dpml-station-console" />
+ <feature token="DEPOT-STATION-SERVER-URI" id="uri" type="part"
alias="true" ref="dpml/station/dpml-station-server" />
+ </filters>
<types>
<type id="jar"/>
</types>

Modified: trunk/main/depot/tools/builder/etc/prefs/templates/standard.template
===================================================================
--- trunk/main/depot/tools/builder/etc/prefs/templates/standard.template
2006-04-07 20:10:49 UTC (rev 1338)
+++ trunk/main/depot/tools/builder/etc/prefs/templates/standard.template
2006-04-08 17:25:53 UTC (rev 1339)
@@ -26,11 +26,6 @@

<target name="init">
<x:init/>
- <filter token="PROJECT-VERSION" value="${project.version}"/>
- <x:filter feature="project.publisher.name"
- token="PUBLISHER-NAME" default="The Digital Product Meta Library"/>
- <x:filter feature="project.publisher.url"
- token="PUBLISHER-URL" default="http://www.dpml.net"/>
</target>

<target name="prepare" depends="init">

Modified:
trunk/main/depot/tools/builder/src/main/net/dpml/tools/impl/DefaultContext.java
===================================================================
---
trunk/main/depot/tools/builder/src/main/net/dpml/tools/impl/DefaultContext.java
2006-04-07 20:10:49 UTC (rev 1338)
+++
trunk/main/depot/tools/builder/src/main/net/dpml/tools/impl/DefaultContext.java
2006-04-08 17:25:53 UTC (rev 1339)
@@ -50,7 +50,7 @@

private Path m_runtime;
private Path m_test;
-
+
/**
* Creation of a new project build context.
* @param resource the resource definition
@@ -63,24 +63,26 @@
m_resource = resource;
m_library = library;

- String[] names = resource.getPropertyNames();
- for( int i=0; i<names.length; i++ )
- {
- String name = names[i];
- String value = resource.getProperty( name );
- project.setNewProperty( name, value );
- }
+ StandardBuilder.configureProject( project, resource );

- project.setNewProperty( "project.name", m_resource.getName() );
- project.setNewProperty( "project.version", m_resource.getVersion() );
- if( null == m_resource.getParent() )
- {
- project.setNewProperty( "project.group", "" );
- }
- else
- {
- project.setNewProperty( "project.group",
m_resource.getParent().getResourcePath() );
- }
+ //String[] names = resource.getPropertyNames();
+ //for( int i=0; i<names.length; i++ )
+ //{
+ // String name = names[i];
+ // String value = resource.getProperty( name );
+ // project.setNewProperty( name, value );
+ //}
+
+ //project.setNewProperty( "project.name", m_resource.getName() );
+ //project.setNewProperty( "project.version", m_resource.getVersion()
);
+ //if( null == m_resource.getParent() )
+ //{
+ // project.setNewProperty( "project.group", "" );
+ //}
+ //else
+ //{
+ // project.setNewProperty( "project.group",
m_resource.getParent().getResourcePath() );
+ //}
project.setNewProperty( "project.nl", "\n" );
project.setNewProperty(
"project.line",
@@ -109,10 +111,10 @@
}

/**
- * Initialize the contex during which runtime anbd test path objects are
+ * Initialize the contex during which runtime and test path objects are
* established as project references.
*/
- private void init()
+ public void init()
{
if( m_runtime != null )
{

Modified:
trunk/main/depot/tools/builder/src/main/net/dpml/tools/impl/StandardBuilder.java
===================================================================
---
trunk/main/depot/tools/builder/src/main/net/dpml/tools/impl/StandardBuilder.java
2006-04-07 20:10:49 UTC (rev 1338)
+++
trunk/main/depot/tools/builder/src/main/net/dpml/tools/impl/StandardBuilder.java
2006-04-08 17:25:53 UTC (rev 1339)
@@ -21,11 +21,14 @@
import java.io.File;
import java.net.URI;
import java.net.URL;
+import java.util.Date;
+import java.util.Properties;
import java.util.Vector;

import net.dpml.library.Builder;
import net.dpml.library.Library;
import net.dpml.library.Resource;
+import net.dpml.library.Filter;

import net.dpml.tools.model.Workbench;
import net.dpml.tools.model.Context;
@@ -201,10 +204,10 @@
{
m_result = e;
final String error =
- "Unexpected error while attempting to build project ["
- + resource.getResourcePath()
- + "].";
- throw new BuildException( error );
+ "Unexpected error while attempting to resolve project
template."
+ + "\nResource path: "
+ + resource.getResourcePath();
+ throw new BuildException( error, e );
}
}

@@ -288,10 +291,41 @@
Project createProject( Resource resource )
{
Project project = createProject();
- project.setBaseDir( resource.getBaseDir() );
project.addReference( "project.workbench", m_workbench );
Context context = m_workbench.createContext( resource, project );
- project.addReference( "project.context", context );
+ project.addReference( "project.context", context );
+ return configureProject( project, resource );
+ }
+
+ static Project configureProject( Project project, Resource resource )
+ {
+ project.addReference( "project.timestamp", new Date() );
+ project.setBaseDir( resource.getBaseDir() );
+
+ String[] names = resource.getPropertyNames();
+ for( int i=0; i<names.length; i++ )
+ {
+ String name = names[i];
+ String value = resource.getProperty( name );
+ project.setNewProperty( name, value );
+ }
+ Filter[] filters = resource.getFilters();
+ for( int i=0; i<filters.length; i++ )
+ {
+ Filter filter = filters[i];
+ String token = filter.getToken();
+ try
+ {
+ String value = filter.getValue( resource );
+ project.getGlobalFilterSet().addFilter( token, value );
+ }
+ catch( Exception e )
+ {
+ final String error =
+ "Error while attempting to setup the filter [" + token +
"].";
+ throw new BuildException( error, e );
+ }
+ }
return project;
}


Modified:
trunk/main/depot/tools/builder/src/main/net/dpml/tools/model/Context.java
===================================================================
--- trunk/main/depot/tools/builder/src/main/net/dpml/tools/model/Context.java
2006-04-07 20:10:49 UTC (rev 1338)
+++ trunk/main/depot/tools/builder/src/main/net/dpml/tools/model/Context.java
2006-04-08 17:25:53 UTC (rev 1339)
@@ -60,6 +60,11 @@
String getProperty( String key, String value );

/**
+ *Initialize the context.
+ */
+ void init();
+
+ /**
* Return an Ant path suitable for compile or runtime usage. If the
supplied scope is
* less than Scope.RUNTIME a runtime path is returned otherwise the test
path is
* returned.

Modified:
trunk/main/depot/tools/builder/src/main/net/dpml/tools/process/JarProcess.java
===================================================================
---
trunk/main/depot/tools/builder/src/main/net/dpml/tools/process/JarProcess.java
2006-04-07 20:10:49 UTC (rev 1338)
+++
trunk/main/depot/tools/builder/src/main/net/dpml/tools/process/JarProcess.java
2006-04-08 17:25:53 UTC (rev 1339)
@@ -155,6 +155,7 @@
protected Context getContext( Project project )
{
Context context = (Context) project.getReference( "project.context"
);
+ context.init();
if( null == context )
{
final String error =

Modified:
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/InitializationTask.java
===================================================================
---
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/InitializationTask.java
2006-04-07 20:10:49 UTC (rev 1338)
+++
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/InitializationTask.java
2006-04-08 17:25:53 UTC (rev 1339)
@@ -49,12 +49,16 @@
*/
public void execute()
{
- if( null != getProject().getReference( "project.timestamp" ) )
+ if( null != getProject().getReference(
"project.initialization.timestamp" ) )
{
return;
}
+ else
+ {
+ getProject().addReference( "project.initialization.timestamp",
new Date() );
+ }
+
Thread.currentThread().setContextClassLoader(
getClass().getClassLoader() );
- getProject().addReference( "project.timestamp", new Date() );
Resource resource = getResource();
log( resource.toString(), Project.MSG_VERBOSE );


Modified: trunk/main/lang/application/build.xml
===================================================================
--- trunk/main/lang/application/build.xml 2006-04-07 20:10:49 UTC (rev
1338)
+++ trunk/main/lang/application/build.xml 2006-04-08 17:25:53 UTC (rev
1339)
@@ -24,6 +24,7 @@

<property file="${basedir}/build.properties"/>
<property name="home" value="../.."/>
+
<import file="${home}/bootstrap.xml"/>

<target name="init" depends="bootstrap.init">

Modified: trunk/main/lang/common/etc/common.xsd
===================================================================
--- trunk/main/lang/common/etc/common.xsd 2006-04-07 20:10:49 UTC (rev
1338)
+++ trunk/main/lang/common/etc/common.xsd 2006-04-08 17:25:53 UTC (rev
1339)
@@ -1,4 +1,10 @@
<?xml version="1.0"?>
+
+<!--
+Definition of a abstract type used in conjunction with resource defintions
+to identify the availablity of a typed resource.
+-->
+
<schema xmlns="http://www.w3.org/2001/XMLSchema";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:common="@PROJECT-XSD-URI@"

Modified: trunk/main/lang/module/etc/module.xsd
===================================================================
--- trunk/main/lang/module/etc/module.xsd 2006-04-07 20:10:49 UTC (rev
1338)
+++ trunk/main/lang/module/etc/module.xsd 2006-04-08 17:25:53 UTC (rev
1339)
@@ -58,6 +58,7 @@
<complexType name="ResourceType">
<sequence>
<element name="properties" type="this:PropertiesType" minOccurs="0"
maxOccurs="1"/>
+ <element name="filters" type="this:FiltersType" minOccurs="0"
maxOccurs="1"/>
<element name="types" type="this:TypesType" minOccurs="0"
maxOccurs="1"/>
<element name="dependencies" type="this:DependenciesType"
minOccurs="0" maxOccurs="3"/>
</sequence>
@@ -137,6 +138,55 @@
<enumeration value="private"/>
</restriction>
</simpleType>
+
+ <complexType name="AbstractFilter" abstract="true">
+ <complexContent>
+ <restriction base="xsd:anyType">
+ <attribute name="token" type="string" use="required"/>
+ </restriction>
+ </complexContent>
+ </complexType>

+ <element name="abstract-filter" type="this:AbstractFilter"/>
+ <element name="filter" type="this:Filter"
substitutionGroup="this:abstract-filter"/>
+ <element name="feature" type="this:Feature"
substitutionGroup="this:abstract-filter"/>
+
+ <complexType name="FiltersType">
+ <sequence>
+ <element ref="this:abstract-filter" minOccurs="0"
maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="Filter">
+ <complexContent>
+ <extension base="this:AbstractFilter">
+ <attribute name="value" type="string" use="required"/>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="Feature">
+ <complexContent>
+ <extension base="this:AbstractFilter">
+ <attribute name="id" type="this:featureEnumeration"
use="required"/>
+ <attribute name="type" type="string" use="optional"/>
+ <attribute name="alias" type="boolean" use="optional"/>
+ <attribute name="ref" type="string" use="optional"/>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <simpleType name="featureEnumeration">
+ <restriction base="string">
+ <enumeration value="name"/>
+ <enumeration value="group"/>
+ <enumeration value="version"/>
+ <enumeration value="uri"/>
+ <enumeration value="spec"/>
+ <enumeration value="path"/>
+ <enumeration value="filename"/>
+ </restriction>
+ </simpleType>
+
</schema>


Modified: trunk/main/lang/type/etc/type.xsd
===================================================================
--- trunk/main/lang/type/etc/type.xsd 2006-04-07 20:10:49 UTC (rev 1338)
+++ trunk/main/lang/type/etc/type.xsd 2006-04-08 17:25:53 UTC (rev 1339)
@@ -1,7 +1,7 @@
<?xml version="1.0"?>

<!--
-Defintion of a component type.
+Component type definition.
-->

<schema xmlns="http://www.w3.org/2001/XMLSchema";
@@ -16,7 +16,6 @@
<import namespace="@COMPONENT-XSD-URI@"
schemaLocation="@COMPONENT-XSD-URI@"/>

<element name="type" type="this:TypeDefinition"/>
- <!--<element name="component" type="component:component"
substitutionGroup="component:component"/>-->
<element name="strategy" type="this:strategy"
substitutionGroup="component:strategy"/>

<complexType name="TypeDefinition">
@@ -80,15 +79,6 @@
<attribute name="version" type="string"/>
</complexType>

- <!--
- <complexType name="PartsType">
- <choice minOccurs="0" maxOccurs="unbounded">
- <element ref="this:strategy"/>
- <element ref="component:part"/>
- </choice>
- </complexType>
- -->
-
<complexType name="PropertyType">
<attribute name="name" type="string"/>
<attribute name="value" type="string"/>

Modified: trunk/main/library.xml
===================================================================
--- trunk/main/library.xml 2006-04-07 20:10:49 UTC (rev 1338)
+++ trunk/main/library.xml 2006-04-08 17:25:53 UTC (rev 1339)
@@ -10,7 +10,7 @@
<modules>

<module name="dpml" basedir=".">
-
+
<properties>
<property name="project.publisher.name" value="Digital Product Meta
Library"/>
<property name="project.specification.vendor"
value="${project.publisher.name}"/>
@@ -22,6 +22,12 @@
<property name="project.svn.host"
value="svn://svn.berlios.de/dpml/trunk/main"/>
<property name="project.javadoc.linksource" value="true"/>
</properties>
+
+ <filters>
+ <filter token="PROJECT-VERSION" value="${project.version}"/>
+ <filter token="PUBLISHER-NAME" value="${project.publisher.name}"/>
+ <filter token="PUBLISHER-URL" value="${project.publisher.url}"/>
+ </filters>

<types>
<type id="module" alias="true"/>

Modified: trunk/main/metro/component/build.xml
===================================================================
--- trunk/main/metro/component/build.xml 2006-04-07 20:10:49 UTC (rev
1338)
+++ trunk/main/metro/component/build.xml 2006-04-08 17:25:53 UTC (rev
1339)
@@ -24,6 +24,7 @@

<transit:import uri="local:template:dpml/tools/standard"/>

+ <!--
<target name="init" depends="standard.init">
<x:filter feature="name" token="NAME"/>
<x:filter feature="version" token="VERSION"/>
@@ -31,7 +32,8 @@
<x:filter key="dpml-metro-runtime" feature="uri" type="part"
token="PART-HANDLER-URI" />
<x:filter feature="uri" type="jar" token="PART-BUILDER-URI" />
</target>
-
+ -->
+
</project>



Modified:
trunk/main/metro/component/src/main/net/dpml/component/Controller.java
===================================================================
--- trunk/main/metro/component/src/main/net/dpml/component/Controller.java
2006-04-07 20:10:49 UTC (rev 1338)
+++ trunk/main/metro/component/src/main/net/dpml/component/Controller.java
2006-04-08 17:25:53 UTC (rev 1339)
@@ -42,16 +42,6 @@
URI getURI();

/**
- * Load a directive from serialized form.
- *
- * @param uri the directive uri
- * @return the directive
- * @exception ControlException if a direction construction error ocurrs
- * @exception IOException if an I/O error occurs
- */
- //Directive loadDirective( URI uri ) throws ControlException,
IOException;
-
- /**
* Create and return a new management context using the supplied
directive uri.
*
* @param uri a uri identifying a deployment directive

Deleted: trunk/main/metro/model/build.xml
===================================================================
--- trunk/main/metro/model/build.xml 2006-04-07 20:10:49 UTC (rev 1338)
+++ trunk/main/metro/model/build.xml 2006-04-08 17:25:53 UTC (rev 1339)
@@ -1,36 +0,0 @@
-<?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-metro-component"
- xmlns:transit="antlib:net.dpml.transit"
- xmlns:x="dpml:depot"
- default="install">
-
- <transit:import uri="local:template:dpml/tools/standard"/>
-
- <target name="init" depends="standard.init">
- <x:filter feature="name" token="NAME"/>
- <x:filter feature="version" token="VERSION"/>
- <x:filter feature="group" token="GROUP"/>
- <x:filter key="dpml-metro-runtime" feature="uri" type="part"
token="PART-HANDLER-URI" />
- </target>
-
-</project>
-
-

Modified: trunk/main/metro/module.xml
===================================================================
--- trunk/main/metro/module.xml 2006-04-07 20:10:49 UTC (rev 1338)
+++ trunk/main/metro/module.xml 2006-04-08 17:25:53 UTC (rev 1339)
@@ -49,6 +49,12 @@
</project>

<project name="dpml-metro-component" basedir="component">
+ <filters>
+ <feature token="NAME" id="name"/>
+ <feature token="VERSION" id="version"/>
+ <feature token="GROUP" id="group"/>
+ <feature token="PART-HANDLER-URI" id="uri" type="part"
ref="dpml/metro/dpml-metro-runtime"/>
+ </filters>
<types>
<type id="jar"/>
</types>
@@ -63,6 +69,12 @@
</project>

<project name="dpml-metro-model" basedir="model">
+ <filters>
+ <feature token="NAME" id="name"/>
+ <feature token="VERSION" id="version"/>
+ <feature token="GROUP" id="group"/>
+ <feature token="PART-HANDLER-URI" id="uri"
ref="dpml/metro/dpml-metro-runtime" type="part"/>
+ </filters>
<types>
<type id="jar"/>
</types>

Deleted: trunk/main/metro/state/api/build.xml
===================================================================
--- trunk/main/metro/state/api/build.xml 2006-04-07 20:10:49 UTC (rev
1338)
+++ trunk/main/metro/state/api/build.xml 2006-04-08 17:25:53 UTC (rev
1339)
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<project name="dpml-state-api" default="install" basedir="."
- xmlns:transit="antlib:net.dpml.transit">
-
- <transit:import uri="local:template:dpml/tools/standard"/>
-
-</project>

Deleted: trunk/main/util/build.xml
===================================================================
--- trunk/main/util/build.xml 2006-04-07 20:10:49 UTC (rev 1338)
+++ trunk/main/util/build.xml 2006-04-08 17:25:53 UTC (rev 1339)
@@ -1,26 +0,0 @@
-<?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-util" default="install" basedir="."
- xmlns:transit="antlib:net.dpml.transit"
- xmlns:x="dpml:depot" >
-
- <transit:import uri="local:template:dpml/tools/standard"/>
-
-</project>

Deleted: trunk/main/util/i18n/build.xml
===================================================================
--- trunk/main/util/i18n/build.xml 2006-04-07 20:10:49 UTC (rev 1338)
+++ trunk/main/util/i18n/build.xml 2006-04-08 17:25:53 UTC (rev 1339)
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<project name="dpml-util-i18n" default="install" basedir="."
- xmlns:transit="antlib:net.dpml.transit" >
-
- <transit:import uri="local:template:dpml/tools/standard"/>
-
-</project>

Deleted: trunk/main/util/logging/build.xml
===================================================================
--- trunk/main/util/logging/build.xml 2006-04-07 20:10:49 UTC (rev 1338)
+++ trunk/main/util/logging/build.xml 2006-04-08 17:25:53 UTC (rev 1339)
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<project name="dpml-logging-api" default="install" basedir="."
- xmlns:transit="antlib:net.dpml.transit" >
-
- <transit:import uri="local:template:dpml/tools/standard"/>
-
-</project>

Modified: trunk/main/util/module.xml
===================================================================
--- trunk/main/util/module.xml 2006-04-07 20:10:49 UTC (rev 1338)
+++ trunk/main/util/module.xml 2006-04-08 17:25:53 UTC (rev 1339)
@@ -28,14 +28,6 @@
</dependencies>
</project>

- <!--
- <project name="dpml-activity-api" basedir="activity">
- <types>
- <type id="jar"/>
- </types>
- </project>
- -->
-
<project name="dpml-logging-api" basedir="logging">
<types>
<type id="jar"/>




  • r1339 - in trunk/main: . central/src/docs/depot central/src/docs/depot/library central/src/docs/transit depot depot/build depot/core depot/library/etc/test/samples depot/library/src/main/net/dpml/library depot/library/src/main/net/dpml/library/impl depot/library/src/main/net/dpml/library/info depot/library/src/test/net/dpml/library/impl depot/library/src/test/net/dpml/library/info depot/tools/builder/etc/prefs/templates depot/tools/builder/src/main/net/dpml/tools/impl depot/tools/builder/src/main/net/dpml/tools/model depot/tools/builder/src/main/net/dpml/tools/process depot/tools/builder/src/main/net/dpml/tools/tasks lang/application lang/common/etc lang/module/etc lang/type/etc metro metro/component metro/component/src/main/net/dpml/component metro/model metro/state/api util util/i18n util/logging, mcconnell at BerliOS, 04/08/2006

Archive powered by MHonArc 2.6.24.

Top of Page