[
https://issues.apache.org/jira/browse/MINSTALL-50?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17965891#comment-17965891
]
Olivier Lamy commented on MINSTALL-50:
--------------------------------------
This project has moved from Jira to GitHub Issues. This issue was migrated to
[apache/maven-install-plugin#148|https://github.com/apache/maven-install-plugin/issues/148].
> provide property filtering on .pom files placed in local repo
> -------------------------------------------------------------
>
> Key: MINSTALL-50
> URL: https://issues.apache.org/jira/browse/MINSTALL-50
> Project: Maven Install Plugin (Moved to GitHub Issues)
> Issue Type: New Feature
> Components: install:install
> Affects Versions: 2.3
> Environment: independent
> Reporter: Stefan Armbruster
> Priority: Major
> Attachments: MNG-maven-install.patch, MNG-maven-install.patch
>
>
> When maven installs an artifact, it's pom is also copied into the artifact's
> directory. Unfortunately, if the pom contains a property reference (e.g.
> $\{myprop\}), this will not be replaced upon copying the pom file.
> I've created a patch for the install plugin that switches on property
> filtering by setting a mojo parameter "{{filteringEnabled}}". Since this
> defaults to "{{false}}", backward compatibility is kept 100%.
> Some implementation notes:
> * the dirty work is done in {{FilteredProjectArtifactMetadata.java}}, the
> property resolution code has been inspired by {{ResourcesMojo}}.
> * I've added a unit test, that replaces ${basedir} with the value of a system
> property.
> * since "svn diff" does not handle binary files,
> {{src/test/resources/unit/basic-install-test-with-filtering/target/maven-install-test-1.0-SNAPSHOT.jar}}
> is not included in the patch. This file is the same as
> {{src/test/resources/unit/basic-install-test/target/maven-install-test-1.0-SNAPSHOT.jar}}
> Since my knowledge of Maven API is more than limited, there might be a more
> elegant way to provide this feature ... but it works! I'd be happy to see
> this in a future release of maven.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)