You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the command in the title fails the build on my machine, because I have to work with some globally active profiles that are active depending on the location where I am working.
I understand that the build should use exactly one of the profiles defined in the main pom, but the check should (IMO) ignore profiles that do not originate in the pom.
mvn install -P "scala-2.12_spark-3.1.2"
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] spark-monitoring [pom]
[INFO] spark-listeners [jar]
[INFO] spark-listeners-loganalytics [jar]
[INFO]
[INFO] -----------------< com.microsoft.pnp:spark-monitoring >-----------------
[INFO] Building spark-monitoring 1.0.0 [1/3]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M2:enforce (enforce-minimum-maven-version) @ spark-monitoring ---
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M2:enforce (enforce-only-one-profile-is-active) @ spark-monitoring ---
Only one profile may be active
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for spark-monitoring 1.0.0:
[INFO]
[INFO] spark-monitoring ................................... FAILURE [ 0.467 s]
[INFO] spark-listeners .................................... SKIPPED
[INFO] spark-listeners-loganalytics ....................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.642 s
[INFO] Finished at: 2022-02-22T14:52:21+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M2:enforce (enforce-only-one-profile-is-active) on project spark-monitoring: org.apache.maven.plugins.enforcer.EvaluateBeanshell failed with message:
[ERROR] The expression "String activeProfiles = "[Profile {id: scala-2.12_spark-3.1.2, source: pom}, Profile {id: nexus, source: settings.xml}]";
[ERROR] int indexOf =activeProfiles.indexOf("Profile");
[ERROR] if (indexOf == -1) {
[ERROR] print("No active profile");
[ERROR] return false;
[ERROR] }
[ERROR]
[ERROR] if (indexOf != activeProfiles.lastIndexOf("Profile")) {
[ERROR] print("Only one profile may be active");
[ERROR] return false;
[ERROR] }
[ERROR]
[ERROR] return true;" is not true.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I suggest the check is updated to look for the number of profiles with a source: pom instead of just any active profile.
The text was updated successfully, but these errors were encountered:
Running the command in the title fails the build on my machine, because I have to work with some globally active profiles that are active depending on the location where I am working.
I understand that the build should use exactly one of the profiles defined in the main pom, but the check should (IMO) ignore profiles that do not originate in the pom.
I suggest the check is updated to look for the number of profiles with a
source: pom
instead of just any active profile.The text was updated successfully, but these errors were encountered: