Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2845 - in development/laboratory/users/niclas/osgi: . activation/impl/src/main/net/dpml/activation/impl composition/api/src/main/net/dpml/composition/model composition/impl/src/main/net/dpml/composition/data/builder composition/impl/src/main/net/dpml/composition/model/impl composition/impl/src/main/net/dpml/composition/util composition/impl/src/test/net/dpml/composition/model/builder composition/spi/src/main/net/dpml/composition/provider composition/test/src/test/net/dpml/composition/util logging/data/src/main/net/dpml/logging/data logging/data/src/test/net/dpml/logging/data/test main/src/main/net/dpml/metro osgi osgi/src osgi/src/main osgi/src/main/net osgi/src/main/net/dpml osgi/src/main/net/dpml/osgi system/api/src/main/net/dpml/system system/impl/src/main/net/dpml/system/monitors system/spi/src/main/net/dpml/system system/test/src/test/net/dpml/system/impl/test testing/cli/src/test/net/dpml/metro/test testing/testschema/src/main/net/dpml/test/testschema unit/src/main/net/dpml/metro/unit

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: niclas AT hedhman.org
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2845 - in development/laboratory/users/niclas/osgi: . activation/impl/src/main/net/dpml/activation/impl composition/api/src/main/net/dpml/composition/model composition/impl/src/main/net/dpml/composition/data/builder composition/impl/src/main/net/dpml/composition/model/impl composition/impl/src/main/net/dpml/composition/util composition/impl/src/test/net/dpml/composition/model/builder composition/spi/src/main/net/dpml/composition/provider composition/test/src/test/net/dpml/composition/util logging/data/src/main/net/dpml/logging/data logging/data/src/test/net/dpml/logging/data/test main/src/main/net/dpml/metro osgi osgi/src osgi/src/main osgi/src/main/net osgi/src/main/net/dpml osgi/src/main/net/dpml/osgi system/api/src/main/net/dpml/system system/impl/src/main/net/dpml/system/monitors system/spi/src/main/net/dpml/system system/test/src/test/net/dpml/system/impl/test testing/cli/src/test/net/dpml/metro/test testing/testschema/src/main/net/dpml/test/testschema unit/src/main/net/dpml/metro/unit
  • Date: Mon, 13 Jun 2005 07:23:50 -0400

Author: niclas AT hedhman.org
Date: Mon Jun 13 07:23:49 2005
New Revision: 2845

Added:
development/laboratory/users/niclas/osgi/osgi/
development/laboratory/users/niclas/osgi/osgi/build.xml (contents, props
changed)
development/laboratory/users/niclas/osgi/osgi/src/
development/laboratory/users/niclas/osgi/osgi/src/main/
development/laboratory/users/niclas/osgi/osgi/src/main/net/
development/laboratory/users/niclas/osgi/osgi/src/main/net/dpml/
development/laboratory/users/niclas/osgi/osgi/src/main/net/dpml/osgi/

development/laboratory/users/niclas/osgi/osgi/src/main/net/dpml/osgi/Metro.java
(contents, props changed)
Modified:

development/laboratory/users/niclas/osgi/activation/impl/src/main/net/dpml/activation/impl/DefaultState.java
(contents, props changed)

development/laboratory/users/niclas/osgi/composition/api/src/main/net/dpml/composition/model/ContainmentModel.java

development/laboratory/users/niclas/osgi/composition/impl/src/main/net/dpml/composition/data/builder/CompositionContentHandlerFactory.java
(contents, props changed)

development/laboratory/users/niclas/osgi/composition/impl/src/main/net/dpml/composition/model/impl/DefaultCompositionFactory.java

development/laboratory/users/niclas/osgi/composition/impl/src/main/net/dpml/composition/model/impl/DefaultState.java
(contents, props changed)

development/laboratory/users/niclas/osgi/composition/impl/src/main/net/dpml/composition/util/ConfigurationSerializer.java
(props changed)

development/laboratory/users/niclas/osgi/composition/impl/src/main/net/dpml/composition/util/ConfigurationValidator.java
(props changed)

development/laboratory/users/niclas/osgi/composition/impl/src/main/net/dpml/composition/util/XercesSchemaValidator.java
(props changed)

development/laboratory/users/niclas/osgi/composition/impl/src/test/net/dpml/composition/model/builder/ContentHandlerTestCase.java
(contents, props changed)

development/laboratory/users/niclas/osgi/composition/spi/src/main/net/dpml/composition/provider/CompositionFactory.java
(contents, props changed)

development/laboratory/users/niclas/osgi/composition/test/src/test/net/dpml/composition/util/SchemaValidationTestCase.java
(contents, props changed)
development/laboratory/users/niclas/osgi/index.xml

development/laboratory/users/niclas/osgi/logging/data/src/main/net/dpml/logging/data/CategoriesDirective.java
(contents, props changed)

development/laboratory/users/niclas/osgi/logging/data/src/main/net/dpml/logging/data/CategoryDirective.java
(contents, props changed)

development/laboratory/users/niclas/osgi/logging/data/src/test/net/dpml/logging/data/test/CategoriesDirectiveTestCase.java
(contents, props changed)

development/laboratory/users/niclas/osgi/logging/data/src/test/net/dpml/logging/data/test/CategoryDirectiveTestCase.java
(contents, props changed)

development/laboratory/users/niclas/osgi/main/src/main/net/dpml/metro/Metro.java

development/laboratory/users/niclas/osgi/system/api/src/main/net/dpml/system/CascadingIOException.java
(contents, props changed)

development/laboratory/users/niclas/osgi/system/api/src/main/net/dpml/system/Factory.java
(contents, props changed)

development/laboratory/users/niclas/osgi/system/api/src/main/net/dpml/system/SystemException.java
(props changed)

development/laboratory/users/niclas/osgi/system/api/src/main/net/dpml/system/SystemRuntimeException.java
(props changed)

development/laboratory/users/niclas/osgi/system/impl/src/main/net/dpml/system/monitors/CacheMonitorLoggerAdapter.java
(contents, props changed)

development/laboratory/users/niclas/osgi/system/impl/src/main/net/dpml/system/monitors/ConnectionMonitorLoggerAdapter.java
(contents, props changed)

development/laboratory/users/niclas/osgi/system/impl/src/main/net/dpml/system/monitors/NetworkMonitorLoggerAdapter.java
(contents, props changed)

development/laboratory/users/niclas/osgi/system/impl/src/main/net/dpml/system/monitors/RepositoryMonitorLoggerAdapter.java
(props changed)

development/laboratory/users/niclas/osgi/system/spi/src/main/net/dpml/system/SystemContext.java
(contents, props changed)

development/laboratory/users/niclas/osgi/system/spi/src/main/net/dpml/system/SystemContextFactory.java
(contents, props changed)

development/laboratory/users/niclas/osgi/system/spi/src/main/net/dpml/system/SystemCriteria.java
(contents, props changed)

development/laboratory/users/niclas/osgi/system/test/src/test/net/dpml/system/impl/test/SystemContextFactoryTestCase.java
(contents, props changed)

development/laboratory/users/niclas/osgi/testing/cli/src/test/net/dpml/metro/test/MetroTestCase.java

development/laboratory/users/niclas/osgi/testing/testschema/src/main/net/dpml/test/testschema/ConfigurableA.java
(props changed)

