Maven Shared Components
  1. Maven Shared Components
  2. MSHARED-97

Export resource key/values as POM properties

    Details

    • Number of attachments :
      0

      Description

      This issue relates to MNG-2562 and the maven-setproperty-plugin (http://www.mail-archive.com/dev@maven.apache.org/msg62789.html).

      Sometimes the interpolation of resources creates a completed key/value that I would like to re-use in later phases. Unfortunately there is no way to get these values to use in the POM unless there is a mechanism to export the values.

        Activity

        Hide
        Olivier Lamy added a comment -

        You mean the Properties object used for filtering files in plugins (resources, war ear ) ?

        Show
        Olivier Lamy added a comment - You mean the Properties object used for filtering files in plugins (resources, war ear ) ?
        Hide
        Paul Benedict added a comment -

        Yes, those key/value pairs used for filtering would be valuable to expose by some known root variable. Then I could use it like $

        {filterProperties.xyz}

        within the POM. It would be great.

        Show
        Paul Benedict added a comment - Yes, those key/value pairs used for filtering would be valuable to expose by some known root variable. Then I could use it like $ {filterProperties.xyz} within the POM. It would be great.
        Hide
        Olivier Lamy added a comment - - edited

        Ok. As those values are created in the maven-filtering component. I have moved the issue to the correct jira project/component.
        But you won't be able to use it for pom interpolation.

        Show
        Olivier Lamy added a comment - - edited Ok. As those values are created in the maven-filtering component. I have moved the issue to the correct jira project/component. But you won't be able to use it for pom interpolation.
        Hide
        John Casey added a comment -

        IMO, it would be much cleaner to have a separate plugin that would read the properties in the POM's build/filters section and inject them as project properties with a pariticular (configurable?) prefix. Having this be an automatic part of every random plugin that uses maven-filtering would be very confusing, IMO.

        I'm -1 for this sort of change in maven-filtering itself.

        Show
        John Casey added a comment - IMO, it would be much cleaner to have a separate plugin that would read the properties in the POM's build/filters section and inject them as project properties with a pariticular (configurable?) prefix. Having this be an automatic part of every random plugin that uses maven-filtering would be very confusing, IMO. I'm -1 for this sort of change in maven-filtering itself.
        Hide
        Olivier Lamy added a comment -

        ok : sounds reasonnable for me too.

        Show
        Olivier Lamy added a comment - ok : sounds reasonnable for me too.
        Hide
        John Casey added a comment -

        Let's implement something like this as a separate plugin, maybe over in mojo.codehaus.org (since it's not a common use case). Then, we can inject this plugin into the build anywhere we need it, without having to worry that some plugin which happens to use maven-filtering is also modifying the project instance. That's pretty counter-intuitive.

        Show
        John Casey added a comment - Let's implement something like this as a separate plugin, maybe over in mojo.codehaus.org (since it's not a common use case). Then, we can inject this plugin into the build anywhere we need it, without having to worry that some plugin which happens to use maven-filtering is also modifying the project instance. That's pretty counter-intuitive.

          People

          • Assignee:
            John Casey
            Reporter:
            Paul Benedict
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: