You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Matthew Tordoff (JIRA)" <ji...@codehaus.org> on 2008/06/30 12:45:27 UTC

[jira] Created: (MNG-3638) Referencing resource directory as a property does not work

Referencing resource directory as a property does not work
----------------------------------------------------------

                 Key: MNG-3638
                 URL: http://jira.codehaus.org/browse/MNG-3638
             Project: Maven 2
          Issue Type: Bug
          Components: General
    Affects Versions: 2.0.9
         Environment: Windows XP Professional SP 2
            Reporter: Matthew Tordoff


The following property is not resolved by Maven:

${project.build.resources.resource.directory}

It follows the notation described to access any property within the POM, is there an alternative property that can be used to reference the resource directory?

-- 
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: (MNG-3638) Ability to evaluate expressions involving collections

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated MNG-3638:
------------------------------

    Fix Version/s: 2.x
          Summary: Ability to evaluate expressions involving collections  (was: Referencing resource directory as a property does not work)

> Ability to evaluate expressions involving collections
> -----------------------------------------------------
>
>                 Key: MNG-3638
>                 URL: http://jira.codehaus.org/browse/MNG-3638
>             Project: Maven 2
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.9
>         Environment: Windows XP Professional SP 2
>            Reporter: Matthew Tordoff
>             Fix For: 2.x
>
>
> The following property is not resolved by Maven:
> ${project.build.resources.resource.directory}
> It follows the notation described to access any property within the POM, is there an alternative property that can be used to reference the resource directory?

-- 
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: (MNG-3638) Ability to evaluate expressions involving collections

Posted by "Shane Isbell (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=149611#action_149611 ] 

Shane Isbell commented on MNG-3638:
-----------------------------------

In 3.0, we are converting the model into URI/value pairs: so the parameter you specified would be: http://apache.org/maven/project/build/resources#collection/resource/directory. I've excluded any URI with collection from being used in interpolation because I have no idea how to choose the correct element within the collection, there being, say two resource/directory.

If someone can come up with a solid, deterministic rule for how this can be done, I can implement it.

> Ability to evaluate expressions involving collections
> -----------------------------------------------------
>
>                 Key: MNG-3638
>                 URL: http://jira.codehaus.org/browse/MNG-3638
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.9
>         Environment: Windows XP Professional SP 2
>            Reporter: Matthew Tordoff
>             Fix For: 3.x
>
>
> The following property is not resolved by Maven:
> ${project.build.resources.resource.directory}
> It follows the notation described to access any property within the POM, is there an alternative property that can be used to reference the resource directory?

-- 
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: (MNG-3638) Referencing resource directory as a property does not work

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=139965#action_139965 ] 

Benjamin Bentmann commented on MNG-3638:
----------------------------------------