development/laboratory/users/niclas/osgi/testing/testschema/src/main/net/dpml/test/testschema/ConfigurableB.java
(props changed)

development/laboratory/users/niclas/osgi/testing/testschema/src/main/net/dpml/test/testschema/ConfigurableC.java
(props changed)

development/laboratory/users/niclas/osgi/unit/src/main/net/dpml/metro/unit/CompositionTestCase.java
(contents, props changed)
Log:


Modified:
development/laboratory/users/niclas/osgi/activation/impl/src/main/net/dpml/activation/impl/DefaultState.java
==============================================================================
---
development/laboratory/users/niclas/osgi/activation/impl/src/main/net/dpml/activation/impl/DefaultState.java
(original)
+++
development/laboratory/users/niclas/osgi/activation/impl/src/main/net/dpml/activation/impl/DefaultState.java
Mon Jun 13 07:23:49 2005
@@ -22,7 +22,7 @@
* The State class desribes a enabled versus disabled state.
*
* @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
- * @version $Id: DefaultState.java 187 2004-10-23 17:10:53Z niclas $
+ * @version $Id$
*/

class DefaultState

Modified:
development/laboratory/users/niclas/osgi/composition/api/src/main/net/dpml/composition/model/ContainmentModel.java
==============================================================================
---
development/laboratory/users/niclas/osgi/composition/api/src/main/net/dpml/composition/model/ContainmentModel.java
(original)
+++
development/laboratory/users/niclas/osgi/composition/api/src/main/net/dpml/composition/model/ContainmentModel.java
Mon Jun 13 07:23:49 2005
@@ -18,14 +18,14 @@

package net.dpml.composition.model;

-import java.net.URL;
-import java.util.List;
-
import net.dpml.composition.data.DeploymentProfile;
import net.dpml.composition.data.TargetDirective;
import net.dpml.composition.event.CompositionListener;
-import net.dpml.meta.info.ReferenceDescriptor;
import net.dpml.meta.info.DependencyDescriptor;
+import net.dpml.meta.info.ReferenceDescriptor;
+
+import java.net.URL;
+import java.util.List;

/**
* Containment model is an extended deployment model that aggregates

Modified:
development/laboratory/users/niclas/osgi/composition/impl/src/main/net/dpml/composition/data/builder/CompositionContentHandlerFactory.java
==============================================================================
---
development/laboratory/users/niclas/osgi/composition/impl/src/main/net/dpml/composition/data/builder/CompositionContentHandlerFactory.java
(original)
+++
development/laboratory/users/niclas/osgi/composition/impl/src/main/net/dpml/composition/data/builder/CompositionContentHandlerFactory.java
Mon Jun 13 07:23:49 2005
@@ -27,7 +27,7 @@
* content factories.
*
* @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
- * @version $Id: ContainmentProfileBuilder.java 259 2004-10-30 07:24:40Z
mcconnell $
+ * @version $Id$
*/
public final class CompositionContentHandlerFactory implements
ContentHandlerFactory
{

Modified:
development/laboratory/users/niclas/osgi/composition/impl/src/main/net/dpml/composition/model/impl/DefaultCompositionFactory.java
==============================================================================
---
development/laboratory/users/niclas/osgi/composition/impl/src/main/net/dpml/composition/model/impl/DefaultCompositionFactory.java
(original)
+++
development/laboratory/users/niclas/osgi/composition/impl/src/main/net/dpml/composition/model/impl/DefaultCompositionFactory.java
Mon Jun 13 07:23:49 2005
@@ -18,50 +18,39 @@

package net.dpml.composition.model.impl;

-import java.io.File;
-import java.io.IOException;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.URLConnection;
-
-import java.util.Map;
-
import net.dpml.composition.data.builder.CompositionContentHandlerFactory;
-
import net.dpml.composition.model.ContainmentModel;
import net.dpml.composition.model.DeploymentModel;
import net.dpml.composition.model.ModelException;
-
import net.dpml.composition.provider.CompositionContext;
import net.dpml.composition.provider.CompositionCriteria;
import net.dpml.composition.provider.CompositionException;
import net.dpml.composition.provider.CompositionFactory;
import net.dpml.composition.provider.CompositionRuntimeException;
import net.dpml.composition.provider.ModelFactory;
-
import net.dpml.i18n.ResourceManager;
import net.dpml.i18n.Resources;
-
import net.dpml.lang.NullArgumentException;
-
import net.dpml.logging.Logger;
-
import net.dpml.system.Factory;
import net.dpml.system.SystemContext;
-
import net.dpml.transit.artifact.Artifact;
-
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.GnuParser;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.OptionBuilder;
-import org.apache.commons.cli.OptionGroup;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;

+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.Map;
+
/**
* Plugin factory that handles the establishment of a composition context.
*
@@ -75,11 +64,9 @@
// static
//--------------------------------------------------------------

- private static final Resources REZ =
- ResourceManager.getPackageResources( DefaultCompositionFactory.class );
+ private static final Resources REZ =
ResourceManager.getPackageResources( DefaultCompositionFactory.class );

- private static final String ACTIVATION_IMPL_SPEC =
- "@ACTIVATION-IMPL-SPEC@";
+ private static final String ACTIVATION_IMPL_SPEC =
"@ACTIVATION-IMPL-SPEC@";

//--------------------------------------------------------------
// immutable state
@@ -99,7 +86,7 @@
* @param args the command line arguments
*/
public DefaultCompositionFactory( SystemContext system, String[] args )
- throws ParseException
+ throws ParseException
{
m_system = system;

@@ -203,10 +190,7 @@
}
else
{
- pack(
- buffer,
- CompositionCriteria.DEPLOYMENT_KEY,
- "" + deployment.length + " entries:" );
+ pack( buffer, CompositionCriteria.DEPLOYMENT_KEY, "" +
deployment.length + " entries:" );

for( int i=0; i<deployment.length; i++ )
{
@@ -232,8 +216,7 @@
ClassLoader api = DeploymentModel.class.getClassLoader();
ClassLoader spi = CompositionContext.class.getClassLoader();

- CompositionContext context =
- new DefaultCompositionContext( m_system, api, spi, timeout,
audit );
+ CompositionContext context = new DefaultCompositionContext(
m_system, api, spi, timeout, audit );
if( getLogger().isDebugEnabled() )
{
getLogger().debug( "composition context established" );
@@ -243,8 +226,7 @@
// create the model factory and return the root model
//

- ModelFactory modelFactory =
- new DefaultModelFactory( context, uri, kernel, deployment,
overrides );
+ ModelFactory modelFactory = new DefaultModelFactory( context,
uri, kernel, deployment, overrides );
return modelFactory.getRootModel();
}
catch( ModelException me )
@@ -253,8 +235,7 @@
}
catch( Throwable e )
{
- final String error =
- "Root model creation error.";
+ final String error = "Root model creation error.";
throw new CompositionException( error, e );
}
}
@@ -321,12 +302,7 @@
{
if( getLogger().isDebugEnabled() )
{
- getLogger().debug(
- "setting criteria entry ["
- + key
- + "] to value ["
- + value
- + "]" );
+ getLogger().debug( "setting criteria entry [" + key
+ "] to value [" + value + "]" );
}
criteria.put( key, value );
}
@@ -382,63 +358,11 @@
}
catch( IOException e )
{
- final String error =
- "Error while attempting to convert the file ["
- + file.toString()
- + "] to a url.";
+ final String error = "Error while attempting to convert the file
[" + file + "] to a url.";
throw new CompositionException( error, e );
}
}

