You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2005/05/16 09:09:34 UTC

[jira] Updated: (MAVEN-1258) Can't run replacetoken ant tag inside maven

     [ http://jira.codehaus.org/browse/MAVEN-1258?page=all ]

Brett Porter updated MAVEN-1258:
--------------------------------

    Fix Version: 1.1-beta-1
    Environment: 
Maven 1.0-rc2
Windows 2000 SP4
J2SDK  1.4.2_04
Ant 1.5.3

  was:
Maven 1.0-rc2
Windows 2000 SP4
J2SDK  1.4.2_04
Ant 1.5.3

    Description: 
Maven can't run replacetoken tag... Maven, Jelly or Werkz seams to
delete the content inside replacetoken tag before ant is
executed by maven...
<replace file="teste.txt">
   <replacetoken>123</replacetoken>
   <replacevalue>12345</replacevalue>
</replace>
With this example, String "123" is deleted, and ant (executed by maven) can't run because "The token attribute must not be an empty string."

I've tested it in my build.xml and works:
        <target name="teste4">
        <replace file="teste.txt">
                <replacetoken>123</replacetoken>
                <replacevalue>12345</replacevalue>
        </replace>
        </target>
but with maven 1.0-rc2 (maven.xml), with the same code:
    <goal name="teste4">
        <replace file="teste.txt">
                <replacetoken>123</replacetoken>
                <replacevalue>12345</replacevalue>
        </replace>
    </goal>
...does not work.

NOTE: There is no workaround for this, because replacetoken/replacevalue are used for special characters like '<' and '>' (inside <!CDATA[]>), and the tag <replace file="teste.txt" token="<" value=">"> won't work, because such characters are not allowed in this construction...

  was:
Maven can't run replacetoken tag... Maven, Jelly or Werkz seams to
delete the content inside replacetoken tag before ant is
executed by maven...
<replace file="teste.txt">
   <replacetoken>123</replacetoken>
   <replacevalue>12345</replacevalue>
</replace>
With this example, String "123" is deleted, and ant (executed by maven) can't run because "The token attribute must not be an empty string."

I've tested it in my build.xml and works:
        <target name="teste4">
        <replace file="teste.txt">
                <replacetoken>123</replacetoken>
                <replacevalue>12345</replacevalue>
        </replace>
        </target>
but with maven 1.0-rc2 (maven.xml), with the same code:
    <goal name="teste4">
        <replace file="teste.txt">
                <replacetoken>123</replacetoken>
                <replacevalue>12345</replacevalue>
        </replace>
    </goal>
...does not work.

NOTE: There is no workaround for this, because replacetoken/replacevalue are used for special characters like '<' and '>' (inside <!CDATA[]>), and the tag <replace file="teste.txt" token="<" value=">"> won't work, because such characters are not allowed in this construction...


confirmed bug

> Can't run replacetoken ant tag inside maven
> -------------------------------------------
>
>          Key: MAVEN-1258
>          URL: http://jira.codehaus.org/browse/MAVEN-1258
>      Project: maven
>         Type: Bug
>     Versions: 1.0-rc2
>  Environment: Maven 1.0-rc2
> Windows 2000 SP4
> J2SDK  1.4.2_04
> Ant 1.5.3
>     Reporter: Cassio Matsuo Nosshe
>      Fix For: 1.1-beta-1

>
>
> Maven can't run replacetoken tag... Maven, Jelly or Werkz seams to
> delete the content inside replacetoken tag before ant is
> executed by maven...
> <replace file="teste.txt">
>    <replacetoken>123</replacetoken>
>    <replacevalue>12345</replacevalue>
> </replace>
> With this example, String "123" is deleted, and ant (executed by maven) can't run because "The token attribute must not be an empty string."
> I've tested it in my build.xml and works:
>         <target name="teste4">
>         <replace file="teste.txt">
>                 <replacetoken>123</replacetoken>
>                 <replacevalue>12345</replacevalue>
>         </replace>
>         </target>
> but with maven 1.0-rc2 (maven.xml), with the same code:
>     <goal name="teste4">
>         <replace file="teste.txt">
>                 <replacetoken>123</replacetoken>
>                 <replacevalue>12345</replacevalue>
>         </replace>
>     </goal>
> ...does not work.
> NOTE: There is no workaround for this, because replacetoken/replacevalue are used for special characters like '<' and '>' (inside <!CDATA[]>), and the tag <replace file="teste.txt" token="<" value=">"> won't work, because such characters are not allowed in this construction...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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