[
https://issues.apache.org/jira/browse/MNG-7519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Osipov closed MNG-7519.
-------------------------------
Resolution: Incomplete
Does not even build:
{noformat}
[INFO] --- spring-boot-maven-plugin:2.7.1:repackage (repackage) @ sampleservice
---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.587 s
[INFO] Finished at: 2022-07-21T20:50:14+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.springframework.boot:spring-boot-maven-plugin:2.7.1:repackage (repackage)
on project sampleservice: Execution repackage of goal
org.springframework.boot:spring-boot-maven-plugin:2.7.1:repackage failed:
Unable to find main class -> [Help 1]
{noformat}
PS: Move to a newer Maven version.
> Issue with profile activation using environment variable
> --------------------------------------------------------
>
> Key: MNG-7519
> URL: https://issues.apache.org/jira/browse/MNG-7519
> Project: Maven
> Issue Type: Bug
> Components: Profiles
> Affects Versions: 3.6.3
> Reporter: Ravinderjeet
> Priority: Major
> Attachments: pom.xml
>
>
> Hello Apache Maven team,
> For one of my project requirement, i configured separate build processes
> using two different profiles in the pom.xml. One of the profile/build process
> is activated if certain environment variable is present and other profile is
> activated, if that certain variable is not set in the environment.
> I tried debugging and testing the profile using both commands :
> # mvn help:active-profiles
> # mvn help:all-profiles
> Both of the above commands are giving desired results on execution with both
> setting/un-setting of environment variable. Correct profile is getting
> activated on the presence of environment variable and vice-versa.
> But on giving the command "mvn clean install", both of the profiles are
> getting activated which is causing the incorrect build results.
> Please find attached the pom.xml being use here and help in look into this
> issue.
> Thanks in advance!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)