You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Scott Lamb <sl...@slamb.org> on 2005/08/19 21:00:00 UTC
[maven-1.1-beta-1] native2ascii
I'm trying to get native2ascii to work in maven-1.1-beta-1. It worked
fine in maven 1.0.2.
I was using it through a maven.xml snippet like this:
<project default="tw:dist"
xmlns:j="jelly:core"
xmlns:ant="jelly:ant">
...
<postGoal name="java:jar-resources">
...
<ant:native2ascii encoding="UTF8" includes="*.utf8"
ext=".properties"
src="foo" dest="bar"/>
...
</postGoal>
...
</project>
which doesn't work. It actually prints out the native2ascii element
during the build:
Running post goal: java:jar-resources
<native2ascii encoding="UTF8" includes="**/*.utf8" ext=".properties"
src="/Users/slamb/2wire/tw2/src/mainline/cms-web/target/classes/com/
twowire/cms" dest="/Users/slamb/2wire/tw2/src/mainline/cms-web/target/
classes/com/twowire/cms"></native2ascii>
and does nothing. My property files aren't generated.
I saw that maven 1.1-beta-1 has upgraded to ant 1.6.5. So to
diagnose, I made a build.xml that runs the native2ascii ant task.
When I use a separate installation of ant from the commandline, it
works. When I try it from within maven:
<postGoal name="java:jar-resources">
...
<ant:ant dir="${basedir}" antfile="build.xml"/>
...
</postGoal>
it fails with this error:
/Users/slamb/.../build.xml:9: Could not create task or type of type:
native2ascii.
It looks like this is defined in ant-nodeps.jar, which isn't included
in maven 1.1-beta-1. So my questions are:
- why isn't ant-nodeps.jar included?
- how can I make this work anyway? (for the time being, the same
buildfile has to work with maven 1.0.2 also.) I imagine there's an
easy classpath trick, since this jar is in the ibiblio maven
repository. The trick eludes me, though.
- why doesn't maven give an error message when it encounters an
unknown ant task?
Regards,
Scott
--
Scott Lamb <http://www.slamb.org/>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [maven-1.1-beta-1] native2ascii
Posted by Scott Lamb <sl...@slamb.org>.
On 21 Aug 2005, at 01:44, Arnaud HERITIER wrote:
> Hi scott,
>
> It is documented here : http://maven.apache.org/reference/backwards-
> compatibility.html
> You did the good thing.
>
> Arnaud
Cool, thanks. What about the ant version? I imagine it won't be at
1.6.5 forever. Is it important that I use the same ant version as the
rest of maven? Is there a system property somewhere that indicates
this version?
Regards,
Scott
--
Scott Lamb <http://www.slamb.org/>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: [maven-1.1-beta-1] native2ascii
Posted by Arnaud HERITIER <ah...@gmail.com>.
Hi scott,
It is documented here : http://maven.apache.org/reference/backwards-compatibility.html
You did the good thing.
Arnaud
> -----Message d'origine-----
> De : Scott Lamb [mailto:slamb@slamb.org]
> Envoyé : samedi 20 août 2005 02:54
> À : Maven Users List
> Objet : Re: [maven-1.1-beta-1] native2ascii
>
> On Aug 19, 2005, at 12:00 PM, Scott Lamb wrote:
>
> > - how can I make this work anyway? (for the time being, the same
> > buildfile has to work with maven 1.0.2 also.) I imagine there's an
> > easy classpath trick, since this jar is in the ibiblio maven
> > repository. The trick eludes me, though.
>
> I ended up adding ant-nodeps-0.6.5.jar to the dependency list
> and adding this before I call native2ascii:
>
> <j:set var="version" value="${maven.application.version}"/>
> <j:if test="${version.compareTo('1.1-beta-1') eq 0}">
> <ant:taskdef name="native2ascii"
>
> classname="org.apache.tools.ant.taskdefs.optional.Native2Ascii"
> classpathref="maven.dependency.classpath"/>
> </j:if>
>
> It seems to work on both versions.
>
> --
> Scott Lamb <http://www.slamb.org/>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [maven-1.1-beta-1] native2ascii
Posted by Scott Lamb <sl...@slamb.org>.
On Aug 19, 2005, at 12:00 PM, Scott Lamb wrote:
> - how can I make this work anyway? (for the time being, the same
> buildfile has to work with maven 1.0.2 also.) I imagine there's an
> easy classpath trick, since this jar is in the ibiblio maven
> repository. The trick eludes me, though.
I ended up adding ant-nodeps-0.6.5.jar to the dependency list and
adding this before I call native2ascii:
<j:set var="version" value="${maven.application.version}"/>
<j:if test="${version.compareTo('1.1-beta-1') eq 0}">
<ant:taskdef name="native2ascii"
classname="org.apache.tools.ant.taskdefs.optional.Native2Ascii"
classpathref="maven.dependency.classpath"/>
</j:if>
It seems to work on both versions.
--
Scott Lamb <http://www.slamb.org/>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org