Skip to Content.
Sympa Menu

notify-dpml - r1414 - in trunk/main: . depot/library/etc/test depot/library/etc/test/samples depot/library/src/main/net/dpml/library/info depot/tools/builder/etc/prefs/xmls lang/module/etc planet planet/http

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: r1414 - in trunk/main: . depot/library/etc/test depot/library/etc/test/samples depot/library/src/main/net/dpml/library/info depot/tools/builder/etc/prefs/xmls lang/module/etc planet planet/http
  • Date: Thu, 27 Apr 2006 19:59:23 +0200

Author: mcconnell
Date: 2006-04-27 19:59:05 +0200 (Thu, 27 Apr 2006)
New Revision: 1414

Modified:
trunk/main/depot/library/etc/test/library.xml
trunk/main/depot/library/etc/test/samples/example-6.xml
trunk/main/depot/library/etc/test/samples/example-7.xml
trunk/main/depot/library/src/main/net/dpml/library/info/LibraryDecoder.java
trunk/main/depot/tools/builder/etc/prefs/xmls/configuration.xml
trunk/main/lang/module/etc/module.xsd
trunk/main/library.xml
trunk/main/planet/http/module.xml
trunk/main/planet/module.xml
Log:
update module definition to make distinction between an import of an external
module as opposed to the inclusion of a resource, project or module from a
local file

Modified: trunk/main/depot/library/etc/test/library.xml
===================================================================
--- trunk/main/depot/library/etc/test/library.xml 2006-04-26 18:47:07
UTC (rev 1413)
+++ trunk/main/depot/library/etc/test/library.xml 2006-04-27 17:59:05
UTC (rev 1414)
@@ -8,12 +8,12 @@
</properties>

<modules>
- <import file="junit/module.xml"/>
- <import file="commons-cli/module.xml"/>
- <import file="xstream/module.xml"/>
- <import file="jgoodies/module.xml"/>
- <import file="dpml/module.xml"/>
- <import file="ant/module.xml"/>
+ <module file="junit/module.xml"/>
+ <module file="commons-cli/module.xml"/>
+ <module file="xstream/module.xml"/>
+ <module file="jgoodies/module.xml"/>
+ <module file="dpml/module.xml"/>
+ <module file="ant/module.xml"/>
</modules>

</library>

Modified: trunk/main/depot/library/etc/test/samples/example-6.xml
===================================================================
--- trunk/main/depot/library/etc/test/samples/example-6.xml 2006-04-26
18:47:07 UTC (rev 1413)
+++ trunk/main/depot/library/etc/test/samples/example-6.xml 2006-04-27
17:59:05 UTC (rev 1414)
@@ -7,7 +7,7 @@
</imports>

<modules>
- <import file="widget.xml"/>
+ <module file="widget.xml"/>
</modules>

</library>

Modified: trunk/main/depot/library/etc/test/samples/example-7.xml
===================================================================
--- trunk/main/depot/library/etc/test/samples/example-7.xml 2006-04-26
18:47:07 UTC (rev 1413)
+++ trunk/main/depot/library/etc/test/samples/example-7.xml 2006-04-27
17:59:05 UTC (rev 1414)
@@ -8,7 +8,7 @@

<modules>
<module name="acme">
- <import file="widget.xml"/>
+ <module file="widget.xml"/>
</module>
</modules>


Modified:
trunk/main/depot/library/src/main/net/dpml/library/info/LibraryDecoder.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/info/LibraryDecoder.java
2006-04-26 18:47:07 UTC (rev 1413)
+++
trunk/main/depot/library/src/main/net/dpml/library/info/LibraryDecoder.java
2006-04-27 17:59:05 UTC (rev 1414)
@@ -215,7 +215,7 @@
* @return the resource directive
* @exception IOException if an IO exception occurs
*/
- public ResourceDirective buildResourceDirective( File source, String
path ) throws IOException
+ public ResourceDirective buildResourceDirectiveFromFile( File source,
String path ) throws IOException
{
if( null == source )
{
@@ -276,11 +276,13 @@
File base, Element element, String offset ) throws Exception
{
final String elementName = element.getTagName();
- if( "import".equals( elementName ) )
+ final String path = ElementHelper.getAttribute( element, "file" );
+ //if( "import".equals( elementName ) )
+ if( null != path )
{
try
{
- String path = ElementHelper.getAttribute( element, "file" );
+ //String path = ElementHelper.getAttribute( element, "file"
);
File file = new File( base, path );
File dir = file.getParentFile();
String spec = getRelativePath( base, dir );
@@ -288,14 +290,16 @@
if( !source.exists() )
{
final String error =
- "Cannot include module ["
+ "Cannot include "
+ + elementName
+ + " from the file ["
+ source
+ "] because the file does not exist.";
throw new DecodingException( element, error );
}
else
{
- return buildResourceDirective( source, spec );
+ return buildResourceDirectiveFromFile( source, spec );
}
}
catch( DecodingException e )
@@ -309,6 +313,11 @@
throw new DecodingException( element, error, e );
}
}
+ else
+ {
+ return buildResourceDirective( base, element, offset );
+ }
+ /*
else if( RESOURCE_ELEMENT_NAME.equals( elementName ) )
{
return buildResourceDirective( base, element, offset );
@@ -329,6 +338,7 @@
+ "] is not a module.";
throw new DecodingException( element, error );
}
+ */
}

