You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Poppe, Troy" <Tr...@eia.doe.gov> on 2004/12/08 15:30:50 UTC

Need some help with maven.xml...

I'm trying to write a goal of my own in my project's maven.xml, and I'm a little
confused about the mechanism where by xmlns attributes get mapped into jelly
script or ant tasks (I'm not sure which it is).

I'm wanting to write an "update-project" goal that will update the current
working copy of my project from SVN.  (Since the SCM plugin doesn't currently
support SVN, I'm going this route.)

I've found some Ant tasks that do all the SVN work that I need to get done.  The
question is, how do I access those ant tasks?  Where should I put the jars that
are required for those tasks?  And do I need something written in Jelly to allow
me to do this?

Thanks.

Troy


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Need some help with maven.xml...

Posted by Eric Black <eb...@concord.org>.
Hi,

I was just writing my first maven.xml file yesterday, so I may not be 100%
correct in the following:

The xmlns seems to be the namespacing so tasks/methods/whatever are mapped
to the correct engine if there are more than one task with the same name,
so you just specify the namespaces with the engines:

<project 
  xmlns:j="jelly:core"
  xmlns:ant="jelly:ant">

then when you want to use the ant task, include the namespace prefix:

    <ant:manifest file="${maven.jar.manifest}">
      <j:set var="classPath" value="${maven.jar.classpath}"/>
      <j:if test="${!empty(classPath)}">
          <ant:attribute name="Class-Path" value="${maven.jar.classpath}"/>
      </j:if>
    </ant:manifest>


I'm not sure where the jars should go, but I think they should be in
ibiblio or you can set up your own remote repository and specify it in
your properties file:

maven.repo.remote=http://www.ibiblio.org/maven/,http://somewebserver/repository/

Maven will check the first repo, then the next one. There is also the
maven.repo.local that normally references your $HOME/.maven repository.
You could put it in there. The directory structure has to be in the form
of <repo>/repository/<groupId>/jars in either case. You could also specify
the maven.jar.overide  and the maven.jar.artifactId properties to
explicitly define the specific jar location.


Eric