Skip to Content.
Sympa Menu

notify-dpml - r1180 - in trunk/main: depot/library/src/main/net/dpml/library/impl 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: r1180 - in trunk/main: depot/library/src/main/net/dpml/library/impl planet/http
  • Date: Tue, 14 Mar 2006 19:40:10 +0100

Author: mcconnell
Date: 2006-03-14 19:39:59 +0100 (Tue, 14 Mar 2006)
New Revision: 1180

Modified:
trunk/main/depot/library/src/main/net/dpml/library/impl/LibraryBuilder.java
trunk/main/planet/http/module.xml
Log:
Update the library handling to allow the import of project definitions (was
restricted to module import). An example of a project import is included in
the planet/http/server package.

Modified:
trunk/main/depot/library/src/main/net/dpml/library/impl/LibraryBuilder.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/impl/LibraryBuilder.java
2006-03-14 18:10:35 UTC (rev 1179)
+++
trunk/main/depot/library/src/main/net/dpml/library/impl/LibraryBuilder.java
2006-03-14 18:39:59 UTC (rev 1180)
@@ -92,7 +92,7 @@

public static final String XML_HEADER =
"<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>";
-
+
private static final String LIBRARY_ELEMENT_NAME = "library";
private static final String IMPORTS_ELEMENT_NAME = "imports";
private static final String IMPORT_ELEMENT_NAME = "import";
@@ -374,7 +374,19 @@
final File parent = source.getParentFile();
final String basedir = path;
final Element root = getRootElement( source );
- return buildResourceDirectiveFromElement( parent, root, basedir
);
+ final String tag = root.getTagName();
+ if( "module".equals( tag ) )
+ {
+ return buildResourceDirectiveFromElement( parent, root,
basedir );
+ }
+ else if( "project".equals( tag ) )
+ {
+ throw new IllegalArgumentException( "project" );
+ }
+ else
+ {
+ throw new IllegalArgumentException( tag );
+ }
}
catch( Throwable e )
{
@@ -387,7 +399,7 @@
}
}

-
+
/**
* Build a module using an XML element.
* @param base the base directory

Modified: trunk/main/planet/http/module.xml
===================================================================
--- trunk/main/planet/http/module.xml 2006-03-14 18:10:35 UTC (rev 1179)
+++ trunk/main/planet/http/module.xml 2006-03-14 18:39:59 UTC (rev 1180)
@@ -1,9 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<module name="http" basedir="."
- xmlns="artifact:xsd:dpml/lang/dpml-module#1.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
- xmlns:metro="artifact:xsd:dpml/lang/dpml-component#1.0"
- >
+<module name="http" basedir="."
xmlns="artifact:xsd:dpml/lang/dpml-module#1.0">

<properties>
<property
name="project.xsd.builder.artifact:xsd:dpml/lang/dpml-component#1.0"




  • r1180 - in trunk/main: depot/library/src/main/net/dpml/library/impl planet/http, mcconnell at BerliOS, 03/14/2006

Archive powered by MHonArc 2.6.24.

Top of Page