-/* Never used. TODO: Remove
- **
- * Create the kernel configuration using a supplied url. If the supplied
- * url is null the implementation will attempt to resolve a "/kernel.xml"
- * resource within the deployment unit.
- *
- * @param url the location of the kernel configuration
- * @return the kernel configuration
- * @exception CompositionException if the configuration could not be
resolved
- *
- private Configuration getKernelConfiguration( URL url ) throws
CompositionException
- {
- if( null != url )
- {
- try
- {
- DefaultConfigurationBuilder builder =
- new DefaultConfigurationBuilder();
- return builder.build( url.toString() );
- }
- catch( Throwable e )
- {
- final String error =
- "Could not load the kernel directive: " + url;
- throw new CompositionException( error, e );
- }
- }
- else
- {
- try
- {
- final InputStream stream =
-
DefaultCompositionFactory.class.getClassLoader().getResourceAsStream(
- "kernel.xml" );
- final InputSource source = new InputSource( stream );
- DefaultConfigurationBuilder builder =
- new DefaultConfigurationBuilder();
- return builder.build( source );
- }
- catch( Throwable ee )
- {
- final String error =
- "Internal error while attempting to build default kernel "
- + "configuration from the kernel spec: " + url;
- throw new CompositionException( error, ee );
- }
- }
- }
-*/
protected Logger getLogger()
{
return m_system.getLogger();
@@ -570,9 +494,7 @@
}
catch( Throwable e )
{
- final String error =
- "Unable to convert the supplied path ["
- + path + "] to a url.";
+ String error = "Unable to convert the supplied path [" + path +
"] to a url.";
throw new CompositionRuntimeException( error, e );
}
}
@@ -605,12 +527,7 @@
{
pack( buffer, "${" + key + "} : " + value );
}
-/* Never used. TODO: Remove
- private void pack( StringBuffer buffer, String key, int value )
- {
- pack( buffer, "${" + key + "} : " + value );
- }
-*/
+
private void pack( StringBuffer buffer, String key, long value )
{
pack( buffer, "${" + key + "} : " + value );
@@ -644,6 +561,4 @@
// already set
}
}
-
-
}

Modified:
development/laboratory/users/niclas/osgi/composition/impl/src/main/net/dpml/composition/model/impl/DefaultState.java
==============================================================================
---
development/laboratory/users/niclas/osgi/composition/impl/src/main/net/dpml/composition/model/impl/DefaultState.java
(original)
+++
development/laboratory/users/niclas/osgi/composition/impl/src/main/net/dpml/composition/model/impl/DefaultState.java
Mon Jun 13 07:23:49 2005
@@ -22,7 +22,7 @@
* The State class desribes a enabled versus disabled state.
*
* @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
- * @version $Id: DefaultState.java 187 2004-10-23 17:10:53Z niclas $
+ * @version $Id$
*/

class DefaultState

Modified:
development/laboratory/users/niclas/osgi/composition/impl/src/test/net/dpml/composition/model/builder/ContentHandlerTestCase.java
==============================================================================
---
development/laboratory/users/niclas/osgi/composition/impl/src/test/net/dpml/composition/model/builder/ContentHandlerTestCase.java
(original)
+++
development/laboratory/users/niclas/osgi/composition/impl/src/test/net/dpml/composition/model/builder/ContentHandlerTestCase.java
Mon Jun 13 07:23:49 2005
@@ -76,7 +76,7 @@
* Stream handler factory assigned to a classloader.
*
* @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
- * @version $Id: LoggingManagerHelper.java 506 2004-11-08 20:10:07Z
mcconnell $
+ * @version $Id$
*/
public static class ArtifactURLStreamHandlerFactory
implements URLStreamHandlerFactory

Modified:
development/laboratory/users/niclas/osgi/composition/spi/src/main/net/dpml/composition/provider/CompositionFactory.java
==============================================================================
---
development/laboratory/users/niclas/osgi/composition/spi/src/main/net/dpml/composition/provider/CompositionFactory.java
(original)
+++
development/laboratory/users/niclas/osgi/composition/spi/src/main/net/dpml/composition/provider/CompositionFactory.java
Mon Jun 13 07:23:49 2005
@@ -17,15 +17,15 @@

package net.dpml.composition.provider;

-import java.util.Map;
-
import net.dpml.composition.model.ContainmentModel;