bq. ${project.build.resources.resource.directory}
Note the plural form, "resources" is actually a collection (compare the [Maven Model|http://maven.apache.org/ref/current/maven-model/maven.html]). Not sure whether Maven has some indexing syntax for accessing individual collection elements.

> Referencing resource directory as a property does not work
> ----------------------------------------------------------
>
>                 Key: MNG-3638
>                 URL: http://jira.codehaus.org/browse/MNG-3638
>             Project: Maven 2
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.9
>         Environment: Windows XP Professional SP 2
>            Reporter: Matthew Tordoff
>
> The following property is not resolved by Maven:
> ${project.build.resources.resource.directory}
> It follows the notation described to access any property within the POM, is there an alternative property that can be used to reference the resource directory?

-- 
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: (MNG-3638) Ability to evaluate expressions involving collections

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=149684#action_149684 ] 

bentmann edited comment on MNG-3638 at 10/3/08 5:51 AM:
-----------------------------------------------------------------

bq. If someone can come up with a solid, deterministic rule for how this can be done, I can implement it.

Does it need more than an index operator to allow users to specify which collection element they refer to? I mean, the POM is XML, XML is a sequence of elements so all collections should in fact be lists that can be accessed via a zero-based index.

The brackets that Java uses for array indexing are forbidden in URI paths but there are still other available delimiter characters. So, how about something like one of these:
{noformat}
project/build/resources/0/directory
project/build/resources,0/directory
project/build/resources(0)/directory
{noformat}


      was (Author: bentmann):
    bq. If someone can come up with a solid, deterministic rule for how this can be done, I can implement it.

Does it need more than an index operator to allow users to specify which collection element they refer to? I mean, the POM is XML, XML is a sequence of elements so all collections should in fact be lists that can be accessed via a zero-based index.

The brackets that Java uses for array indexing are forbidden in URI paths but there are still other available delimiter characters. So, how about something like one of these:
{noformat}
project/build/resources,0/directory
project/build/resources(0)/directory
{noformat}

  
> Ability to evaluate expressions involving collections
> -----------------------------------------------------
>
>                 Key: MNG-3638
>                 URL: http://jira.codehaus.org/browse/MNG-3638
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.9
>         Environment: Windows XP Professional SP 2
>            Reporter: Matthew Tordoff
>             Fix For: 3.x
>
>
> The following property is not resolved by Maven:
> ${project.build.resources.resource.directory}
> It follows the notation described to access any property within the POM, is there an alternative property that can be used to reference the resource directory?

-- 
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: (MNG-3638) Ability to evaluate expressions involving collections

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=149684#action_149684 ] 

Benjamin Bentmann commented on MNG-3638:
----------------------------------------

bq. If someone can come up with a solid, deterministic rule for how this can be done, I can implement it.

Does it need more than an index operator to allow users to specify which collection element they refer to? I mean, the POM is XML, XML is a sequence of elements so all collections should in fact be lists that can be accessed via a zero-based index.

The brackets that Java uses for array indexing are forbidden in URI paths but there are still other available delimiter characters. So, how about something like one of these:
{noformat}
project/build/resources,0/directory
project/build/resources(0)/directory
{noformat}


> Ability to evaluate expressions involving collections
> -----------------------------------------------------
>
>                 Key: MNG-3638
>                 URL: http://jira.codehaus.org/browse/MNG-3638
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.9
>         Environment: Windows XP Professional SP 2
>            Reporter: Matthew Tordoff
>             Fix For: 3.x
>
>
> The following property is not resolved by Maven:
> ${project.build.resources.resource.directory}
> It follows the notation described to access any property within the POM, is there an alternative property that can be used to reference the resource directory?

-- 
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: (MNG-3638) Ability to evaluate expressions involving collections

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=153510#action_153510 ] 

Benjamin Bentmann commented on MNG-3638:
----------------------------------------

See also [Expression Access to POM List Elements|http://docs.codehaus.org/display/MAVEN/Expression+Access+to+POM+List+Elements].

> Ability to evaluate expressions involving collections
> -----------------------------------------------------
>
>                 Key: MNG-3638
>                 URL: http://jira.codehaus.org/browse/MNG-3638
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.9
>         Environment: Windows XP Professional SP 2
>            Reporter: Matthew Tordoff
>             Fix For: 3.x
>
>
> The following property is not resolved by Maven:
> ${project.build.resources.resource.directory}
> It follows the notation described to access any property within the POM, is there an alternative property that can be used to reference the resource directory?

-- 
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: (MNG-3638) Ability to evaluate expressions involving collections

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann updated MNG-3638:
-----------------------------------

    Issue Type: New Feature  (was: Bug)

> Ability to evaluate expressions involving collections
> -----------------------------------------------------
>
>                 Key: MNG-3638
>                 URL: http://jira.codehaus.org/browse/MNG-3638
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.9
>         Environment: Windows XP Professional SP 2
>            Reporter: Matthew Tordoff
>             Fix For: 2.x
>
>
> The following property is not resolved by Maven:
> ${project.build.resources.resource.directory}
> It follows the notation described to access any property within the POM, is there an alternative property that can be used to reference the resource directory?

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