Skip to Content.
Sympa Menu

notify-dpml - svn commit: r1746 - in development/main/magic: . core/src/main/net/dpml/magic/model

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell AT netcompartner.com
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r1746 - in development/main/magic: . core/src/main/net/dpml/magic/model
  • Date: Sun, 06 Feb 2005 14:29:47 +0100

Author: mcconnell
Date: Sun Feb 6 14:29:46 2005
New Revision: 1746

Modified:
development/main/magic/core/src/main/net/dpml/magic/model/Resource.java
development/main/magic/module.xml
Log:
Update the magic build procedure to create a distribution (also updated
Resource to handle case of module resource reference filtering).

Modified:
development/main/magic/core/src/main/net/dpml/magic/model/Resource.java
==============================================================================
--- development/main/magic/core/src/main/net/dpml/magic/model/Resource.java
(original)
+++ development/main/magic/core/src/main/net/dpml/magic/model/Resource.java
Sun Feb 6 14:29:46 2005
@@ -286,6 +286,17 @@
return path;
}

+ /**
+ * Used to filter the resources assigned to a path based on a module
+ * restriction policy. If the supplied module argument is false then
+ * a resource is by default a path candidate. If the module argument
+ * is true then the function evaluates if the module of this resource
+ * and the module of the supplied resource are equal.
+ *
+ * @param resource the resource to evaluate for path inclusion
+ * @param module a boolean value declaring if module filtering shall be
+ * performed
+ */
private boolean filterModule( Resource resource, boolean module )
{
if( !module )
@@ -294,7 +305,14 @@
}
else
{
- return getModule().equals( resource.getModule() );
+ try
+ {
+ return getModule().equals( resource.getModule() );
+ }
+ catch( BuildException be )
+ {
+ return false;
+ }
}
}


Modified: development/main/magic/module.xml
==============================================================================
--- development/main/magic/module.xml (original)
+++ development/main/magic/module.xml Sun Feb 6 14:29:46 2005
@@ -24,7 +24,9 @@

<transit:import uri="artifact:template:dpml/magic/standard"/>

- <target name="build" depends="standard.build">
+ <target name="build" depends="module.build,standard.build"/>
+
+ <target name="module.build" depends="standard.build">
<x:module index="index.xml">
<x:header>
<packages>
@@ -37,7 +39,24 @@
</x:module>
</target>

- <target name="install" depends="standard.install,junit-report,checkstyle">
+ <target name="install"
depends="standard.install,junit-report,checkstyle,javadoc">
+ <antcall target="dist"/>
+ </target>
+
+ <target name="dist" depends="init">
+ <property name="bundle" value="${basedir}/target/bundle"/>
+ <property name="anchor" value="${bundle}/${project.version}"/>
+ <x:path id="module.path" type="*" mode="RUNTIME" module="true"/>
+ <x:replicate refid="module.path" toDir="${anchor}" />
+ <copy todir="${anchor}/${project.group}">
+ <fileset dir="target/deliverables"/>
+ </copy>
+ <x:dist compression="gzip">
+ <fileset dir="${bundle}"/>
+ </x:dist>
+ </target>
+
+ <target name="javadoc" depends="package">
<x:javadoc>
<link href="http://java.sun.com/j2se/1.4/docs/api"/>
<link href="http://www.dpml.net/api/ant/1.6.2"/>



  • svn commit: r1746 - in development/main/magic: . core/src/main/net/dpml/magic/model, mcconnell, 02/06/2005

Archive powered by MHonArc 2.6.24.

Top of Page