Skip to Content.
Sympa Menu

notify-dpml - r1134 - in trunk/main: central/src/docs/depot/library central/src/docs/transit/config depot depot/library/common/src/main/net/dpml/library/impl depot/library/common/src/test/net/dpml/library/impl metro planet planet/http transit util

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: r1134 - in trunk/main: central/src/docs/depot/library central/src/docs/transit/config depot depot/library/common/src/main/net/dpml/library/impl depot/library/common/src/test/net/dpml/library/impl metro planet planet/http transit util
  • Date: Fri, 24 Feb 2006 18:03:41 +0100

Author: mcconnell
Date: 2006-02-24 18:03:38 +0100 (Fri, 24 Feb 2006)
New Revision: 1134

Modified:
trunk/main/central/src/docs/depot/library/index.xml
trunk/main/central/src/docs/depot/library/modules.xml
trunk/main/central/src/docs/transit/config/hosts.xml
trunk/main/central/src/docs/transit/config/index.xml
trunk/main/central/src/docs/transit/config/proxy.xml

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

trunk/main/depot/library/common/src/test/net/dpml/library/impl/DefaultResourceTestCase.java
trunk/main/depot/module.xml
trunk/main/metro/module.xml
trunk/main/planet/http/module.xml
trunk/main/planet/module.xml
trunk/main/transit/module.xml
trunk/main/util/module.xml
Log:
add trap preventing export of nested modules and update documentation about
module files

Modified: trunk/main/central/src/docs/depot/library/index.xml
===================================================================
--- trunk/main/central/src/docs/depot/library/index.xml 2006-02-24 15:30:02
UTC (rev 1133)
+++ trunk/main/central/src/docs/depot/library/index.xml 2006-02-24 17:03:38
UTC (rev 1134)
@@ -41,14 +41,14 @@

<table>
<tr>
- <td>properties</td>
+ <td>imports</td>
<td>0..1</td>
- <td>An set of global <a href="properties.html">property</a>
declarations.</td>
+ <td>An set of <a href="imports.html">imported</a> module
defintions.</td>
</tr>
<tr>
- <td>imports</td>
+ <td>properties</td>
<td>0..1</td>
- <td>An set of <a href="imports.html">imported</a> module
defintions.</td>
+ <td>An set of global <a href="properties.html">property</a>
declarations.</td>
</tr>
<tr>
<td>modules</td>
@@ -65,13 +65,10 @@

