New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-51214] - Allow invoking Custom WAR Packager Maven Plugin in the CLI Mode #26
Conversation
…the CLI Mode Also allows passing installArtifacts which is helpful in this mode
if (batchMode) { | ||
cfg.buildSettings.addMavenOption("--batch-mode"); | ||
cfg.buildSettings.addMavenOption("-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is weird. Delete the option IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is it weird?
It may be a bit hackish, but it works if a user does not pass proper settings.xml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the calling script should be responsible for including -B
among general Maven options. As to the log option, I consider this a workaround pending JENKINS-51182.
@Parameter(property = "version") | ||
public @CheckForNull String warVersion; | ||
|
||
@Parameter(property = "tmpDir") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW if you add Javadoc for these things, and configure your POM to generate HelpMojo
, you will make it easier for people to invoke this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For sure. Created https://issues.jenkins-ci.org/browse/JENKINS-51259
Added the options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest deleting batchMode
and replacing with a more general option mavenOptions
.
@jglick It is not a newly introduced thing in this commit, so I would prefer to keep it as is. Anyway, the documentation is pretty explicit that Maven settings is preferable. Later we can introduce the Maven settings option of course |
Will merge it as is and create a follow-up ticket |
Also allows passing installArtifacts which is helpful in this mode
Example:
@reviewbybees @raul-arabaolaza