You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Giovds (via GitHub)" <gi...@apache.org> on 2025/02/21 14:07:44 UTC
[PR] Add activated profiles to Project interface [maven]
Giovds opened a new pull request, #2119:
URL: https://github.com/apache/maven/pull/2119
Following this checklist to help us incorporate your
contribution quickly and easily:
- [ ] 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.
- [ ] Format the pull request title like `[MNG-XXX] SUMMARY`,
where you replace `MNG-XXX` and `SUMMARY` with the appropriate JIRA issue.
- [ ] Also format the first line of the commit message like `[MNG-XXX] SUMMARY`.
Best practice is to use the JIRA issue title in both the pull request title and in the first line of the commit message.
- [ ] 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.
- [ ] 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/
--
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
Re: [PR] [MNG-8588] Add activated profiles to Project interface [maven]
Posted by "Giovds (via GitHub)" <gi...@apache.org>.
Giovds commented on PR #2119:
URL: https://github.com/apache/maven/pull/2119#issuecomment-2683437211
> Btw, are you working on top of https://github.com/apache/maven-help-plugin/pull/121 or did you start from scratch ?
Yes, I took the mvn4 branch as baseline. Did have to do some changes after bumping to beta-5, and Iām not sure if it is going to be comparable with the rc releases.
> We should definitely try it instead. Adding getActiveProfiles() to Project should be sufficient to cover both mojos usage I think.
I believe so too!
--
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
Re: [PR] [MNG-8588] Add activated profiles to Project interface [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #2119:
URL: https://github.com/apache/maven/pull/2119#issuecomment-2683340064
> > @gnodet I think it is time for weekend for me. I was adding missing tests to the `getActiveProfiles()` and ended up forgetting to add the tests for the `getInjectedProfileIds()` š. I'll add those in the next commit.
> > Thinking out loud / alternative:
> > While testing though, it might be better to replace the `getInjectedProfileIds()` with `getActiveProfiles()` in the `DefaultProject` and utilise the `Locations`. We could reference the actual file used for the external profiles instead of hardcoding "external". We could also reference the line number of the active profile as well.
> > <img alt="image" width="796" src="https://private-user-images.githubusercontent.com/27761321/415792002-27890793-d235-4799-a0a8-c17d58598c69.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDA0MzYyNzgsIm5iZiI6MTc0MDQzNTk3OCwicGF0aCI6Ii8yNzc2MTMyMS80MTU3OTIwMDItMjc4OTA3OTMtZDIzNS00Nzk5LWEwYTgtYzE3ZDU4NTk4YzY5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjI0VDIyMjYxOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE1OTJmYzIzODMzMjA2NGMyOTI2MzllMWYyNmQ0NjNmYTM4MDAzMTc3OTEzNzgwMTlhNTU2ZjljNzMyY2JlZjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.OxqzP-LwPkXqXoS-m_MC48_89ImDDT6jYtGIVu3cmVs">
> > **maven-help-plugin 3.5.1** <img alt="image" width="739" src="https://private-user-images.githubusercontent.com/27761321/415792353-7cbcc87c-b497-416c-8801-992618375e2a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDA0MzYyNzgsIm5iZiI6MTc0MDQzNTk3OCwicGF0aCI6Ii8yNzc2MTMyMS80MTU3OTIzNTMtN2NiY2M4N2MtYjQ5Ny00MTZjLTg4MDEtOTkyNjE4Mzc1ZTJhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjI0VDIyMjYxOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRiNTA4ODE3MTllMTVhZmVmNWEwOGQwYjQ2YjcyYzA0NzllNDY0N2NkMTM0MzUyOGNhZmFlNDY4NjI2NGMyZGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.4Q7b6n0Ld_OLcZnImasEyTbvccdPvTxxiwoEMpX8taM">
> > Instead of ` - staged-releases (source: external)`
> > we could do something like ` - staged-releases (source: settings.xml)` and fall back to "external" if not present.
> > and ` - run-its (source: org.apache.maven.plugins:maven-help-plugin:maven-plugin:4.0.0-SNAPSHOT line 224)` if "pom".
> > I'd have to do some more testing to see if this would work.
>
> If that works, that would be even better and allow a leaner API imho.
We should definitely try it instead. Adding `getActiveProfiles()` to `Project` should be sufficient to cover both mojos usage I think.
--
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
Re: [PR] [MNG-8588] Add activated profiles to Project interface [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #2119:
URL: https://github.com/apache/maven/pull/2119#issuecomment-2683344866
Btw, are you working on top of https://github.com/apache/maven-help-plugin/pull/121 or did you start from scratch ?
--
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
Re: [PR] [MNG-8588] Add activated profiles to Project interface [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #2119:
URL: https://github.com/apache/maven/pull/2119#issuecomment-2680897510
> @gnodet I think it is time for weekend for me. I was adding missing tests to the `getActiveProfiles()` and ended up forgetting to add the tests for the `getInjectedProfileIds()` š. I'll add those in the next commit.
>
> Thinking out loud / alternative:
>
> While testing though, it might be better to replace the `getInjectedProfileIds()` with `getActiveProfiles()` in the `DefaultProject` and utilise the `Locations`. We could reference the actual file used for the external profiles instead of hardcoding "external". We could also reference the line number of the active profile as well.
>
> <img alt="image" width="796" src="https://private-user-images.githubusercontent.com/27761321/415792002-27890793-d235-4799-a0a8-c17d58598c69.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDA0MzYyNzgsIm5iZiI6MTc0MDQzNTk3OCwicGF0aCI6Ii8yNzc2MTMyMS80MTU3OTIwMDItMjc4OTA3OTMtZDIzNS00Nzk5LWEwYTgtYzE3ZDU4NTk4YzY5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjI0VDIyMjYxOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE1OTJmYzIzODMzMjA2NGMyOTI2MzllMWYyNmQ0NjNmYTM4MDAzMTc3OTEzNzgwMTlhNTU2ZjljNzMyY2JlZjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.OxqzP-LwPkXqXoS-m_MC48_89ImDDT6jYtGIVu3cmVs">
> **maven-help-plugin 3.5.1** <img alt="image" width="739" src="https://private-user-images.githubusercontent.com/27761321/415792353-7cbcc87c-b497-416c-8801-992618375e2a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDA0MzYyNzgsIm5iZiI6MTc0MDQzNTk3OCwicGF0aCI6Ii8yNzc2MTMyMS80MTU3OTIzNTMtN2NiY2M4N2MtYjQ5Ny00MTZjLTg4MDEtOTkyNjE4Mzc1ZTJhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjI0VDIyMjYxOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRiNTA4ODE3MTllMTVhZmVmNWEwOGQwYjQ2YjcyYzA0NzllNDY0N2NkMTM0MzUyOGNhZmFlNDY4NjI2NGMyZGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.4Q7b6n0Ld_OLcZnImasEyTbvccdPvTxxiwoEMpX8taM">
>
> Instead of ` - staged-releases (source: external)`
>
> we could do something like ` - staged-releases (source: settings.xml)` and fall back to "external" if not present.
>
> and ` - run-its (source: org.apache.maven.plugins:maven-help-plugin:maven-plugin:4.0.0-SNAPSHOT line 224)` if "pom".
>
> I'd have to do some more testing to see if this would work.
If that works, that would be even better and allow a leaner API imho.
--
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
Re: [PR] Add activated profiles to Project interface [maven]
Posted by "Giovds (via GitHub)" <gi...@apache.org>.
Giovds commented on PR #2119:
URL: https://github.com/apache/maven/pull/2119#issuecomment-2674654053
I'm trying to move the maven-help-plugin forward into a 4.0.0 release. It currently (3.x) uses a method to get the activated profiles from the project. This method is not yet available on the new interface. I think it is necessary to introduce this method in order to properly get the activated profiles from the build without needing to rebuild the project again.
I've decided to keep the interface the same for now, but I can imagine that we would want a better representation such as a new class or making use of the Profile class.
--
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
Re: [PR] [MNG-8588] Add activated profiles to Project interface [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet closed pull request #2119: [MNG-8588] Add activated profiles to Project interface
URL: https://github.com/apache/maven/pull/2119
--
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
Re: [PR] [MNG-8588] Add activated profiles to Project interface [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #2119:
URL: https://github.com/apache/maven/pull/2119#issuecomment-2675020553
@Giovds I see the tests are using `getActiveProfiles()` instead of `getInjectedProfileIds()`.
Is that because you wanted to use that method instead ?
--
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
Re: [PR] [MNG-8588] Add activated profiles to Project interface [maven]
Posted by "Giovds (via GitHub)" <gi...@apache.org>.
Giovds commented on PR #2119:
URL: https://github.com/apache/maven/pull/2119#issuecomment-2675380482
@gnodet I think it is time for weekend for me. I was adding missing tests to the `getActiveProfiles()` and ended up forgetting to add the tests for the `getInjectedProfileIds()` š. I'll add those in the next commit.
---
Thinking out loud / alternative:
While testing though, it might be better to replace the `getInjectedProfileIds()` with `getActiveProfiles()` in the `DefaultProject` and utilise the `Locations`. We could reference the actual file used for the external profiles instead of hardcoding "external". We could also reference the line number of the active profile as well.
<img width="796" alt="image" src="https://github.com/user-attachments/assets/27890793-d235-4799-a0a8-c17d58598c69" />
**maven-help-plugin 3.5.1**
<img width="739" alt="image" src="https://github.com/user-attachments/assets/7cbcc87c-b497-416c-8801-992618375e2a" />
Instead of ` - staged-releases (source: external)`
we could do something like ` - staged-releases (source: settings.xml)` and fall back to "external" if not present.
and ` - run-its (source: org.apache.maven.plugins:maven-help-plugin:maven-plugin:4.0.0-SNAPSHOT line 224)` if "pom".
I'd have to do some more testing to see if this would work.
--
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