You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/10/19 06:13:30 UTC

[GitHub] [maven] kwin opened a new pull request, #835: [MNG-6609] expose packaging via property "project.packaging"

kwin opened a new pull request, #835:
URL: https://github.com/apache/maven/pull/835

   This can be used for packaging specific profiles with the property activator.
   
   Following this checklist to help us incorporate your
   contribution quickly and easily:
   
    - [x] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MNG) filed
          for the change (usually before you start working on it).  Trivial changes like typos do not
          require a JIRA issue. Your pull request should address just this issue, without
          pulling in other changes.
    - [x] Each commit in the pull request should have a meaningful subject line and body.
    - [x] Format the pull request title like `[MNG-XXX] SUMMARY`, where you replace `MNG-XXX`
          and `SUMMARY` with the appropriate JIRA issue. Best practice is to use the JIRA issue
          title in the pull request title and in the first line of the commit message.
    - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
    - [x] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will
          be performed on your pull request automatically.
    - [x] You have run the [Core IT][core-its] successfully.
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under
   the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [ ] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
    - [x] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   [core-its]: https://maven.apache.org/core-its/core-it-suite/
   
   IT PR in https://github.com/apache/maven-integration-testing/pull/206


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] gnodet commented on a diff in pull request #835: [MNG-6609] expose packaging via property "project.packaging"

Posted by GitBox <gi...@apache.org>.
gnodet commented on code in PR #835:
URL: https://github.com/apache/maven/pull/835#discussion_r1001591928


##########
maven-model-builder/src/main/java/org/apache/maven/model/profile/ProfileActivationContext.java:
##########
@@ -30,6 +30,12 @@
  */
 public interface ProfileActivationContext
 {
+    /**
+     * Key of the property containing the project's packaging.
+     * Available in {@link #getUserProperties()}.
+     * @since 4.0 
+     */
+    String PROPERTY_NAME_PACKAGING = "project.packaging";

Review Comment:
   Shouldn't that be `packaging` to align with https://github.com/apache/maven/blob/2a9f39336cec1d8e52d30cc48503d51ed8672536/maven-model-builder/src/main/java/org/apache/maven/model/path/ProfileActivationFilePathInterpolator.java#L75-L82
   I think the same reasoning apply, we don't support all `project.*` properties...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] kwin commented on a diff in pull request #835: [MNG-6609] expose packaging via property "project.packaging"

Posted by GitBox <gi...@apache.org>.
kwin commented on code in PR #835:
URL: https://github.com/apache/maven/pull/835#discussion_r1001597973


##########
maven-model-builder/src/main/java/org/apache/maven/model/profile/ProfileActivationContext.java:
##########
@@ -30,6 +30,12 @@
  */
 public interface ProfileActivationContext
 {
+    /**
+     * Key of the property containing the project's packaging.
+     * Available in {@link #getUserProperties()}.
+     * @since 4.0 
+     */
+    String PROPERTY_NAME_PACKAGING = "project.packaging";

Review Comment:
   Good point, will change that



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] gnodet commented on pull request #835: [MNG-6609] expose packaging via property "project.packaging"

Posted by GitBox <gi...@apache.org>.
gnodet commented on PR #835:
URL: https://github.com/apache/maven/pull/835#issuecomment-1286665218

   That really looks like a hack to avoid defining a new activation type to me.  Shouldn't we extend the model to add a packaging based activation ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] kwin merged pull request #835: [MNG-6609] expose packaging via property "project.packaging"

Posted by GitBox <gi...@apache.org>.
kwin merged PR #835:
URL: https://github.com/apache/maven/pull/835


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] kwin commented on pull request #835: [MNG-6609] expose packaging via property "project.packaging"

Posted by GitBox <gi...@apache.org>.
kwin commented on PR #835:
URL: https://github.com/apache/maven/pull/835#issuecomment-1286667062

   Agreed, it is kind of a workaround, but given that I think it is consensus to stick with POM 4.0 for Maven 4 this is the only near term solution I could come up with.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org