private String getRelativePath( File base, File dir ) throws IOException
@@ -602,30 +612,15 @@
{
Element child = children[i];
final String t = child.getTagName();
- if( MODULE_ELEMENT_NAME.equals( t ) )
+
+ if( RESOURCE_ELEMENT_NAME.equals( t )
+ || PROJECT_ELEMENT_NAME.equals( t )
+ || MODULE_ELEMENT_NAME.equals( t ) )
{
ResourceDirective directive =
buildResourceDirectiveFromElement( base, child,
null );
list.add( directive );
}
- else if( IMPORT_ELEMENT_NAME.equals( t ) )
- {
- ResourceDirective directive =
- buildResourceDirectiveFromElement( base, child,
null );
- list.add( directive );
- }
- else if( PROJECT_ELEMENT_NAME.equals( t ) )
- {
- ResourceDirective directive =
- buildResourceDirective( base, child );
- list.add( directive );
- }
- else if( RESOURCE_ELEMENT_NAME.equals( t ) )
- {
- ResourceDirective directive =
- buildResourceDirective( base, child );
- list.add( directive );
- }
}

ResourceDirective[] resources =

Modified: trunk/main/depot/tools/builder/etc/prefs/xmls/configuration.xml
===================================================================
--- trunk/main/depot/tools/builder/etc/prefs/xmls/configuration.xml
2006-04-26 18:47:07 UTC (rev 1413)
+++ trunk/main/depot/tools/builder/etc/prefs/xmls/configuration.xml
2006-04-27 17:59:05 UTC (rev 1414)
@@ -9,28 +9,40 @@

<!-- products -->

- <dir id="etc.main" path="${project.etc.main.dir}"/>
- <dir id="src.main" path="${project.src.main.dir}"/>
+ <dir name="src.main" path="${project.src.main.dir}">
+ <description title="Project main source directory.">
+ Project source for primary content to be added to the
+ normalized ${target.build.main.dir} directory.
+ </description>
+ </dir>

- <dir id="target.dir" path="${project.basedir}/target"/>
- <dir id="target.test.dir" path="${target.dir}/test"/>
- <dir id="target.reports.dir" path="${target.dir}/reports"/>
- <dir id="target.reports.test.dir" path="${target.reports.dir}/test"/>
+ <dir name="etc.main" path="${project.etc.main.dir}">
+ <description title="Project supplimentary main content directory.">
+ Project source for supplimentary content to be added to the
+ normalized ${target.build.main.dir} directory.
+ </description>
+ </dir>

- <dir id="target.build.dir" path="${target.dir}/build"/>
- <dir id="target.build.main.dir" path="${target.build.dir}/main"/>
- <dir id="target.build.test.dir" path="${target.build.dir}/test"/>

- <dir id="target.classes.dir" path="${target.dir}/classes"/>
- <dir id="target.classes.main.dir" path="${target.classes.dir}/main"/>
- <dir id="target.classes.test.dir" path="${target.classes.dir}/test"/>
+ <dir name="target.dir" path="${project.basedir}/target"/>
+ <dir name="target.test.dir" path="${target.dir}/test"/>
+ <dir name="target.reports.dir" path="${target.dir}/reports"/>
+ <dir name="target.reports.test.dir" path="${target.reports.dir}/test"/>

+ <dir name="target.build.dir" path="${target.dir}/build"/>
+ <dir name="target.build.main.dir" path="${target.build.dir}/main"/>
+ <dir name="target.build.test.dir" path="${target.build.dir}/test"/>
+
+ <dir name="target.classes.dir" path="${target.dir}/classes"/>
+ <dir name="target.classes.main.dir" path="${target.classes.dir}/main"/>
+ <dir name="target.classes.test.dir" path="${target.classes.dir}/test"/>
+
<file id="target.deliverables.jar" type="jar"/>
<file id="target.deliverables.part" type="part"/>

<!-- processes -->

- <process id="prepare-main"
class="net.dpml.tools.process.PrepareMainProcess">
+ <process name="prepare-main"
class="net.dpml.tools.process.PrepareMainProcess">
<consumes>
<input id="etc.main" policy="optional"/>
<input id="src.main" policy="optional"/>
@@ -39,8 +51,8 @@
<output id="target.build.main.dir"/>
</produces>
</process>
-
- <process id="prepare-test"
class="net.dpml.tools.process.PrepareTestProcess">
+
+ <process name="prepare-test"
class="net.dpml.tools.process.PrepareTestProcess">
<consumes policy="conditional">
<input id="etc.test" policy="optional"/>
<input id="src.test" policy="optional"/>
@@ -50,8 +62,8 @@
<output id="target.test.dir"/>
</produces>
</process>
-
- <process id="compile-main"
class="net.dpml.tools.process.CompileMainProcess">
+
+ <process name="compile-main"
class="net.dpml.tools.process.CompileMainProcess">
<consumes>
<input id="target.build.main.dir" policy="conditional"/>
</consumes>
@@ -60,7 +72,7 @@
</produces>
</process>

