You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andrew Hughes (JIRA)" <ji...@codehaus.org> on 2008/02/12 05:21:28 UTC

[jira] Created: (MSITE-294) Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files

Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files
-----------------------------------------------------------------------------------------

                 Key: MSITE-294
                 URL: http://jira.codehaus.org/browse/MSITE-294
             Project: Maven 2.x Site Plugin
          Issue Type: Bug
    Affects Versions: 2.0-beta-6
         Environment: *.apt.vm files, and +----- escaped section.
            Reporter: Andrew Hughes
            Priority: Critical


You can reproduce this the following way.....

./src/site/index.apt.vm (start)
--------------------------------------------------

This will appear without the backslashes $\{project.version\} and that's excellent. But you can't get this output in the escaped apt text section below.

+---
However this apt escaped section still shows the backslashes inside this section $\{project.version\} and there is no known way the text can be shown as above.
To make matters worse, when you put this in without the backslashes, you get the properties value (like a filter). See: ${project.version} not the desired string as above
+---

-------------------------------------------------
./src/site/index.apt.vm (start)



-- 
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

        

[jira] Issue Comment Edited: (MSITE-294) Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=140752#action_140752 ] 

lukas edited comment on MSITE-294 at 7/5/08 12:52 AM:
--------------------------------------------------------------

The following works:

{noformat}
+----
  This project version is ${project.version} and comes from the \${project.version} property.
+----
{noformat}

I don't think that this is a bug even if it's not very intuitive. If you use slashes inside apt verbatim text they will render as-is (that's what verbatim text is supposed to do), so all you need is prevent velocity from filtering the property, which you do by escaping the $.

      was (Author: lukas):
    The following works:

{source}
+----
  This project version is ${project.version} and comes from the \${project.version} property.
+----
{source}

I don't think that this is a bug even if it's not very intuitive. If you use slashes inside apt verbatim text they will render as-is (that's what verbatim text is supposed to do), so all you need is prevent velocity from filtering the property, which you do by escaping the $.
  
> Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files
> -----------------------------------------------------------------------------------------
>
>                 Key: MSITE-294
>                 URL: http://jira.codehaus.org/browse/MSITE-294
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-6
>         Environment: *.apt.vm files, and +----- escaped section.
>            Reporter: Andrew Hughes
>            Priority: Critical
>
> You can reproduce this the following way.....
> ./src/site/index.apt.vm (start)
> --------------------------------------------------
> This will appear without the backslashes {noformat}$\{project.version\}{noformat} and that's excellent. But you can't get this output in the escaped apt text section below.
> {noformat}
> +---
> However this apt escaped section still shows the backslashes inside this section $\{project.version\} and there is no known way the text can be shown as above.
> To make matters worse, when you put this in without the backslashes, you get the properties value (like a filter). See: ${project.version} not the desired string as above
> +---
> {noformat}
> -------------------------------------------------
> ./src/site/index.apt.vm (start)

-- 
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

        

[jira] Commented: (MSITE-294) Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files

Posted by "Andrew Hughes (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_123459 ] 

Andrew Hughes commented on MSITE-294:
-------------------------------------

Hi Dennis,

Thanks for the response, what you are saying is correct... if I put this text in I would expect the value to be replaced....

INPUT: index.apt.vm
{noformat}
This project version is ${project.version}
{noformat}
OUTPUT: index.html  [which is correct and I am happy with :)
{noformat}
This project version is 1.0.0-SNAPSHOT
{noformat}


But let's say I really wanted the output to say....

INPUT: index.apt.vm
{noformat}
This project version is ${project.version} and comes from the $\{project.version\} property.
{noformat}
OUTPUT: index.html  - which is correct and I am happy with :)]
{noformat}
This project version is 1.0.0-SNAPSHOT and comes from the ${project.version} property.
{noformat}

