directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject The Gump descriptor for Eve.
Date Fri, 10 Dec 2004 11:37:41 GMT

Hi,
I saw somewhere that you asked me to look at the descriptor generated by Maven 
for Eve.
<maven> is missing the basedir= attribute, which should be the directory name, 
i.e. same as the nested= attribute in <home>

You also asked me how Magic could become completely automatic. It is basically 
doing what you have started with properties.
When declaring a dependency, it looks like this;

  <project basedir="http/impl">
    <info>
      <group>avalon/http</group>
      <name>avalon-http-impl</name>
      <version>1.0.0</version>
    </info>
    <dependencies>
      <include key="avalon-http-spi"/>
      <include key="avalon-http-util"/>
      <include key="avalon-composition-api" runtime="false"/>
      <include key="avalon-util-configuration"/>
      <include key="org.mortbay.jetty"/>
      <include key="org.mortbay.jaas"/>
      <include key="servletapi" runtime="true" build="false" />
      <include key="commons-logging" build="false" runtime="true"/>
      <include key="jsp-api" runtime="true" build="false" />
      <include key="jasper-runtime" runtime="true" build="false" />
      <include key="jasper-compiler" runtime="true" build="false" />
    </dependencies>
    <plugins>
      <include key="avalon-meta-tools"/>
    </plugins>
  </project>

For each dependency include, you need to reference either a <resource> or a 
<project> (which is a subclass of <resource> anyway).
I am showing how that looks like for Jasper.

<resource>
  <info>
    <group>tomcat</group>
    <name>jasper-compiler</name>
    <version>5.0.25</version>
    <type>jar</type>
  </info>
  <gump>
    <alias>jakarta-tomcat-5</alias>
    <id>jasper-compiler</id>
  </gump>
</resource>

The full http-impl project gets translated into Gump like this;
<project name="avalon-http-impl">
  <license name="central/system/license/LICENSE.TXT"/>
  <ant basedir="planet/facilities/http/impl">
    <!-- for magic -->
    <property name="build.sysclasspath" value="last"/> 
    <property name="magic.home" reference="home" project="magic"/>
    <property name="gump.signature" value="@@DATE@@"/>
    <!-- external references -->
    <depend property="gump.resource.org.mortbay.jetty" 
project="packaged-jetty">
      <noclasspath/>
    </depend>
    <depend property="gump.resource.mailapi" project="javamail" id="javamail">
      <noclasspath/>
    </depend>
    <depend property="gump.resource.log4j" project="logging-log4j-12">
      <noclasspath/>
    </depend>
    <depend property="gump.resource.servletapi" 
project="jakarta-servletapi-4">
      <noclasspath/>
    </depend>
    <depend property="gump.resource.geronimo-spec-jms" project="jms">
      <noclasspath/>
    </depend>
    <depend property="gump.resource.org.mortbay.jaas" 
project="packaged-jetty-jaas">
      <noclasspath/>
    </depend>
    <depend property="gump.resource.commons-logging" project="commons-logging" 
id="commons-logging">
      <noclasspath/>
    </depend>
    <depend property="gump.resource.jsp-api" 
project="jakarta-servletapi-5-jsp">
      <noclasspath/>
    </depend>
    <depend property="gump.resource.jasper-runtime" project="jakarta-tomcat-5" 
id="jasper-runtime">
      <noclasspath/>
    </depend>
    <depend property="gump.resource.jasper-compiler" 
project="jakarta-tomcat-5" id="jasper-compiler">
      <noclasspath/>
    </depend>
    <!-- end for -->
  </ant>
  <depend project="magic" runtime="true" inherit="runtime"/> 
  <!-- for gump -->
  <depend project="avalon-http-spi"><noclasspath/></depend>
  <depend project="avalon-http-api"><noclasspath/></depend>
  <depend project="avalon-composition-api"><noclasspath/></depend>
  <depend project="avalon-util-extension-api"><noclasspath/></depend>
  <depend project="avalon-repository-api"><noclasspath/></depend>
  <depend project="avalon-logging-api"><noclasspath/></depend>
  <depend project="avalon-meta-api"><noclasspath/></depend>
  <depend project="avalon-framework-api"><noclasspath/></depend>
  <depend project="avalon-logkit"><noclasspath/></depend>
  <depend project="avalon-framework-impl"><noclasspath/></depend>
  <depend project="avalon-http-util"><noclasspath/></depend>
  <depend project="avalon-util-configuration"><noclasspath/></depend>
  <depend project="avalon-meta-tools"><noclasspath/></depend>
  <!-- end for -->
  <home nested="planet/facilities/http/impl/target/deliverables"/>
  <jar name="jars/avalon-http-impl-@@DATE@@.jar"/>
  <nag to="dev@avalon.apache.org"
     from="Magic Integration &lt;dev@avalon.apache.org&gt;"/>
</project>



The property is set to point to the project (and optionally the ID within the 
project), and Magic knows about those properties, and will pick up the Jar 
from there instead of the local cache/central repo. 

<noclasspath/> tells Gump not to put the dependency in the system classpath.

The dependencies within <ant> comes from the directly declared dependencies in 
the Magic's model, whereas the other <depend> is the recursive ones, i.e. 
dependencies of dependencies aso, which are needed for the runtime and tests.

I hope this can help you on the way :o)


Cheers
Niclas
-- 
   +------//-------------------+
  / http://www.dpml.net       /
 / http://niclas.hedhman.org / 
+------//-------------------+


Mime
View raw message