<source><![CDATA[
<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE library PUBLIC "-//DPML//DTD Library 1.0//EN"
"http://www.dpml.net/dtds/library_1_0.dtd"; >

<library>

- <properties>
- <property name="project.builder.uri"
value="link:plugin:dpml/tools/dpml-tools-ant"/>
- </properties>
-
<imports>
<import uri="link:module:junit"/>
<import uri="link:module:ant"/>
@@ -82,10 +79,6 @@

<module name="dpml" basedir=".">

- <types>
- <type id="module" alias="true"/>
- </types>
-
<properties>
<property name="project.publisher.name" value="Digital Product Meta
Library"/>
<property name="project.specification.vendor"
value="${project.publisher.name}"/>
@@ -95,16 +88,21 @@
<property name="project.resource.host"
value="http://repository.dpml.net"/>
<property name="project.api.host" value="http://api.dpml.net"/>
<property name="project.svn.host"
value="svn://svn.berlios.de/dpml/trunk/main"/>
+ <property name="project.javadoc.linksource" value="true"/>
</properties>

- <module base="transit"/>
- <module base="tools"/>
- <module base="metro"/>
- <module base="depot"/>
- <module base="util"/>
+ <types>
+ <type id="module" alias="true"/>
+ </types>

+ <module file="transit/module.xml"/>
+ <module file="metro/module.xml"/>
+ <module file="depot/module.xml"/>
+ <module file="util/module.xml"/>
+ <module file="planet/module.xml"/>
+
<project name="central" basedir="central"/>
-
+
</module>

</modules>

Modified: trunk/main/central/src/docs/depot/library/modules.xml
===================================================================
--- trunk/main/central/src/docs/depot/library/modules.xml 2006-02-24
15:30:02 UTC (rev 1133)
+++ trunk/main/central/src/docs/depot/library/modules.xml 2006-02-24
17:03:38 UTC (rev 1134)
@@ -58,22 +58,19 @@
<subsection name="XML Attributes on Module Includes">

<p>
- An alternative form of module defintion is supported whereby
- a <tt>base</tt> attribute reference a relative directory containing
- a file named <tt>module.xml</tt>. In this scenario the module
- <tt>basedir</tt> is implied by the base value and the module
<tt>name</tt>
- is resolved from the imported module.xml root
<tt>&lt;module&gt;</tt>
+ An alternative form of module definition is supported whereby
+ a <tt>file</tt> attribute reference a module fragment relative
filename.
+ The module basedir is resolved relative to the filename parent
directory
+ and the module <tt>name</tt> is resolved from the imported file
<tt>&lt;module&gt;</tt>
element. This second form of module addition is convinient when
you are
- dealing with a large number of projects and separation of modules
into
- individual module files in more convinient.
+ dealing with a large number of projects.
</p>

<table>
<tr>
- <td>base</td>
- <td>A path relative to the enclosing module or library basedir
- containing a file name <tt>module.xml</tt> which itself
contains
- a root <tt>&lt;module&gt;</tt> element.</td>
+ <td>file</td>
+ <td>A path relative to the imnporting module referencing an XML
file
+ containing a <tt>&lt;module&gt;</tt> root document
element.</td>
</tr>
</table>

@@ -88,12 +85,11 @@
<td>
The declaration of a &lt;types&gt; element within a module
associates
one or more an artifact types within the module's fully
qualified name.
- For example, it is possible to create an portable defintion of
a module
+ For example, it is possible to create an portable defintion of
top-level modules
using a specialized ant tasks. The ant task produced an
artifact of the
type 'module'. By declaring the type 'module' as a type
produced by the
module a build system can automate the production of the module
artifact.
- Alternatively, users of a published module can determin that a
resource
- named <tt>[module-path].module</tt> is available under a
repository.</td>
+ </td>
</tr>
<tr>
<td><a href="resources.html">resource</a></td>
@@ -168,6 +164,7 @@

<source><![CDATA[
<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE library PUBLIC "-//DPML//DTD Library 1.0//EN"
"http://www.dpml.net/dtds/library_1_0.dtd"; >

<library>

@@ -181,10 +178,6 @@

<module name="dpml" basedir=".">

- <types>
- <type id="module" alias="true"/>
- </types>
-
<properties>
<property name="project.publisher.name" value="Digital Product Meta
Library"/>
<property name="project.specification.vendor"
value="${project.publisher.name}"/>
@@ -194,15 +187,21 @@
<property name="project.resource.host"
value="http://repository.dpml.net"/>
<property name="project.api.host" value="http://api.dpml.net"/>
<property name="project.svn.host"
value="svn://svn.berlios.de/dpml/trunk/main"/>
+ <property name="project.javadoc.linksource" value="true"/>
</properties>

- <module base="transit"/>
- <module base="metro"/>
- <module base="depot"/>
- <module base="util"/>
+ <types>
+ <type id="module" alias="true"/>
+ </types>

+ <module file="transit/module.xml"/>
+ <module file="metro/module.xml"/>
+ <module file="depot/module.xml"/>
+ <module file="util/module.xml"/>
+ <module file="planet/module.xml"/>
+
<project name="central" basedir="central"/>
-
+
</module>

</modules>
@@ -213,29 +212,15 @@

<p>
The following XML is an example of an imported <tt>module.xml</tt>
file. The example
- used below is the DPML Depot Module. The module itself declares that
it produced the 'module'
- resource type (an portable module artifact) and a series of project
defintions.
+ used below is the DPML Depot Module.
</p>

<source><![CDATA[
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE module PUBLIC "-//DPML//DTD Library 1.0//EN"
"http://www.dpml.net/dtds/library_1_0.dtd"; >
+
<module name="depot">

- <types>
- <type id="module" alias="true"/>
- </types>
-
- <resource name="dpml-library-main" basedir="library/common">
- <types>
- <type id="jar"/>
- </types>
- <dependencies>
- <include ref="dpml/transit/dpml-transit-main"/>
- </dependencies>
- <dependencies scope="test">
- <include ref="ant/ant-junit"/>
- </dependencies>
- </resource>
-
<project name="dpml-library-console" basedir="library/console">
<types>
<type id="jar"/>
@@ -254,41 +239,22 @@
</dependencies>
</project>

- <resource name="dpml-tools-builder" basedir="tools/builder">
- <types>
- <type id="jar"/>
- <type id="plugin" alias="true">
- <property name="project.plugin.class"
- value="net.dpml.tools.impl.StandardBuilder"/>
- </type>
- </types>
- <dependencies>
- <include key="dpml-library-main"/>
- <include ref="dpml/transit/dpml-transit-tools"/>
- <include ref="ant/ant-junit" tag="system"/>
- <include ref="ant/ant" tag="system"/>
- <include ref="ant/ant-xslp" tag="system"/>
- <include ref="ant/ant-trax" tag="system"/>
- </dependencies>
- </resource>
-
<project name="dpml-depot-checkstyle" basedir="tools/checkstyle">
<types>
<type id="jar"/>
<type id="plugin" alias="true">
<property name="project.plugin.resource"
- value="net/dpml/builder/checkstyle/antlib.xml"/>
+ value="net/dpml/tools/checkstyle/antlib.xml"/>
<property name="project.plugin.urn"
value="dpml:checkstyle"/>
</type>
</types>
<dependencies>
<include ref="dpml/depot/dpml-tools-builder"/>
- <include urn="artifact:jar:checkstyle/checkstyle#3.5">
+ <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}"/>
</include>
- <include urn="artifact:jar:regexp/regexp#1.3" />
<include urn="artifact:jar:commons-logging/commons-logging#1.0.4" />
<include
urn="artifact:jar:commons-collections/commons-collections#3.1" />
<include
urn="artifact:jar:commons-beanutils/commons-beanutils-core#1.7.0" />
@@ -297,13 +263,29 @@
</dependencies>
</project>

- <project name="dpml-depot-console" basedir="core/console">
+ <project name="dpml-depot-convert" basedir="tools/convert">
<types>
<type id="jar"/>
+ <type id="plugin" alias="true">
+ <property name="project.plugin.resource"
+ value="net/dpml/tools/convert/antlib.xml"/>
+ <property name="project.plugin.urn"
+ value="dpml:convert"/>
+ </type>
</types>
+ <dependencies>
+ <include urn="artifact:jar:java2html/java2html#4.2"/>
+ <include ref="ant/ant-launcher"/>
+ </dependencies>
+ </project>
+
+ <project name="dpml-depot-console" basedir="core/console">
<properties>
<property name="project.jar.main.class" value="net.dpml.depot.Main"/>
</properties>
+ <types>
+ <type id="jar"/>
+ </types>
<dependencies>
<include ref="dpml/transit/dpml-transit-main"/>
</dependencies>
@@ -312,6 +294,54 @@
</dependencies>
</project>

+ <!--
+ <project name="dpml-depot-install" basedir="core/install">
+ <types>
+ <type id="jar"/>
+ <type id="plugin">
+ <property name="project.plugin.class"
+ value="net.dpml.depot.install.PackageInstaller"/>
+ </type>
+ </types>
+ <dependencies>
+ <include key="dpml-depot-console"/>
+ <include ref="dpml/transit/dpml-transit-main"/>
+ <include key="dpml-station-api"/>
+ <include key="dpml-station-server"/>
+ </dependencies>
+ </project>
+ -->
+
+ <resource name="dpml-library-main" basedir="library/common">
+ <types>
+ <type id="jar"/>
+ </types>
+ <dependencies>
+ <include ref="dpml/transit/dpml-transit-main"/>
+ </dependencies>
+ <dependencies scope="test">
+ <include ref="ant/ant-junit"/>
+ </dependencies>
+ </resource>
+
+ <resource name="dpml-tools-builder" basedir="tools/builder">
+ <types>
+ <type id="jar"/>
+ <type id="plugin" alias="true">
+ <property name="project.plugin.class"
+ value="net.dpml.tools.impl.StandardBuilder"/>
+ </type>
+ </types>
+ <dependencies>
+ <include key="dpml-library-main"/>
+ <include ref="dpml/transit/dpml-transit-tools"/>
+ <include ref="ant/ant-junit" tag="system"/>
+ <include ref="ant/ant" tag="system"/>
+ <include ref="ant/ant-xslp" tag="system"/>
+ <include ref="ant/ant-trax" tag="system"/>
+ </dependencies>
+ </resource>
+
</module>
]]></source>


Modified: trunk/main/central/src/docs/transit/config/hosts.xml
===================================================================
--- trunk/main/central/src/docs/transit/config/hosts.xml 2006-02-24
15:30:02 UTC (rev 1133)
+++ trunk/main/central/src/docs/transit/config/hosts.xml 2006-02-24
17:03:38 UTC (rev 1134)
@@ -14,10 +14,104 @@
<subsection name="Description">

<p>
+ The transit <tt>hosts</tt> element may contain the declaration
+ of <tt>0..n</tt> remote host definitions. Remote hosts will be
+ used to resolve requests for resource via the artifact protocol.
+ Hosts will be evaluated relative the their priority settings.
</p>

</subsection>

+ <subsection name="Attributes">
+
+ <table>
+ <tr>
+ <td>id</td>
+ <td>required</td>
+ <td>The resource host identifier.</td>
+ </tr>
+ <tr>
+ <td>priority</td>
+ <td>required</td>
+ <td>An integer establishing the priority of the host. hosts
+ will be evaluated in accending order (lower number means
+ higher priority).</td>
+ </tr>
+ <tr>
+ <td>url</td>
+ <td>required</td>
+ <td>The URL referencing the remote repository root.</td>
+ </tr>
+ <tr>
+ <td>layout</td>
+ <td>required</td>
+ <td>The name of the layout scheme employed by the remote host
+ (standard layout names include 'classic', 'modern' and
+ 'eclipse').</td>
+ </tr>
+ <tr>
+ <td>enabled</td>
+ <td>implied</td>
+ <td>The enabled status of the host defintion. The default
+ value is true.</td>
+ </tr>
+ <tr>
+ <td>trusted</td>
+ <td>implied</td>
+ <td>The trusted status of the host defintion. The default
+ value is false.</td>
+ </tr>
+ <tr>
+ <td>index</td>
+ <td>implied</td>
+ <td>Relative path to an remote index file containing group
+ names managed by the host. Default value is null.</td>
+ </tr>
+ <tr>
+ <td>scheme</td>
+ <td>implied</td>
+ <td>Authentication scheme. Default value is null.</td>
+ </tr>
+ <tr>
+ <td>prompt</td>
+ <td>implied</td>
+ <td>Authentication prompt. Default value is null.</td>
+ </tr>
+ </table>
+
+ </subsection>
+
+ <subsection name="Nested Elements">
+
+ <table>
+ <tr>
+ <td><tt>credentials</tt></td>
+ <td>Optional declaration of a username and password.</td>
+ </tr>
+ </table>
+
+ </subsection>
+
+ <subsection name="Example">
+
+<source><![CDATA[
+<transit cache="${dpml.data}/cache" layout="classic">
+
+ ...
+
+ <hosts>
+ <host id="dpml" priority="40" url="http://repository.dpml.net/classic";
layout="classic"/>
+ <host id="ibiblio" priority="70" url="http://www.ibiblio.org/maven";
layout="classic"/>
+ <host id="m2" priority="100" url="http://www.ibiblio.org/maven2";
layout="modern"/>
+ <host id="apache" priority="140"
url="http://www.apache.org/dist/java-repository"; layout="classic"/>
+ </hosts>
+
+</transit>
+
+]]></source>
+
+ </subsection>
+
</section>

</body>

Modified: trunk/main/central/src/docs/transit/config/index.xml
===================================================================
--- trunk/main/central/src/docs/transit/config/index.xml 2006-02-24
15:30:02 UTC (rev 1133)
+++ trunk/main/central/src/docs/transit/config/index.xml 2006-02-24
17:03:38 UTC (rev 1134)
@@ -69,7 +69,7 @@
The following example shows the default transit configuration.
</p>

-<pre><![CDATA[
+<source><![CDATA[
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE transit PUBLIC "-//DPML//DTD Transit Configuration Version
1.0//EN" "http://www.dpml.net/dtds/transit_1_0.dtd"; >

@@ -85,7 +85,7 @@
</hosts>

</transit>
-]]></pre>
+]]></source>

</subsection>


Modified: trunk/main/central/src/docs/transit/config/proxy.xml
===================================================================
--- trunk/main/central/src/docs/transit/config/proxy.xml 2006-02-24
15:30:02 UTC (rev 1133)
+++ trunk/main/central/src/docs/transit/config/proxy.xml 2006-02-24
17:03:38 UTC (rev 1134)
@@ -14,10 +14,62 @@
<subsection name="Description">

<p>
+ Optional proxy settings.
</p>

</subsection>

+ <subsection name="Attributes">
+
+ <table>
+ <tr>
+ <td>host</td>
+ <td>required</td>
+ <td>The proxy host.</td>
+ </tr>
+ </table>
+
+ </subsection>
+
+ <subsection name="Nested Elements">
+
+ <table>
+ <tr>
+ <td><tt>credentials</tt></td>
+ <td>Optional declaration of a proxy username and password.</td>
+ </tr>
+ <tr>
+ <td><tt>excludes</tt></td>
+ <td>Declaration of a set of proxy exclude paths.</td>
+ </tr>
+ </table>
+
+ </subsection>
+
+ <subsection name="Example">
+
+<source><![CDATA[
+<transit cache="${dpml.data}/cache" layout="classic">
+
+ <local path="file:${dpml.share}/local" layout="modern"/>
+
+ <proxy host="http://proxy.acme.org:8082";>
+ <credentials>
+ <username>batman</username>
+ <password>password</password>
+ </credentials>
+ <excludes>
+ <exclude>*.acme.org</exclude>
+ </excludes>
+ </proxy>
+
+ ...
+
+</transit>
+]]></source>
+
+ </subsection>
+
</section>

</body>

Modified:
trunk/main/depot/library/common/src/main/net/dpml/library/impl/DefaultModule.java
===================================================================
---
trunk/main/depot/library/common/src/main/net/dpml/library/impl/DefaultModule.java
2006-02-24 15:30:02 UTC (rev 1133)
+++
trunk/main/depot/library/common/src/main/net/dpml/library/impl/DefaultModule.java
2006-02-24 17:03:38 UTC (rev 1134)
@@ -243,6 +243,14 @@
"Cannot export from the virtual root.";
throw new UnsupportedOperationException( error );
}
+ if( null != getDefaultParent() )
+ {
+ String path = getResourcePath();
+ final String error =
+ "Illegal attempt to export a nested module."
+ + "\nModule: " + path;
+ throw new IllegalArgumentException( error );
+ }
return (ModuleDirective) exportResource( this );
}

@@ -250,8 +258,9 @@
* Return a directive suitable for publication as an external description.
* @param module the enclosing module
* @return the resource directive
+ * @exception IllegalArgumentException if the module is not a top-level
module
*/
- ResourceDirective exportResource( DefaultModule module )
+ ResourceDirective exportResource( DefaultModule module ) throws
IllegalArgumentException
{
DefaultResource[] resources = getDefaultResources();
ResourceDirective[] directives = new ResourceDirective[
resources.length ];

Modified:
trunk/main/depot/library/common/src/test/net/dpml/library/impl/DefaultResourceTestCase.java
===================================================================
---
trunk/main/depot/library/common/src/test/net/dpml/library/impl/DefaultResourceTestCase.java
2006-02-24 15:30:02 UTC (rev 1133)
+++
trunk/main/depot/library/common/src/test/net/dpml/library/impl/DefaultResourceTestCase.java
2006-02-24 17:03:38 UTC (rev 1134)
@@ -102,7 +102,6 @@
String path = "dpml";
Resource resource = getLibrary().getResource( path );
File basedir = resource.getBaseDir();
- System.out.println( "# BASEDIR: " + basedir );
assertNotNull( "basedir", basedir );
String testPath = System.getProperty( "project.test.dir" );
File test = new File( testPath );

Modified: trunk/main/depot/module.xml
===================================================================
--- trunk/main/depot/module.xml 2006-02-24 15:30:02 UTC (rev 1133)
+++ trunk/main/depot/module.xml 2006-02-24 17:03:38 UTC (rev 1134)
@@ -3,10 +3,6 @@

<module name="depot">

- <types>
- <type id="module" alias="true"/>
- </types>
-
<project name="dpml-library-console" basedir="library/console">
<types>
<type id="jar"/>

Modified: trunk/main/metro/module.xml
===================================================================
--- trunk/main/metro/module.xml 2006-02-24 15:30:02 UTC (rev 1133)
+++ trunk/main/metro/module.xml 2006-02-24 17:03:38 UTC (rev 1134)
@@ -3,10 +3,6 @@

<module name="metro">

- <types>
- <type id="module" alias="true"/>
- </types>
-
<project name="dpml-state-api" basedir="state/api">
<types>
<type id="jar"/>

Modified: trunk/main/planet/http/module.xml
===================================================================
--- trunk/main/planet/http/module.xml 2006-02-24 15:30:02 UTC (rev 1133)
+++ trunk/main/planet/http/module.xml 2006-02-24 17:03:38 UTC (rev 1134)
@@ -3,10 +3,6 @@

<module name="http" basedir=".">

- <types>
- <type id="module" alias="true"/>
- </types>
-
<project name="dpml-http-impl" basedir="impl">
<types>
<type id="jar"/>

Modified: trunk/main/planet/module.xml
===================================================================
--- trunk/main/planet/module.xml 2006-02-24 15:30:02 UTC (rev 1133)
+++ trunk/main/planet/module.xml 2006-02-24 17:03:38 UTC (rev 1134)
@@ -3,10 +3,6 @@

<module name="planet">

- <types>
- <type id="module" alias="true"/>
- </types>
-
<module file="http/module.xml"/>

</module>

Modified: trunk/main/transit/module.xml
===================================================================
--- trunk/main/transit/module.xml 2006-02-24 15:30:02 UTC (rev 1133)
+++ trunk/main/transit/module.xml 2006-02-24 17:03:38 UTC (rev 1134)
@@ -7,10 +7,6 @@
<property name="project.test.fork" value="true"/>
</properties>

- <types>
- <type id="module" alias="true"/>
- </types>
-
<project name="dpml-transit-console" basedir="console">
<types>
<type id="jar"/>

Modified: trunk/main/util/module.xml
===================================================================
--- trunk/main/util/module.xml 2006-02-24 15:30:02 UTC (rev 1133)
+++ trunk/main/util/module.xml 2006-02-24 17:03:38 UTC (rev 1134)
@@ -3,10 +3,6 @@

<module name="util" basedir=".">

- <types>
- <type id="module" alias="true"/>
- </types>
-
<dependencies scope="build">
<include key="transit"/>
</dependencies>




  • r1134 - in trunk/main: central/src/docs/depot/library central/src/docs/transit/config depot depot/library/common/src/main/net/dpml/library/impl depot/library/common/src/test/net/dpml/library/impl metro planet planet/http transit util, mcconnell at BerliOS, 02/24/2006

Archive powered by MHonArc 2.6.24.

Top of Page