However........ if I want to do the above inside an apt escape box it becomes a bit weird... this is the bug...
INPUT: index.apt.vm
{noformat}
+----
This project version is ${project.version} and comes from the $\{project.version\} property.
+----
{noformat}
OUTPUT: index.html  - which is not what I want :(
{noformat}
This project version is 1.0.0-SNAPSHOT and comes from the $\{project.version\} property.
{noformat}


My real use case, is that I have a plugin I am trying to document. My documentation is an XML HowTo snippet (hence the +------ apt escape section). The XML HowTo is driven by a mixture of properties to be replaced from values in the project, and "you must define a property called xxx.xxx within your profile to complete the plugin usage configuration HowTo. My description problably sucks so here's my actual input and output I want, and what I get....

INPUT: index.apt.vm
{noformat}
How To Use The ${project.groupId}:${project.artifactId}-${project.version} Plugin

Add the following to your pom.xml's plugin section

+-------------------------------------------------------------------------------------------------+
<plugins>
        .....
	<plugin>
	    <groupId>${project.groupId}</groupId>
	    <artifactId>${project.artifactId}</artifactId>
	    <version>${project.version}</version>
	    <configuration>
	        <host>localhost</host>
	        <port>4848</port>
	        <user>admin</user>
	        <password>adm1nadm1n</password>
	        <target>$\{basedir\}/target/$\{project.artifactId\}-$\{project.version\}.$\{project.packaging\}</target>
	        <appname>$\{project.artifactId\}-$\{project.version\}</appname>
	    </configuration>
	</plugin>
	.....
</plugins>
+-------------------------------------------------------------------------------------------------+
{noformat}
OUTPUT: index.html (this is what I want)

{noformat}
How To Use The mycompany-maven:glassfish-deployer-1.0.0-SNAPSHOT Plugin

Add the following to your pom.xml's plugin section

<plugins>
        .....
	<plugin>
	    <groupId>mycompany-maven</groupId>
	    <artifactId>glassfish-deployer</artifactId>
	    <version>1.0.0-SNAPSHOT</version>
	    <configuration>
	        <host>localhost</host>
	        <port>4848</port>
	        <user>admin</user>
	        <password>adm1nadm1n</password>
	        <target>${basedir}/target/${project.artifactId}-${project.version}.${project.packaging}</target>
	        <appname>${project.artifactId}-${project.version}</appname>
	    </configuration>
	</plugin>
	.....
</plugins>

{noformat}
OUTPUT: index.html (this is what I get) NOTE the backslashes are still there....
{noformat}
How To Use The mycompany-maven:glassfish-deployer-1.0.0-SNAPSHOT Plugin

Add the following to your pom.xml's plugin section

<plugins>
        .....
	<plugin>
	    <groupId>mycompany-maven</groupId>
	    <artifactId>glassfish-deployer</artifactId>
	    <version>1.0.0-SNAPSHOT</version>
	    <configuration>
	        <host>localhost</host>
	        <port>4848</port>
	        <user>admin</user>
	        <password>adm1nadm1n</password>
	        <target>$\{basedir\}/target/$\{project.artifactId\}-$\{project.version\}.$\{project.packaging\}</target>
	        <appname>$\{project.artifactId\}-$\{project.version\}</appname>
	    </configuration>
	</plugin>
	.....
</plugins>
{noformat}

> Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files
> -----------------------------------------------------------------------------------------
>
>                 Key: MSITE-294
>                 URL: http://jira.codehaus.org/browse/MSITE-294
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-6
>         Environment: *.apt.vm files, and +----- escaped section.
>            Reporter: Andrew Hughes
>            Priority: Critical
>
> You can reproduce this the following way.....
> ./src/site/index.apt.vm (start)
> --------------------------------------------------
> This will appear without the backslashes {noformat}$\{project.version\}{noformat} and that's excellent. But you can't get this output in the escaped apt text section below.
> {noformat}
> +---
> However this apt escaped section still shows the backslashes inside this section $\{project.version\} and there is no known way the text can be shown as above.
> To make matters worse, when you put this in without the backslashes, you get the properties value (like a filter). See: ${project.version} not the desired string as above
> +---
> {noformat}
> -------------------------------------------------
> ./src/site/index.apt.vm (start)

-- 
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

        

[jira] Commented: (MSITE-294) Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files

Posted by "Andrew Hughes (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_123357 ] 

Andrew Hughes commented on MSITE-294:
-------------------------------------

maybe I need to submit a bug to jira itself for this one!!!!

> Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files
> -----------------------------------------------------------------------------------------
>
>                 Key: MSITE-294
>                 URL: http://jira.codehaus.org/browse/MSITE-294
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-6
>         Environment: *.apt.vm files, and +----- escaped section.
>            Reporter: Andrew Hughes
>            Priority: Critical
>
> You can reproduce this the following way.....
> ./src/site/index.apt.vm (start)
> --------------------------------------------------
> This will appear without the backslashes {noformat}$\{project.version\}{noformat} and that's excellent. But you can't get this output in the escaped apt text section below.
> {noformat}
> +---
> However this apt escaped section still shows the backslashes inside this section $\{project.version\} and there is no known way the text can be shown as above.
> To make matters worse, when you put this in without the backslashes, you get the properties value (like a filter). See: ${project.version} not the desired string as above
> +---
> {noformat}
> -------------------------------------------------
> ./src/site/index.apt.vm (start)

-- 
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

        

[jira] Issue Comment Edited: (MSITE-294) Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files

Posted by "Andrew Hughes (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_123459 ] 

ahughes edited comment on MSITE-294 at 2/12/08 6:01 PM:
--------------------------------------------------------------

Hi Dennis,

Thanks for the response, what you are saying is correct... if I put this text in I would expect the value to be replaced....

INPUT: index.apt.vm
{noformat}
This project version is ${project.version}
{noformat}
OUTPUT: index.html  which is correct and I am happy with :) :) :)
{noformat}
This project version is 1.0.0-SNAPSHOT
{noformat}