+import java.util.Map;
+
/**
* Factory that establishes a root containment model.
*
* @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
- * @version $Id: DefaultSystemContext.java 30977 2004-07-30 08:57:54Z niclas
$
+ * @version $Id$
*/
public interface CompositionFactory
{

Modified:
development/laboratory/users/niclas/osgi/composition/test/src/test/net/dpml/composition/util/SchemaValidationTestCase.java
==============================================================================
---
development/laboratory/users/niclas/osgi/composition/test/src/test/net/dpml/composition/util/SchemaValidationTestCase.java
(original)
+++
development/laboratory/users/niclas/osgi/composition/test/src/test/net/dpml/composition/util/SchemaValidationTestCase.java
Mon Jun 13 07:23:49 2005
@@ -17,11 +17,6 @@
*/
package net.dpml.composition.util;

-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.InputStream;
-import java.util.Hashtable;
-
import net.dpml.composition.model.ContainmentModel;
import net.dpml.composition.model.ModelException;
import net.dpml.composition.test.CompositionTestCase;
@@ -29,7 +24,6 @@
import net.dpml.configuration.impl.DefaultConfiguration;
import net.dpml.configuration.impl.DefaultConfigurationBuilder;
import net.dpml.test.testschema.ConfigurableB;
-
import org.apache.xerces.parsers.SAXParser;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -37,6 +31,11 @@
import org.xml.sax.SAXParseException;
import org.xml.sax.helpers.DefaultHandler;

+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.InputStream;
+import java.util.Hashtable;
+
/**
* testing Schema validation
*/

Modified: development/laboratory/users/niclas/osgi/index.xml
==============================================================================
--- development/laboratory/users/niclas/osgi/index.xml (original)
+++ development/laboratory/users/niclas/osgi/index.xml Mon Jun 13 07:23:49
2005
@@ -12,8 +12,6 @@
<info>
<group>dpml/metro</group>
<name>dpml-metro</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<type>module</type>
</info>
<dependencies>
@@ -30,8 +28,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>
@@ -44,8 +40,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>
@@ -56,8 +50,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>
@@ -74,8 +66,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>
@@ -86,8 +76,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>
@@ -105,8 +93,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>
@@ -117,8 +103,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>
@@ -134,8 +118,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>
@@ -148,8 +130,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>
@@ -162,8 +142,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>
@@ -181,8 +159,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>
@@ -198,8 +174,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>
@@ -217,8 +191,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>
@@ -238,14 +210,13 @@
<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>
</types>
</info>
<dependencies>
+ <include key="dpml-composition-api" tag="spi"/>
<include key="dpml-logging-api" tag="api"/>
<include key="dpml-activity-api" tag="api"/>
<include key="dpml-context-api" tag="api"/>
@@ -262,12 +233,28 @@
</dependencies>
</project>

+ <project basedir="osgi">
+ <info>
+ <group>dpml/metro/osgi</group>
+ <name>dpml-metro-osgi</name>
+ <types>
+ <type>jar</type>
+ </types>
+ </info>
+ <dependencies>
+ <include key="dpml-composition-api"/>
+ <include key="dpml-transit-main"/>
+ <include key="dpml-system-api"/>
+ <include key="dpml-system-spi"/>
+ <include key="dpml-logging-spi"/>
+ <include key="osgi" runtime="false" />
+ </dependencies>
+ </project>
+
<project basedir="unit">
<info>
<group>dpml/metro/tools</group>
<name>dpml-metro-unit</name>
- <version>1.0.0</version>
- <type>jar</type>
<status>SNAPSHOT</status>
<types>
<type>jar</type>
@@ -281,7 +268,7 @@
<include key="dpml-configuration-impl"/>
<include key="dpml-parameters-impl"/>
<include key="dpml-context-impl"/>
-
+
<!-- VERY STRANGE THAT THE BELOW IS REQUIRED!!!!!! -->
<include key="junit" build="true" runtime="false" test="true" />
</dependencies>
@@ -295,8 +282,6 @@
<info>
<group>dpml/metro/protected</group>
<name>dpml-composition-api</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -322,8 +307,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-composition-spi</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -339,8 +322,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-composition-impl</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
<type>plugin</type>
@@ -372,8 +353,6 @@
<info>
<group>dpml/test</group>
<name>dpml-composition-test</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -394,7 +373,7 @@
<include key="dpml-system-impl" build="false"/>
<include key="dpml-logging-logkit-impl" build="false"/>
<include key="dpml-test-testschema"/>
-
+
<!-- VERY STRANGE THAT THE BELOW IS REQUIRED!!!!!! -->
<include key="junit" build="true" runtime="false" test="true" />
</dependencies>
@@ -406,8 +385,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>
@@ -421,8 +398,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>
@@ -436,8 +411,6 @@
<info>
<group>dpml/metro/private</group>
<name>dpml-system-spi</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -453,8 +426,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>
@@ -474,8 +445,6 @@
<info>
<group>dpml/test</group>
<name>dpml-system-test</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -492,8 +461,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>
@@ -504,8 +471,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>
@@ -522,8 +487,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>
@@ -540,8 +503,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>
@@ -560,8 +521,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>
@@ -577,8 +536,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>
@@ -593,8 +550,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>
@@ -615,8 +570,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>
@@ -633,8 +586,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>
@@ -651,8 +602,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>
@@ -670,8 +619,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>
@@ -694,8 +641,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>
@@ -709,8 +654,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>
@@ -732,8 +675,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>
@@ -752,8 +693,6 @@
<info>
<group>dpml/test</group>
<name>dpml-activation-test</name>
- <version>1.0.0</version>
- <status>SNAPSHOT</status>
<types>
<type>jar</type>
</types>
@@ -1003,4 +942,12 @@
</info>
</resource>

+ <resource>
+ <info>
+ <name>osgi</name>
+ <version>3.0</version>
+ <group>osgi</group>
+ </info>
+ </resource>
+
</index>

Modified:
development/laboratory/users/niclas/osgi/logging/data/src/main/net/dpml/logging/data/CategoriesDirective.java
==============================================================================
---
development/laboratory/users/niclas/osgi/logging/data/src/main/net/dpml/logging/data/CategoriesDirective.java
(original)
+++
development/laboratory/users/niclas/osgi/logging/data/src/main/net/dpml/logging/data/CategoriesDirective.java
Mon Jun 13 07:23:49 2005
@@ -26,7 +26,7 @@
*
* @see CategoryDirective
* @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
- * @version $Id: CategoriesDirective.java 259 2004-10-30 07:24:40Z mcconnell
$
+ * @version $Id$
*/
public class CategoriesDirective extends CategoryDirective implements
Serializable
{

Modified:
development/laboratory/users/niclas/osgi/logging/data/src/main/net/dpml/logging/data/CategoryDirective.java
==============================================================================
---
development/laboratory/users/niclas/osgi/logging/data/src/main/net/dpml/logging/data/CategoryDirective.java
(original)
+++
development/laboratory/users/niclas/osgi/logging/data/src/main/net/dpml/logging/data/CategoryDirective.java
Mon Jun 13 07:23:49 2005
@@ -40,7 +40,7 @@
* &lt;/categories&gt;
* </pre>
* @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
- * @version $Id: CategoryDirective.java 259 2004-10-30 07:24:40Z mcconnell $
+ * @version $Id$
*/
public class CategoryDirective implements Serializable
{

Modified:
development/laboratory/users/niclas/osgi/logging/data/src/test/net/dpml/logging/data/test/CategoriesDirectiveTestCase.java
==============================================================================
---
development/laboratory/users/niclas/osgi/logging/data/src/test/net/dpml/logging/data/test/CategoriesDirectiveTestCase.java
(original)
+++
development/laboratory/users/niclas/osgi/logging/data/src/test/net/dpml/logging/data/test/CategoriesDirectiveTestCase.java
Mon Jun 13 07:23:49 2005
@@ -32,7 +32,7 @@
* CategoriesDirectiveTestCase.
*
* @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
- * @version $Id: CategoriesDirectiveTestCase.java 259 2004-10-30 07:24:40Z
mcconnell $
+ * @version $Id$
*/
public class CategoriesDirectiveTestCase extends CategoryDirectiveTestCase
{

Modified:
development/laboratory/users/niclas/osgi/logging/data/src/test/net/dpml/logging/data/test/CategoryDirectiveTestCase.java
==============================================================================
---
development/laboratory/users/niclas/osgi/logging/data/src/test/net/dpml/logging/data/test/CategoryDirectiveTestCase.java
(original)
+++
development/laboratory/users/niclas/osgi/logging/data/src/test/net/dpml/logging/data/test/CategoryDirectiveTestCase.java
Mon Jun 13 07:23:49 2005
@@ -34,7 +34,7 @@
* CategoryTestCase does XYZ
*
* @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
- * @version $Id: CategoryDirectiveTestCase.java 259 2004-10-30 07:24:40Z
mcconnell $
+ * @version $Id$
*/
public class CategoryDirectiveTestCase extends TestCase
{

Modified:
development/laboratory/users/niclas/osgi/main/src/main/net/dpml/metro/Metro.java
==============================================================================
---
development/laboratory/users/niclas/osgi/main/src/main/net/dpml/metro/Metro.java
(original)
+++
development/laboratory/users/niclas/osgi/main/src/main/net/dpml/metro/Metro.java
Mon Jun 13 07:23:49 2005
@@ -18,21 +18,6 @@

package net.dpml.metro;

-import java.io.File;
-import java.io.InputStream;
-import java.io.FileInputStream;
-import java.io.IOException;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.URLClassLoader;
-
-import java.util.ArrayList;
-import java.util.Properties;
-import java.util.StringTokenizer;
-import java.util.Map;
-
import net.dpml.activity.Startable;

import net.dpml.cli.ArgumentHandler;
@@ -47,6 +32,7 @@
import net.dpml.logging.Logger;

import net.dpml.system.Factory;
+
import net.dpml.system.SystemContext;
import net.dpml.system.SystemContextFactory;
import net.dpml.system.SystemException;
@@ -55,8 +41,6 @@

import net.dpml.transit.artifact.Artifact;

-import net.dpml.transit.monitors.Monitor;
-
import net.dpml.transit.repository.Plugin;
import net.dpml.transit.repository.Repository;

@@ -65,11 +49,21 @@
import org.apache.commons.cli.GnuParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Option;
-import org.apache.commons.cli.OptionBuilder;
import org.apache.commons.cli.OptionGroup;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;

+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import java.util.Map;
+import java.util.Properties;
+

/**
* The metro system provides support for the establishment of a composition
@@ -87,20 +81,15 @@
// static
//
------------------------------------------------------------------------

- private static Resources REZ =
- ResourceManager.getPackageResources( Metro.class );
+ private static Resources REZ = ResourceManager.getPackageResources(
Metro.class );

- private static String SYSTEM_IMPL_PLUGIN_DEFAULT =
- "@SYSTEM-PLUGIN-URI@";
+ private static String SYSTEM_IMPL_PLUGIN_DEFAULT = "@SYSTEM-PLUGIN-URI@";

- public static String SYSTEM_IMPL_SPEC_KEY =
- SystemContext.DOMAIN + ".metro.system.artifact";
+ public static String SYSTEM_IMPL_SPEC_KEY = SystemContext.DOMAIN +
".metro.system.artifact";

- private static String TARGET_DEFAULT_URI =
- "@COMPOSITION-IMPL-ARTIFACT-URI@";
+ private static String TARGET_DEFAULT_URI =
"@COMPOSITION-IMPL-ARTIFACT-URI@";

- public static String TARGET_URI_KEY =
- SystemContext.DOMAIN + ".metro.main.artifact";
+ public static String TARGET_URI_KEY = SystemContext.DOMAIN +
".metro.main.artifact";

public static String DPML_PROPERTIES = "dpml.properties";

@@ -189,7 +178,7 @@
URI target = getMainArtifact( properties );
getLogger().debug( "loading plugin: [" + target + "]." );

- ClassLoader classloader = getRootClassLoader( line );
+ ClassLoader classloader = getRootClassLoader();
m_plugin = loadPlugin( classloader, m_system, target );

StringBuffer buffer = new StringBuffer( "Metro Context" );
@@ -250,7 +239,7 @@
buffer.append( "\n" + message );
}

- private ClassLoader getRootClassLoader( CommandLine line ) throws
IOException
+ private ClassLoader getRootClassLoader()
{
return SystemContext.class.getClassLoader();
}
@@ -267,8 +256,7 @@
}
}

- private Object loadPlugin(
- ClassLoader classloader, SystemContext system, URI uri )
+ private Object loadPlugin( ClassLoader classloader, SystemContext
system, URI uri )
throws Exception
{
try
@@ -286,8 +274,7 @@
}
catch( Throwable e )
{
- final String message =
- "Plugin deployment failure.";
+ final String message = "Plugin deployment failure.";
throw new SystemException( message, e );
}
}
@@ -306,9 +293,8 @@
}
}

- private SystemContext loadSystemContext(
- Map map, Repository repository, URI uri, String[] args )
- throws SystemException
+ private SystemContext loadSystemContext( Map map, Repository repository,
URI uri, String[] args )
+ throws SystemException
{
try
{
@@ -317,27 +303,18 @@
Object object = repository.getPlugin( classloader, uri, params );
if( object instanceof SystemContextFactory )
{
- SystemContextFactory factory =
- (SystemContextFactory) object;
+ SystemContextFactory factory = (SystemContextFactory) object;
return factory.createSystemContext();
}
else
{
- final String error =
- "The declared system context factory ["
- + object.getClass().getName()
- + "] does not implement the "
- + SystemContextFactory.class.getName()
- + " interface.";
+ final String error = "The declared system context factory ["
+ object.getClass().getName() + "] does not implement the " +
SystemContextFactory.class.getName() + " interface.";
throw new SystemException( error );
}
}
catch( Throwable e )
{
- final String error =
- "Unable to load the system context plugin using ["
- + uri
- + "].";
+ final String error = "Unable to load the system context plugin
using [" + uri + "].";
throw new SystemException( error, e );
}
}
@@ -371,23 +348,15 @@
{
Properties properties = getInitialProperties();
URI system = getSystemContextURI( properties );
- System.out.println(
- " Metro System: "
- + system );
+ System.out.println( " Metro System: " + system );
}
catch( Throwable e )
{
boolean ignore = true;
}
- System.out.println(
- " Metro CLI: "
- + descriptor.getURI() );
- System.out.println(
- " Transit CLI: "
- + map.get( "urn:transit.cli.uri" ) );
- System.out.println(
- " Transit Handler: "
- + map.get( "urn:transit.handler.uri" ) );
+ System.out.println( " Metro CLI: " + descriptor.getURI() );
+ System.out.println( " Transit CLI: " + map.get(
"urn:transit.cli.uri" ) );
+ System.out.println( " Transit Handler: " + map.get(
"urn:transit.handler.uri" ) );
System.out.println( " " );
}

@@ -403,7 +372,7 @@
public void run()
{
boolean flag = m_server;
- while( flag && !m_fail )
+ while( flag && ( m_fail == false ) )
{
try
{
@@ -415,18 +384,18 @@
}
}

- if( (null != m_plugin ) && m_plugin instanceof Startable )
+ if( ( null != m_plugin ) && m_plugin instanceof Startable )
{
getLogger().debug( "initiating shutdown" );
try
{
- ((Startable)m_plugin).stop();
+ Startable startablePlugin = (Startable) m_plugin;
+ startablePlugin.stop();
getLogger().debug( "shutdown complete" );
}
catch( Exception e )
{
- final String error =
- "Target plugin raised an exception while attempting to
initiale the shutdown phase.";
+ String error = "Target plugin raised an exception while
attempting to initiale the shutdown phase.";
getLogger().error( error, e );
}
}
@@ -453,15 +422,16 @@
private Options buildMetroOptions()
{
Options options = new Options();
+ Option option;
+ String i18n;

//
// language
//

- OptionBuilder.hasArg();
- OptionBuilder.withArgName( "code" );
- OptionBuilder.withDescription( REZ.getString(
"cli-language-description" ) );
- Option option = OptionBuilder.create( "lang" );
+ i18n = REZ.getString( "cli-language-description" );
+ option = new Option( "lang", true, i18n );
+ option.setArgName( "code" );
options.addOption( option );

//
@@ -469,9 +439,11 @@
//

OptionGroup group = new OptionGroup();
- option = new Option( "help", REZ.getString( "cli-help-description" )
);
+ i18n = REZ.getString( "cli-help-description" );
+ option = new Option( "help", i18n );
group.addOption( option );
- option = new Option( "version", REZ.getString(
"cli-version-description" ) );
+ i18n = REZ.getString( "cli-version-description" );
+ option = new Option( "version", i18n );
group.addOption( option );
options.addOptionGroup( group );

@@ -480,37 +452,24 @@
//

OptionGroup server = new OptionGroup();
- server.addOption(
- new Option( "server", REZ.getString( "cli-server-description" ) )
);
- server.addOption(
- new Option( "execute", REZ.getString( "cli-execute-description" )
) );
+ i18n = REZ.getString( "cli-server-description" );
+ option = new Option( "server", i18n );
+ server.addOption( option );
+ i18n = REZ.getString( "cli-execute-description" );
+ option = new Option( "execute", i18n );
+ server.addOption( option );
options.addOptionGroup( server );

//
// other
//

- options.addOption(
- new Option( "test", "metro test cycle" ) );
+ option = new Option( "test", "metro test cycle" );
+ options.addOption( option );

return options;
}

- private String[] getLoadArguments( String arg )
- {
- if( null == arg )
- return new String[0];
- if( arg.indexOf( "," ) == -1 )
- return new String[]{ arg };
- ArrayList list = new ArrayList();
- StringTokenizer tokenizer = new StringTokenizer( arg, "," );
- while( tokenizer.hasMoreTokens() )
- {
- list.add( tokenizer.nextToken() );
- }
- return (String[]) list.toArray( new String[0] );
- }
-
/**
* Load all properties file from the standard locations. Standard
* locations in priority order include:

Added: development/laboratory/users/niclas/osgi/osgi/build.xml
==============================================================================
--- (empty file)
+++ development/laboratory/users/niclas/osgi/osgi/build.xml Mon Jun 13
07:23:49 2005
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<project name="dpml-metro-osgi" default="install" basedir="."
+ xmlns:transit="antlib:net.dpml.transit"
xmlns:x="plugin:dpml/magic/dpml-magic-core" >
+
+ <transit:import uri="artifact:template:dpml/magic/standard"/>
+
+ <target name="init" depends="standard.init">
+ <x:filter feature="plugin" token="METRO-PLUGIN-URI"/>
+ <x:filter feature="plugin" key="dpml-system-impl"
token="SYSTEM-PLUGIN-URI"/>
+ <x:filter feature="plugin" key="dpml-composition-impl"
token="COMPOSITION-IMPL-ARTIFACT-URI"/>
+ <x:filter feature="plugin" key="dpml-activation-impl"
token="RUNTIME-IMPL-ARTIFACT-URI"/>
+ <x:filter feature="version" key="dpml-transit-main"
token="TRANSIT_VERSION"/>
+
+ <x:property key="dpml-transit-main" feature="uri" name="transit.uri"/>
+ <transit:get uri="${transit.uri}" property="transit.filename"/>
+ <filter token="PROJECT-NAME" value="${project.name}"/>
+ </target>
+
+ <target name="build" depends="standard.build">
+ <mkdir dir="target/manifest/" />
+ <x:property name="version" feature="version" />
+ <tstamp/>
+ <x:path mode="runtime" id="runtime-path" />
+ <pathconvert
+ dirsep="/"
+ pathsep=","
+ property="classpath"
+ refid="runtime-path"
+ >
+ <mapper type="flatten"/>
+ </pathconvert>
+ <manifest file="target/manifest/MANIFEST.MF" >
+ <attribute name="Built-By" value="${user.name}"/>
+ <attribute name="Specification-Title" value=""/>
+ <attribute name="Specification-Version" value="1.0"/>
+ <attribute name="Specification-Vendor" value="Digital Product Meta
Library"/>
+ <attribute name="Implementation-Title" value="Metro OSGi Bundle"/>
+ <attribute name="Implementation-Version" value="${version} ${DSTAMP}"/>
+ <attribute name="Implementation-Vendor" value="Digital Product Meta
Library"/>
+
+ <attribute name="Bundle-Activator" value="net.dpml.osgi.Metro" />
+ <attribute name="Bundle-Category" value="container, platform"/>
+ <attribute name="Bundle-ClassPath" value=".,${classpath}"/>
+ <attribute name="Bundle-ContactAddress"
value="http://www.dpml.net/about"/>
+ <attribute name="Bundle-Copyright" value="Copyright 2005 Digital
Product Meta Library"/>
+ <attribute name="Bundle-Description" value="Metro Runtime Platform"/>
+ <attribute name="Bundle-DocURL"
value="http://www.dpml.net/metro/latest/index.html"/>
+ <attribute name="Bundle-Name" value="Metro"/>
+<!--
+ <attribute name="Bundle-RequiredExecutionEnvironment" value="J2SE"/>
+-->
+ <attribute name="Bundle-UpdateLocation"
value="http://repository.dpml.net/classic/dpml/metro/tools/jars/dpml-metro-main.jar"/>
+ <attribute name="Bundle-Vendor" value="DPML"/>
+ <attribute name="Bundle-Version" value="${version}"/>
+ <attribute name="Import-Package" value="org.osgi.service.log"/>
+ </manifest>
+ </target>
+
+ <target name="package" depends="standard.package">
+ <x:replicate todir="target/bundle-content/" flatten="true"/>
+ <x:property name="jarfilename" feature="filename" />
+ <x:property name="transitdir" feature="spec" key="dpml-transit-main" />
+ <jar destfile="target/deliverables/jars/${jarfilename}"
+ manifest="target/manifest/MANIFEST.MF" >
+ <fileset dir="target/classes/" >
+ <include name="**" />
+ </fileset>
+ <fileset dir="target/bundle-content/" >
+ <include name="**/*.jar" />
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="install" depends="standard.install"/>
+
+</project>

Added:
development/laboratory/users/niclas/osgi/osgi/src/main/net/dpml/osgi/Metro.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/osgi/osgi/src/main/net/dpml/osgi/Metro.java
Mon Jun 13 07:23:49 2005
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2004 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.osgi;
+
+import net.dpml.composition.model.ContainmentModel;
+import net.dpml.system.SystemContext;
+import net.dpml.system.Factory;
+import net.dpml.transit.artifact.Artifact;
+import net.dpml.transit.repository.StandardLoader;
+import net.dpml.transit.repository.Repository;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+import java.net.URI;
+import java.util.Map;
+import java.util.Hashtable;
+
+public class Metro
+ implements BundleActivator
+{
+
+ private ContainmentModel m_root;
+
+ public Metro()
+ {
+ }
+
+ public void start( BundleContext bundleContext )
+ throws Exception
+ {
+ String systemDir = bundleContext.getProperty( "dpml.system.dir" );
+
+ Repository repo = new StandardLoader();
+ //
+ // create the system context
+ //
+
+ URI uri = Artifact.createArtifact( "@SYSTEM-PLUGIN-URI@" ).toURI();
+ ClassLoader classloader = getClass().getClassLoader();
+
+ Map data = new Hashtable();
+ data.put( "urn:transit.debug.policy", new Boolean( false ) ); //
TODO check in supplied map
+ Factory systemfactory = (Factory) repo.getPlugin( classloader, uri,
new Object[]{ data } );
+ Map systemCriteria = systemfactory.createDefaultCriteria();
+ systemCriteria.put( "dpml.system.dir", systemDir );
+ SystemContext system = (SystemContext) systemfactory.create(
systemCriteria );
+
+ //
+ // create the composition context
+ //
+
+ uri = new URI( "@COMPOSITION-IMPL-ARTIFACT-URI@" );
+ Object[] params = new Object[]{ system };
+ Factory modelFactory = (Factory) system.getRepository().getPlugin(
classloader, uri, params );
+ m_root = (ContainmentModel) modelFactory.create();
+ }
+
+ public void stop( BundleContext bundleContext )
+ throws Exception
+ {
+ m_root.decommission();
+ m_root.disassemble();
+ }
+}

Modified:
development/laboratory/users/niclas/osgi/system/api/src/main/net/dpml/system/CascadingIOException.java
==============================================================================
---
development/laboratory/users/niclas/osgi/system/api/src/main/net/dpml/system/CascadingIOException.java
(original)
+++
development/laboratory/users/niclas/osgi/system/api/src/main/net/dpml/system/CascadingIOException.java
Mon Jun 13 07:23:49 2005
@@ -23,7 +23,7 @@
* Exception to indicate that there was a IO exception.
*
* @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
- * @version $Id: CascadingIOException.java 259 2004-10-30 07:24:40Z
mcconnell $
+ * @version $Id$
*/
public class CascadingIOException extends IOException
{

Modified:
development/laboratory/users/niclas/osgi/system/api/src/main/net/dpml/system/Factory.java
==============================================================================
---
development/laboratory/users/niclas/osgi/system/api/src/main/net/dpml/system/Factory.java
(original)
+++
development/laboratory/users/niclas/osgi/system/api/src/main/net/dpml/system/Factory.java
Mon Jun 13 07:23:49 2005
@@ -23,7 +23,7 @@
* A generic application factory.
*
* @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
- * @version $Id: Factory.java 30977 2004-07-30 08:57:54Z niclas $
+ * @version $Id$
*/
public interface Factory
{

Modified:
development/laboratory/users/niclas/osgi/system/impl/src/main/net/dpml/system/monitors/CacheMonitorLoggerAdapter.java
==============================================================================
---
development/laboratory/users/niclas/osgi/system/impl/src/main/net/dpml/system/monitors/CacheMonitorLoggerAdapter.java
(original)
+++
development/laboratory/users/niclas/osgi/system/impl/src/main/net/dpml/system/monitors/CacheMonitorLoggerAdapter.java
Mon Jun 13 07:23:49 2005
@@ -35,7 +35,7 @@
* The CacheMonitor must be thread safe.
* </p>
* @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
- * @version $Id: DownloadMonitor.java 183 2004-10-23 16:53:31Z niclas $
+ * @version $Id$
* @see Monitor
*/
public class CacheMonitorLoggerAdapter

Modified:
development/laboratory/users/niclas/osgi/system/impl/src/main/net/dpml/system/monitors/ConnectionMonitorLoggerAdapter.java
==============================================================================
---
development/laboratory/users/niclas/osgi/system/impl/src/main/net/dpml/system/monitors/ConnectionMonitorLoggerAdapter.java
(original)
+++
development/laboratory/users/niclas/osgi/system/impl/src/main/net/dpml/system/monitors/ConnectionMonitorLoggerAdapter.java
Mon Jun 13 07:23:49 2005
@@ -32,7 +32,7 @@
* The NetworkMonitor must be thread safe.
* </p>
* @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
- * @version $Id: DownloadMonitor.java 183 2004-10-23 16:53:31Z niclas $
+ * @version $Id$
* @see Monitor
*/
public class ConnectionMonitorLoggerAdapter

Modified:
development/laboratory/users/niclas/osgi/system/impl/src/main/net/dpml/system/monitors/NetworkMonitorLoggerAdapter.java
==============================================================================
---
development/laboratory/users/niclas/osgi/system/impl/src/main/net/dpml/system/monitors/NetworkMonitorLoggerAdapter.java
(original)
+++
development/laboratory/users/niclas/osgi/system/impl/src/main/net/dpml/system/monitors/NetworkMonitorLoggerAdapter.java
Mon Jun 13 07:23:49 2005
@@ -33,7 +33,7 @@
* the same DownloadMonitor for different work in-progress.
* </p>
* @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
- * @version $Id: DownloadMonitor.java 183 2004-10-23 16:53:31Z niclas $
+ * @version $Id$
* @see Monitor
*/
public class NetworkMonitorLoggerAdapter

Modified:
development/laboratory/users/niclas/osgi/system/spi/src/main/net/dpml/system/SystemContext.java
==============================================================================
---
development/laboratory/users/niclas/osgi/system/spi/src/main/net/dpml/system/SystemContext.java
(original)
+++
development/laboratory/users/niclas/osgi/system/spi/src/main/net/dpml/system/SystemContext.java
Mon Jun 13 07:23:49 2005
@@ -18,21 +18,19 @@

package net.dpml.system;

-import java.io.File;
-import java.util.Properties;
-
import net.dpml.context.Context;
-
import net.dpml.logging.Logger;
import net.dpml.logging.provider.LoggingManager;
-
import net.dpml.transit.repository.Repository;

+import java.io.File;
+import java.util.Properties;
+
/**
* The controller class manages the deployment of a set of plugins.
*
* @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
- * @version $Id: SystemContext.java 364 2004-11-04 15:16:12Z mcconnell $
+ * @version $Id$
*/
public interface SystemContext extends Context
{
@@ -52,34 +50,34 @@
static final String ANCHOR_KEY = GROUP + ".anchor";
static final String ISOLATE_KEY = GROUP + ".isolate";

- static final String[] KEYS =
- new String[]{
+ static final String[] KEYS = new String[]
+ {
DIR_KEY,
LOGGING_IMPLEMENTATION_KEY,
LOGGING_CONFIGURATION_KEY,
HOME_KEY,
TEMP_KEY,
ISOLATE_KEY
- };
+ };

/** Return the Info mode
- *
- */
+ *
+ */
boolean getInfoMode();

/** Return the Debug mode
- *
- */
+ *
+ */
boolean getDebugMode();

- /**
+ /**
* Return the application home directory.
*
* @return the home directory
*/
File getHomeDirectory();

- /**
+ /**
* Return the anchor directory from which a container
* may use to resolve relative classpath references.
*
@@ -87,7 +85,7 @@
*/
File getAnchorDirectory();

- /**
+ /**
* Return the working directory from which containers may establish
* persistent content between sessions.
*
@@ -95,7 +93,7 @@
*/
File getWorkingDirectory();

- /**
+ /**
* Return the temp directory from which containers may establish
* transient non-persistent content.
*
@@ -103,56 +101,56 @@
*/
File getTempDirectory();

- /**
+ /**
* Return the system proxy enablement flag.
*
* @return the proxy flag
*/
boolean isProxyEnabled();

- /**
+ /**
* Return the system logging channel.
*
* @return the logging channel.
*/
Logger getLogger();

- /**
+ /**
* Return the system wide logging manager.
*
* @return the logging manager.
*/
LoggingManager getLoggingManager();

- /**
+ /**
* Return the application repository cache controller.
*
* @return the repository
*/
Repository getRepository();

- /**
+ /**
* Return the unprocessed command line arguments.
*
* @return the remaining cli arguments
*/
String[] getArgs();

- /**
+ /**
* Return the application properties.
*
* @return the properties
*/
Properties getProperties();

- /**
+ /**
* Prepare a string representation of an object for presentation.
* @param object the object to parse
* @return the presentation string
*/
String toString( Object object );

- /**
+ /**
* Prepare a string representation of an object array for presentation.
* @param objects the array of objects
* @return the presentation string

Modified:
development/laboratory/users/niclas/osgi/system/spi/src/main/net/dpml/system/SystemContextFactory.java
==============================================================================
---
development/laboratory/users/niclas/osgi/system/spi/src/main/net/dpml/system/SystemContextFactory.java
(original)
+++
development/laboratory/users/niclas/osgi/system/spi/src/main/net/dpml/system/SystemContextFactory.java
Mon Jun 13 07:23:49 2005
@@ -22,7 +22,7 @@
* A factory supporting the creation of a system context.
*
* @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
- * @version $Id: SystemContextFactory.java 364 2004-11-04 15:16:12Z
mcconnell $
+ * @version $Id$
*/
public interface SystemContextFactory extends Factory
{

Modified:
development/laboratory/users/niclas/osgi/system/spi/src/main/net/dpml/system/SystemCriteria.java
==============================================================================
---
development/laboratory/users/niclas/osgi/system/spi/src/main/net/dpml/system/SystemCriteria.java
(original)
+++
development/laboratory/users/niclas/osgi/system/spi/src/main/net/dpml/system/SystemCriteria.java
Mon Jun 13 07:23:49 2005
@@ -29,7 +29,7 @@
* context parameters.
*
* @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
- * @version $Id: SystemCriteria.java 364 2004-11-04 15:16:12Z mcconnell $
+ * @version $Id$
*/
public interface SystemCriteria extends Map
{

Modified:
development/laboratory/users/niclas/osgi/system/test/src/test/net/dpml/system/impl/test/SystemContextFactoryTestCase.java
==============================================================================
---
development/laboratory/users/niclas/osgi/system/test/src/test/net/dpml/system/impl/test/SystemContextFactoryTestCase.java
(original)
+++
development/laboratory/users/niclas/osgi/system/test/src/test/net/dpml/system/impl/test/SystemContextFactoryTestCase.java
Mon Jun 13 07:23:49 2005
@@ -34,7 +34,7 @@
* SystemContextFactoryTestCase
*
* @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
- * @version $Id: SystemContextFactoryTestCase.java 363 2004-11-04 15:06:34Z
mcconnell $
+ * @version $Id$
*/
public class SystemContextFactoryTestCase extends TestCase
{

Modified:
development/laboratory/users/niclas/osgi/testing/cli/src/test/net/dpml/metro/test/MetroTestCase.java
==============================================================================
---
development/laboratory/users/niclas/osgi/testing/cli/src/test/net/dpml/metro/test/MetroTestCase.java
(original)
+++
development/laboratory/users/niclas/osgi/testing/cli/src/test/net/dpml/metro/test/MetroTestCase.java
Mon Jun 13 07:23:49 2005
@@ -18,14 +18,14 @@

package net.dpml.metro.test;

-import java.net.URI;
-
import junit.framework.TestCase;
import net.dpml.exception.ExceptionHelper;
import net.dpml.transit.artifact.Artifact;
import net.dpml.transit.repository.Repository;
import net.dpml.transit.repository.StandardLoader;

+import java.net.URI;
+
/**
* SystemContextFactoryTestCase
*
@@ -61,9 +61,8 @@
"-info", "-execute", "@PLAYGROUND-SPEC@" };

URI uri = Artifact.createArtifact( "@METRO-CLI-SPEC@" ).toURI();
- Artifact artifact = Artifact.createArtifact( uri );
ClassLoader classloader = MetroTestCase.class.getClassLoader();
- repository.getPlugin( classloader, artifact, new Object[]{ args } );
+ repository.getPlugin( classloader, uri, new Object[]{ args } );
System.gc();
}


Modified:
development/laboratory/users/niclas/osgi/unit/src/main/net/dpml/metro/unit/CompositionTestCase.java
==============================================================================
---
development/laboratory/users/niclas/osgi/unit/src/main/net/dpml/metro/unit/CompositionTestCase.java
(original)
+++
development/laboratory/users/niclas/osgi/unit/src/main/net/dpml/metro/unit/CompositionTestCase.java
Mon Jun 13 07:23:49 2005
@@ -18,27 +18,28 @@

package net.dpml.metro.unit;

-import java.io.File;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Map;
-
import junit.framework.TestCase;
import net.dpml.composition.model.ContainmentModel;
+import net.dpml.composition.model.CompositionException;
import net.dpml.exception.ExceptionHelper;
import net.dpml.system.Factory;
import net.dpml.system.SystemContext;
import net.dpml.transit.artifact.Artifact;
import net.dpml.transit.repository.Repository;
import net.dpml.transit.repository.StandardLoader;
-import net.dpml.transit.monitors.Monitor;
+
+import java.io.File;
+import java.net.URI;
+import java.net.MalformedURLException;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Map;


/**
* AbstractCompositionTestCase
* @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
- * @version $Id: CompositionTestCase.java 363 2004-11-04 15:06:34Z mcconnell
$
+ * @version $Id$
*/
public abstract class CompositionTestCase extends TestCase
{
@@ -97,7 +98,6 @@
Map data = new Hashtable();
data.put( "urn:transit.debug.policy", new Boolean( false ) ); //
TODO check in supplied map
Factory systemfactory = (Factory) repo.getPlugin( classloader, uri,
new Object[]{data} );
-
Map systemCriteria = systemfactory.createDefaultCriteria();
systemCriteria.put( "dpml.system.dir", WORK );
SystemContext system = (SystemContext) systemfactory.create(
systemCriteria );
@@ -106,10 +106,9 @@
// create the composition context
//

- uri = Artifact.createArtifact( "@COMPOSITION_PLUGIN_URI@" ).toURI();
+ uri = new URI( "@COMPOSITION_PLUGIN_URI@" );
Object[] params = new Object[]{ system };
- Factory modelFactory =
- (Factory) system.getRepository().getPlugin( classloader, uri,
params );
+ Factory modelFactory = (Factory) system.getRepository().getPlugin(
classloader, uri, params );
m_root = (ContainmentModel) modelFactory.create( map );
}

@@ -127,12 +126,11 @@
File source = new File( WORK, path );
return getRoot().addContainmentModel( source.toURL() );
}
- catch( Throwable e )
+ catch( MalformedURLException e )
{
- final String error =
- "Unable to establish containment model.";
+ final String error = "Unable to establish containment model.";
final String message = ExceptionHelper.packException( error, e,
true );
- throw new Exception( message );
+ throw new CompositionException( message );
}
}




  • svn commit: r2845 - in development/laboratory/users/niclas/osgi: . activation/impl/src/main/net/dpml/activation/impl composition/api/src/main/net/dpml/composition/model composition/impl/src/main/net/dpml/composition/data/builder composition/impl/src/main/net/dpml/composition/model/impl composition/impl/src/main/net/dpml/composition/util composition/impl/src/test/net/dpml/composition/model/builder composition/spi/src/main/net/dpml/composition/provider composition/test/src/test/net/dpml/composition/util logging/data/src/main/net/dpml/logging/data logging/data/src/test/net/dpml/logging/data/test main/src/main/net/dpml/metro osgi osgi/src osgi/src/main osgi/src/main/net osgi/src/main/net/dpml osgi/src/main/net/dpml/osgi system/api/src/main/net/dpml/system system/impl/src/main/net/dpml/system/monitors system/spi/src/main/net/dpml/system system/test/src/test/net/dpml/system/impl/test testing/cli/src/test/net/dpml/metro/test testing/testschema/src/main/net/dpml/test/testschema unit/src/main/net/dpml/metro/unit, niclas, 06/13/2005

Archive powered by MHonArc 2.6.24.

Top of Page