- <process id="compile-test"
class="net.dpml.tools.process.CompileTestProcess">
+ <process name="compile-test"
class="net.dpml.tools.process.CompileTestProcess">
<consumes>
<input id="target.build.test.dir" policy="conditional"/>
</consumes>
@@ -69,7 +81,7 @@
</produces>
</process>

- <process id="junit" class="net.dpml.tools.process.JunitProcess">
+ <process name="junit" class="net.dpml.tools.process.JunitProcess">
<consumes>
<input id="target.test.dir" policy="optional"/>
<input id="target.classes.test.dir" policy="conditional"/>
@@ -79,7 +91,7 @@
</produces>
</process>

- <process id="jar" class="net.dpml.tools.process.JarProcess">
+ <process name="jar" class="net.dpml.tools.process.JarProcess">
<consumes>
<input id="target.reports.test.dir"/>
<input id="target.build.main.dir" policy="conditional"/>
@@ -89,15 +101,15 @@
</produces>
</process>

- <process id="rmic" class="net.dpml.tools.process.RMICProcess">
+ <process name="rmic" class="net.dpml.tools.process.RMICProcess">
<consumes>
<input id="target.classes.main.dir" policy="conditional"/>
</consumes>
</process>

- <process id="part" class="net.dpml.tools.process.PartProcess">
+ <process name="part" class="net.dpml.tools.process.PartProcess">
<consumes>
- <input id="target.classes.main.dir" policy="optional"/>
+ <dir id="target.classes.main.dir" policy="optional"/>
</consumes>
<produces>
<output id="target.deliverables.part">

Modified: trunk/main/lang/module/etc/module.xsd
===================================================================
--- trunk/main/lang/module/etc/module.xsd 2006-04-26 18:47:07 UTC (rev
1413)
+++ trunk/main/lang/module/etc/module.xsd 2006-04-27 17:59:05 UTC (rev
1414)
@@ -68,9 +68,10 @@
<element name="types" type="this:TypesType" minOccurs="0"
maxOccurs="1"/>
<element name="dependencies" type="this:DependenciesType"
minOccurs="0" maxOccurs="1"/>
</sequence>
- <attribute name="name" type="string" use="required"/>
+ <attribute name="name" type="string"/>
<attribute name="version" type="string"/>
<attribute name="basedir" type="string"/>
+ <attribute name="file" type="string"/>
</complexType>

<complexType name="ProjectType">

Modified: trunk/main/library.xml
===================================================================
--- trunk/main/library.xml 2006-04-26 18:47:07 UTC (rev 1413)
+++ trunk/main/library.xml 2006-04-27 17:59:05 UTC (rev 1414)
@@ -35,13 +35,13 @@
</filters>
</data>

- <import file="lang/module.xml"/>
- <import file="transit/module.xml"/>
- <import file="util/module.xml"/>
- <import file="depot/module.xml"/>
- <import file="metro/module.xml"/>
- <import file="station/module.xml"/>
- <import file="planet/module.xml"/>
+ <module file="lang/module.xml"/>
+ <module file="transit/module.xml"/>
+ <module file="util/module.xml"/>
+ <module file="depot/module.xml"/>
+ <module file="metro/module.xml"/>
+ <module file="station/module.xml"/>
+ <module file="planet/module.xml"/>

<project name="central" basedir="central">
<data>

Modified: trunk/main/planet/http/module.xml
===================================================================
--- trunk/main/planet/http/module.xml 2006-04-26 18:47:07 UTC (rev 1413)
+++ trunk/main/planet/http/module.xml 2006-04-27 17:59:05 UTC (rev 1414)
@@ -48,7 +48,7 @@
</dependencies>
</project>

- <import file="server/project.xml"/>
+ <project file="server/project.xml"/>

<project name="dpml-http-test" basedir="test">
<properties>

Modified: trunk/main/planet/module.xml
===================================================================
--- trunk/main/planet/module.xml 2006-04-26 18:47:07 UTC (rev 1413)
+++ trunk/main/planet/module.xml 2006-04-27 17:59:05 UTC (rev 1414)
@@ -3,6 +3,6 @@
xmlns="artifact:xsd:dpml/lang/dpml-module#1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; >

- <import file="http/module.xml"/>
+ <module file="http/module.xml"/>

</module>




  • r1414 - in trunk/main: . depot/library/etc/test depot/library/etc/test/samples depot/library/src/main/net/dpml/library/info depot/tools/builder/etc/prefs/xmls lang/module/etc planet planet/http, mcconnell at BerliOS, 04/27/2006

Archive powered by MHonArc 2.6.24.

Top of Page