Now let's say I really wanted the output to say....
INPUT: index.apt.vm
{noformat}
This project version is ${project.version} and comes from the $\{project.version\} property.
{noformat}
OUTPUT: index.html  - which is correct and I am happy with :) :) :)
{noformat}
This project version is 1.0.0-SNAPSHOT and comes from the ${project.version} property.
{noformat}





However........ if I want to do the above inside an apt escape box it becomes a bit weird... this is the bug...
INPUT: index.apt.vm
{noformat}
+----
This project version is ${project.version} and comes from the $\{project.version\} property.
+----
{noformat}
OUTPUT: index.html  - which is not what I want :( :( :(
{noformat}
This project version is 1.0.0-SNAPSHOT and comes from the $\{project.version\} property.
{noformat}




My real use case, is that I have a plugin I am trying to document. My documentation is an XML HowTo snippet (hence the +------ apt escape section). The XML HowTo is driven by a mixture of properties to be replaced from values in the project, and "you must define a property called xxx.xxx within your profile to complete the plugin usage configuration HowTo. My description problably sucks so here's my actual input and output I want, and what I get....

INPUT: index.apt.vm
{noformat}
How To Use The ${project.groupId}:${project.artifactId}-${project.version} Plugin

Add the following to your pom.xml's plugin section

+-------------------------------------------------------------------------------------------------+
<plugins>
        .....
	<plugin>
	    <groupId>${project.groupId}</groupId>
	    <artifactId>${project.artifactId}</artifactId>
	    <version>${project.version}</version>
	    <configuration>
	        <host>localhost</host>
	        <port>4848</port>
	        <user>admin</user>
	        <password>adm1nadm1n</password>
	        <target>$\{basedir\}/target/$\{project.artifactId\}-$\{project.version\}.$\{project.packaging\}</target>
	        <appname>$\{project.artifactId\}-$\{project.version\}</appname>
	    </configuration>
	</plugin>
	.....
</plugins>
+-------------------------------------------------------------------------------------------------+
{noformat}
OUTPUT: index.html (this is what I want)

{noformat}
How To Use The mycompany-maven:glassfish-deployer-1.0.0-SNAPSHOT Plugin

Add the following to your pom.xml's plugin section

<plugins>
        .....
	<plugin>
	    <groupId>mycompany-maven</groupId>
	    <artifactId>glassfish-deployer</artifactId>
	    <version>1.0.0-SNAPSHOT</version>
	    <configuration>
	        <host>localhost</host>
	        <port>4848</port>
	        <user>admin</user>
	        <password>adm1nadm1n</password>
	        <target>${basedir}/target/${project.artifactId}-${project.version}.${project.packaging}</target>
	        <appname>${project.artifactId}-${project.version}</appname>
	    </configuration>
	</plugin>
	.....
</plugins>

{noformat}
OUTPUT: index.html (this is what I get) NOTE the backslashes are still there.... :( :( :(
{noformat}
How To Use The mycompany-maven:glassfish-deployer-1.0.0-SNAPSHOT Plugin

Add the following to your pom.xml's plugin section

<plugins>
        .....
	<plugin>
	    <groupId>mycompany-maven</groupId>
	    <artifactId>glassfish-deployer</artifactId>
	    <version>1.0.0-SNAPSHOT</version>
	    <configuration>
	        <host>localhost</host>
	        <port>4848</port>
	        <user>admin</user>
	        <password>adm1nadm1n</password>
	        <target>$\{basedir\}/target/$\{project.artifactId\}-$\{project.version\}.$\{project.packaging\}</target>
	        <appname>$\{project.artifactId\}-$\{project.version\}</appname>
	    </configuration>
	</plugin>
	.....
</plugins>
{noformat}

      was (Author: ahughes):
    Hi Dennis,

Thanks for the response, what you are saying is correct... if I put this text in I would expect the value to be replaced....

INPUT: index.apt.vm
{noformat}
This project version is ${project.version}
{noformat}
OUTPUT: index.html  [which is correct and I am happy with :)
{noformat}
This project version is 1.0.0-SNAPSHOT
{noformat}


But let's say I really wanted the output to say....

INPUT: index.apt.vm
{noformat}
This project version is ${project.version} and comes from the $\{project.version\} property.
{noformat}
OUTPUT: index.html  - which is correct and I am happy with :)]
{noformat}
This project version is 1.0.0-SNAPSHOT and comes from the ${project.version} property.
{noformat}

However........ if I want to do the above inside an apt escape box it becomes a bit weird... this is the bug...
INPUT: index.apt.vm
{noformat}
+----
This project version is ${project.version} and comes from the $\{project.version\} property.
+----
{noformat}
OUTPUT: index.html  - which is not what I want :(
{noformat}
This project version is 1.0.0-SNAPSHOT and comes from the $\{project.version\} property.
{noformat}


My real use case, is that I have a plugin I am trying to document. My documentation is an XML HowTo snippet (hence the +------ apt escape section). The XML HowTo is driven by a mixture of properties to be replaced from values in the project, and "you must define a property called xxx.xxx within your profile to complete the plugin usage configuration HowTo. My description problably sucks so here's my actual input and output I want, and what I get....

INPUT: index.apt.vm
{noformat}
How To Use The ${project.groupId}:${project.artifactId}-${project.version} Plugin

Add the following to your pom.xml's plugin section

+-------------------------------------------------------------------------------------------------+
<plugins>
        .....
	<plugin>
	    <groupId>${project.groupId}</groupId>
	    <artifactId>${project.artifactId}</artifactId>
	    <version>${project.version}</version>
	    <configuration>
	        <host>localhost</host>
	        <port>4848</port>
	        <user>admin</user>
	        <password>adm1nadm1n</password>
	        <target>$\{basedir\}/target/$\{project.artifactId\}-$\{project.version\}.$\{project.packaging\}</target>
	        <appname>$\{project.artifactId\}-$\{project.version\}</appname>
	    </configuration>
	</plugin>
	.....
</plugins>
+-------------------------------------------------------------------------------------------------+
{noformat}
OUTPUT: index.html (this is what I want)

{noformat}
How To Use The mycompany-maven:glassfish-deployer-1.0.0-SNAPSHOT Plugin

Add the following to your pom.xml's plugin section

<plugins>
        .....
	<plugin>
	    <groupId>mycompany-maven</groupId>
	    <artifactId>glassfish-deployer</artifactId>
	    <version>1.0.0-SNAPSHOT</version>
	    <configuration>
	        <host>localhost</host>
	        <port>4848</port>
	        <user>admin</user>
	        <password>adm1nadm1n</password>
	        <target>${basedir}/target/${project.artifactId}-${project.version}.${project.packaging}</target>
	        <appname>${project.artifactId}-${project.version}</appname>
	    </configuration>
	</plugin>
	.....
</plugins>

{noformat}
OUTPUT: index.html (this is what I get) NOTE the backslashes are still there....
{noformat}
How To Use The mycompany-maven:glassfish-deployer-1.0.0-SNAPSHOT Plugin

Add the following to your pom.xml's plugin section

<plugins>
        .....
	<plugin>
	    <groupId>mycompany-maven</groupId>
	    <artifactId>glassfish-deployer</artifactId>
	    <version>1.0.0-SNAPSHOT</version>
	    <configuration>
	        <host>localhost</host>
	        <port>4848</port>
	        <user>admin</user>
	        <password>adm1nadm1n</password>
	        <target>$\{basedir\}/target/$\{project.artifactId\}-$\{project.version\}.$\{project.packaging\}</target>
	        <appname>$\{project.artifactId\}-$\{project.version\}</appname>
	    </configuration>
	</plugin>
	.....
</plugins>
{noformat}
  
> Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files
> -----------------------------------------------------------------------------------------
>
>                 Key: MSITE-294
>                 URL: http://jira.codehaus.org/browse/MSITE-294
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-6
>         Environment: *.apt.vm files, and +----- escaped section.
>            Reporter: Andrew Hughes
>            Priority: Critical
>
> You can reproduce this the following way.....
> ./src/site/index.apt.vm (start)
> --------------------------------------------------
> This will appear without the backslashes {noformat}$\{project.version\}{noformat} and that's excellent. But you can't get this output in the escaped apt text section below.
> {noformat}
> +---
> However this apt escaped section still shows the backslashes inside this section $\{project.version\} and there is no known way the text can be shown as above.
> To make matters worse, when you put this in without the backslashes, you get the properties value (like a filter). See: ${project.version} not the desired string as above
> +---
> {noformat}
> -------------------------------------------------
> ./src/site/index.apt.vm (start)

-- 
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

        

[jira] Commented: (MSITE-294) Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files

Posted by "Andrew Hughes (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_123355 ] 

Andrew Hughes commented on MSITE-294:
-------------------------------------

attempt #2

+------
this won't come out like you want $\\{project.version\\}
+------

> Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files
> -----------------------------------------------------------------------------------------
>
>                 Key: MSITE-294
>                 URL: http://jira.codehaus.org/browse/MSITE-294
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-6
>         Environment: *.apt.vm files, and +----- escaped section.
>            Reporter: Andrew Hughes
>            Priority: Critical
>
> You can reproduce this the following way.....
> ./src/site/index.apt.vm (start)
> --------------------------------------------------
> This will appear without the backslashes $\{project.version\} and that's excellent. But you can't get this output in the escaped apt text section below.
> +---
> However this apt escaped section still shows the backslashes inside this section $\{project.version\} and there is no known way the text can be shown as above.
> To make matters worse, when you put this in without the backslashes, you get the properties value (like a filter). See: ${project.version} not the desired string as above
> +---
> -------------------------------------------------
> ./src/site/index.apt.vm (start)

-- 
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

        

[jira] Commented: (MSITE-294) Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files

Posted by "Andrew Hughes (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=142546#action_142546 ] 

Andrew Hughes commented on MSITE-294:
-------------------------------------

Since posting here, I've changed jobs, switched roles eta eta eta... so I have lost my 'test case' for this situation. Off the top of my head... we did get around this by declaring an apt variable at the start of the .apt file. This was assigned the ${project.whatever} parameter value, and then you could use this in the apt text. Sorry I don't have a snippet to show how this was done. I'll try find some time to test this... thanks for asking/chasing this one up Dennis & Lukas.

> Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files
> -----------------------------------------------------------------------------------------
>
>                 Key: MSITE-294
>                 URL: http://jira.codehaus.org/browse/MSITE-294
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-6
>         Environment: *.apt.vm files, and +----- escaped section.
>            Reporter: Andrew Hughes
>            Priority: Critical
>
> You can reproduce this the following way.....
> ./src/site/index.apt.vm (start)
> --------------------------------------------------
> This will appear without the backslashes {noformat}$\{project.version\}{noformat} and that's excellent. But you can't get this output in the escaped apt text section below.
> {noformat}
> +---
> However this apt escaped section still shows the backslashes inside this section $\{project.version\} and there is no known way the text can be shown as above.
> To make matters worse, when you put this in without the backslashes, you get the properties value (like a filter). See: ${project.version} not the desired string as above
> +---
> {noformat}
> -------------------------------------------------
> ./src/site/index.apt.vm (start)

-- 
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

        

[jira] Commented: (MSITE-294) Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_123403 ] 

Dennis Lundberg commented on MSITE-294:
---------------------------------------

Putting
{code}
${project.version}
{code}
into a *.apt.vm file *will* replace it with the actual value of that property from the pom. This is the intended behavior.

See "Filtering" at the bottom of http://maven.apache.org/plugins/maven-site-plugin/usage.html

> Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files
> -----------------------------------------------------------------------------------------
>
>                 Key: MSITE-294
>                 URL: http://jira.codehaus.org/browse/MSITE-294
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-6
>         Environment: *.apt.vm files, and +----- escaped section.
>            Reporter: Andrew Hughes
>            Priority: Critical
>
> You can reproduce this the following way.....
> ./src/site/index.apt.vm (start)
> --------------------------------------------------
> This will appear without the backslashes {noformat}$\{project.version\}{noformat} and that's excellent. But you can't get this output in the escaped apt text section below.
> {noformat}
> +---
> However this apt escaped section still shows the backslashes inside this section $\{project.version\} and there is no known way the text can be shown as above.
> To make matters worse, when you put this in without the backslashes, you get the properties value (like a filter). See: ${project.version} not the desired string as above
> +---
> {noformat}
> -------------------------------------------------
> ./src/site/index.apt.vm (start)

-- 
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

        

[jira] Updated: (MSITE-294) Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files

Posted by "Wendy Smoak (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSITE-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wendy Smoak updated MSITE-294:
------------------------------

    Description: 
You can reproduce this the following way.....

./src/site/index.apt.vm (start)
--------------------------------------------------

This will appear without the backslashes {noformat}$\{project.version\}{noformat} and that's excellent. But you can't get this output in the escaped apt text section below.

{noformat}
+---
However this apt escaped section still shows the backslashes inside this section $\{project.version\} and there is no known way the text can be shown as above.
To make matters worse, when you put this in without the backslashes, you get the properties value (like a filter). See: ${project.version} not the desired string as above
+---
{noformat}
-------------------------------------------------
./src/site/index.apt.vm (start)



  was:
You can reproduce this the following way.....

./src/site/index.apt.vm (start)
--------------------------------------------------

This will appear without the backslashes $\{project.version\} and that's excellent. But you can't get this output in the escaped apt text section below.

+---
However this apt escaped section still shows the backslashes inside this section $\{project.version\} and there is no known way the text can be shown as above.
To make matters worse, when you put this in without the backslashes, you get the properties value (like a filter). See: ${project.version} not the desired string as above
+---

-------------------------------------------------
./src/site/index.apt.vm (start)




attempt to fix formatting

> Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files
> -----------------------------------------------------------------------------------------
>
>                 Key: MSITE-294
>                 URL: http://jira.codehaus.org/browse/MSITE-294
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-6
>         Environment: *.apt.vm files, and +----- escaped section.
>            Reporter: Andrew Hughes
>            Priority: Critical
>
> You can reproduce this the following way.....
> ./src/site/index.apt.vm (start)
> --------------------------------------------------
> This will appear without the backslashes {noformat}$\{project.version\}{noformat} and that's excellent. But you can't get this output in the escaped apt text section below.
> {noformat}
> +---
> However this apt escaped section still shows the backslashes inside this section $\{project.version\} and there is no known way the text can be shown as above.
> To make matters worse, when you put this in without the backslashes, you get the properties value (like a filter). See: ${project.version} not the desired string as above
> +---
> {noformat}
> -------------------------------------------------
> ./src/site/index.apt.vm (start)

-- 
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

        

[jira] Commented: (MSITE-294) Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=142495#action_142495 ] 

Dennis Lundberg commented on MSITE-294:
---------------------------------------

Andrew, does Lukas' suggestion work for you?
If it does, then we just need to document this.

> Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files
> -----------------------------------------------------------------------------------------
>
>                 Key: MSITE-294
>                 URL: http://jira.codehaus.org/browse/MSITE-294
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-6
>         Environment: *.apt.vm files, and +----- escaped section.
>            Reporter: Andrew Hughes
>            Priority: Critical
>
> You can reproduce this the following way.....
> ./src/site/index.apt.vm (start)
> --------------------------------------------------
> This will appear without the backslashes {noformat}$\{project.version\}{noformat} and that's excellent. But you can't get this output in the escaped apt text section below.
> {noformat}
> +---
> However this apt escaped section still shows the backslashes inside this section $\{project.version\} and there is no known way the text can be shown as above.
> To make matters worse, when you put this in without the backslashes, you get the properties value (like a filter). See: ${project.version} not the desired string as above
> +---
> {noformat}
> -------------------------------------------------
> ./src/site/index.apt.vm (start)

-- 
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

        

[jira] Closed: (MSITE-294) Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSITE-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg closed MSITE-294.
---------------------------------

    Resolution: Not A Bug

> Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files
> -----------------------------------------------------------------------------------------
>
>                 Key: MSITE-294
>                 URL: http://jira.codehaus.org/browse/MSITE-294
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-6
>         Environment: *.apt.vm files, and +----- escaped section.
>            Reporter: Andrew Hughes
>            Priority: Critical
>
> You can reproduce this the following way.....
> ./src/site/index.apt.vm (start)
> --------------------------------------------------
> This will appear without the backslashes {noformat}$\{project.version\}{noformat} and that's excellent. But you can't get this output in the escaped apt text section below.
> {noformat}
> +---
> However this apt escaped section still shows the backslashes inside this section $\{project.version\} and there is no known way the text can be shown as above.
> To make matters worse, when you put this in without the backslashes, you get the properties value (like a filter). See: ${project.version} not the desired string as above
> +---
> {noformat}
> -------------------------------------------------
> ./src/site/index.apt.vm (start)

-- 
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

        

[jira] Commented: (MSITE-294) Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files

Posted by "Andrew Hughes (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_123358 ] 

Andrew Hughes commented on MSITE-294:
-------------------------------------

thanks Wendy!!!!! :)

> Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files
> -----------------------------------------------------------------------------------------
>
>                 Key: MSITE-294
>                 URL: http://jira.codehaus.org/browse/MSITE-294
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-6
>         Environment: *.apt.vm files, and +----- escaped section.
>            Reporter: Andrew Hughes
>            Priority: Critical
>
> You can reproduce this the following way.....
> ./src/site/index.apt.vm (start)
> --------------------------------------------------
> This will appear without the backslashes {noformat}$\{project.version\}{noformat} and that's excellent. But you can't get this output in the escaped apt text section below.
> {noformat}
> +---
> However this apt escaped section still shows the backslashes inside this section $\{project.version\} and there is no known way the text can be shown as above.
> To make matters worse, when you put this in without the backslashes, you get the properties value (like a filter). See: ${project.version} not the desired string as above
> +---
> {noformat}
> -------------------------------------------------
> ./src/site/index.apt.vm (start)

-- 
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

        

[jira] Commented: (MSITE-294) Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files

Posted by "Andrew Hughes (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_123354 ] 

Andrew Hughes commented on MSITE-294:
-------------------------------------

OMG, to make matters worse when the jira issue is lodged it is stripping my escape text examples... I can't win here!!!!!

> Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files
> -----------------------------------------------------------------------------------------
>
>                 Key: MSITE-294
>                 URL: http://jira.codehaus.org/browse/MSITE-294
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-6
>         Environment: *.apt.vm files, and +----- escaped section.
>            Reporter: Andrew Hughes
>            Priority: Critical
>
> You can reproduce this the following way.....
> ./src/site/index.apt.vm (start)
> --------------------------------------------------
> This will appear without the backslashes $\{project.version\} and that's excellent. But you can't get this output in the escaped apt text section below.
> +---
> However this apt escaped section still shows the backslashes inside this section $\{project.version\} and there is no known way the text can be shown as above.
> To make matters worse, when you put this in without the backslashes, you get the properties value (like a filter). See: ${project.version} not the desired string as above
> +---
> -------------------------------------------------
> ./src/site/index.apt.vm (start)

-- 
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

        

[jira] Commented: (MSITE-294) Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=140752#action_140752 ] 

Lukas Theussl commented on MSITE-294:
-------------------------------------

The following works:

{source}
+----
  This project version is ${project.version} and comes from the \${project.version} property.
+----
{source}

I don't think that this is a bug even if it's not very intuitive. If you use slashes inside apt verbatim text they will render as-is (that's what verbatim text is supposed to do), so all you need is prevent velocity from filtering the property, which you do by escaping the $.

> Can't escape ${project.version} as plain text inside apt +---- section, on *.apt.vm files
> -----------------------------------------------------------------------------------------
>
>                 Key: MSITE-294
>                 URL: http://jira.codehaus.org/browse/MSITE-294
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-6
>         Environment: *.apt.vm files, and +----- escaped section.
>            Reporter: Andrew Hughes
>            Priority: Critical
>
> You can reproduce this the following way.....
> ./src/site/index.apt.vm (start)
> --------------------------------------------------
> This will appear without the backslashes {noformat}$\{project.version\}{noformat} and that's excellent. But you can't get this output in the escaped apt text section below.
> {noformat}
> +---
> However this apt escaped section still shows the backslashes inside this section $\{project.version\} and there is no known way the text can be shown as above.
> To make matters worse, when you put this in without the backslashes, you get the properties value (like a filter). See: ${project.version} not the desired string as above
> +---
> {noformat}
> -------------------------------------------------
> ./src/site/index.apt.vm (start)

-- 
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