ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: Upload of Ant to Maven repository [WAS: Re: Re: pgp key for signing files]
Date Thu, 15 Jun 2006 15:11:02 GMT
Antoine Levy-Lambert wrote:
> Hi,
> Steve had already sent an email to repository at apache dot org.
> Also,  Carlos Sanchez answered my JIRA issue, giving a pointer to :

see this too

> is the source of
> regarding everything that comes from apache, so we do not
> have to add uploads to other sites to ReleaseInstructions.
> What we should do is  figure out how we are going to generate and upload
> POM files (Maven project descriptors) to
> This possibly even
> in 2 flavors for Maven 1 and Maven 2 ???

Pom2 files. they can downconvert.

This is roughly how we do it on smartfrog. If a project has a .pom file 
it gets copied with property expansion. Otherwise we <echo> out a pom 
(this is ant1.6.5 compatible)

   <!-- ========================================================== -->
   <!-- init all the maven2 support   -->
   <!-- ========================================================== -->
    <target name="m2-init" 
    <!-- per project, CVS managed override -->
     <property file="" />
     <!-- central CVS managed libraries list -->
     <property file="${smartfrog.components.dir}/" />

     <!-- Maven2 stuff
       All components build into the org.smartfrog group, unless 
otherwise stated, but
       are their own artifacts.
     <property name="m2.repository" 
location="${user.home}/.m2/repository" />

     <!-- make the root path of an artifact -->
     <macrodef name="m2-makepath">
       <attribute name="property"/>
       <attribute name="groupIDpath"/>
       <attribute name="artifactID" default="@{groupIDpath}"/>
       <attribute name="version"/>
         <property name="@{property}"
location="${m2.repository}/@{groupIDpath}/@{artifactID}/@{version}" />

     <property name="m2.groupID" value="org.smartfrog" />
     <property name="m2.groupID.path" value="org/smartfrog" />
     <m2-makepath property="m2.subdir"
       version="${Version}" />
     <!-- pom setup -->
      <property name="target.pom"
      <property name="project.pom" location="project-template.pom"/>
      <available property="project.haspom" file="${project.pom}"/>

   <!-- ========================================================== -->
   <!-- POM creation/copy, depending on whether it exists or not   -->
   <!-- ========================================================== -->

    <target name="m2-copy-pom" depends="m2-init" if="project.haspom">
      <copy file="${project.pom}" tofile="${target.pom}" >
       <!-- we expand ant properties here.  -->

    <!-- inline creation of a very minimal (zero dependency) pom -->
    <target name="m2-make-pom" depends="m2-init" unless="project.haspom">
    <echo message="Creating Pom ${target.pom}" level="verbose"/>
    <echo file="${target.pom}"><![CDATA[<project>


    <target name="m2-pom" depends="m2-copy-pom,m2-make-pom" />

   <!-- ========================================================== -->
   <!-- this is not  normally for overriding -->
   <!-- install the jar, to the local maven2 repository -->
   <!-- ========================================================== -->
   <target name="m2-install" depends="checksum-target-jar,m2-pom"
       description="copy the JAR file local maven repository">

     <mkdir dir="${m2.subdir}"/>
     <copy file="${target.jar}" todir="${m2.subdir}"/>
     <!-- copy a pom -->
     <copy file="${target.pom}" todir="${m2.subdir}" failonerror="false"/>
     <copy file="${target.jar}.md5" todir="${m2.subdir}" 


by default, stub poms declare no dependencies  *at all*.

for ant we could have a dir src/etc/pom into which the different pom 
templates for each component goes
e.g ant-junit.pom has a dependency on junit of ${junit.version}, and on 

the build

1. copies the templates with property expansion enabled (like 
"m2-copy-pom" above)
2. creates .md5 checksums of the poms and their artifacts
3. signs this stuff by <exec gpg>
4. scps the files and signatures to a location, the default being the 
apache repository, but with any other location supported.
5. could also have a stub announcement email in the same dir, do the 
same property-expanding-copy and GPG sign trick to produce authenticated 
email for the announcement


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message