Skip to content
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

Allow tweaking WAR generation from consumers #193

Closed
jamietanna opened this issue Oct 27, 2021 · 2 comments
Closed

Allow tweaking WAR generation from consumers #193

jamietanna opened this issue Oct 27, 2021 · 2 comments

Comments

@jamietanna
Copy link

Dependencies

N/A

Feature Request

Currently, the Job DSL Plugin attempts to copy files into the produced WAR.

This doesn't work, as we have a hardcoded directory configured for the WAR configuration

Causes https://issues.jenkins.io/browse/JENKINS-66988

jamietanna added a commit to jenkinsci/job-dsl-plugin that referenced this issue Oct 27, 2021
As mentioned in JENKINS-66988, we currently are not producing the API
Viewer in the built plugin.

This is due to [0], in which the JPI plugin ignores any processing of
the WAR that we do separately.

As an intermediate solution, we can make sure that we copy the files
into the `src/main/webapp` directory, so it is present for the plugin.

This requires that we then exclude the files from Git, as we want them
to only be generated, but we need to make sure that `config.json` is
still included.

Finally, we make sure that the `jpi` task depends on the copying of
files, for standalone building of the plugin, and the `copyApiViewer`
depends on the build process for the `api-viewer` project.

[0]: jenkinsci/gradle-jpi-plugin#193
sghill added a commit to sghill/job-dsl-plugin that referenced this issue Oct 27, 2021
@sghill
Copy link

sghill commented Oct 27, 2021

Hi @jamietanna, this should already be possible. I created jenkinsci/job-dsl-plugin#1244 to demonstrate how.

4f4495a (first released in v0.39.0 of the jpi plugin) stopped applying the war plugin in favor of defining a jpi task that was of type War. Configuring task jpi instead of war should be all that's needed.

Thanks for raising this issue. It was missing from the migration guide (#139) and has since been added.

@jamietanna
Copy link
Author

Closing, as this is a good fix for it, appreciate the PR and help 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants