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

exclude unnecessary files from jar artifact #99

Merged
merged 1 commit into from
Mar 10, 2022

Conversation

davidkron
Copy link
Contributor

When we upgraded some of our applications to Grails 4.x we had some problems with the loading of views and layouts, which we had to debug and managed to track back to this plugin. The reason was that the views (notFound.gsp, main.gsp) contained in the distribution of this plugin were discovered before those in our own plugins. We managed to work around it by defining def loadAfter = ['cache'] in our own plugins.

Nevertheless, I think this plugin should not include stuff that is not needed by or does even break the consuming application. To address this, I made the following changes:

  • remove asset-pipeline from the gradle build as the plugin doesn't provide any assets itself and therefore no unnecessary files are generated by the asset-pipeline gradle plugin
  • remove grails-gsp from the gradle build to prevent the compiled GSPs from being added to the artifact (they are only used for demo and testing purposes when the plugin is run locally)
  • remove pluginExcludes from the CacheGrailsPlugin class as this is not working anymore since Grails 3.x I think
  • exclude demo content from the generated artifact using gradle

@darxriggs
Copy link
Contributor

@darxriggs
Copy link
Contributor

@ZacharyKlein Do you have some feedback on this?

@darxriggs
Copy link
Contributor

LGTM

@puneetbehl Can you have a look at this please? Now that the default branch is 5.0.x should this pull request be retargeted?

When #123 fixes the Chrome driver version issue and has been merged, it might be a good idea to rebase this pull request on the target branch.

@darxriggs
Copy link
Contributor

In addition to this pull request I am also preparing another one. It will clean up the dependencies of the plugin to not pull in non-required dependencies (see #102).

@darxriggs
Copy link
Contributor

@davidkron Could you rebase on the 5.0.x branch and update the pull request to use it as target branch?

@davidkron davidkron changed the base branch from master to 5.0.x February 12, 2022 17:29
@davidkron
Copy link
Contributor Author

@darxriggs done

@darxriggs
Copy link
Contributor

@puneetbehl Could you have a look at this one please?

@puneetbehl puneetbehl merged commit 68c09b4 into grails:5.0.x Mar 10, 2022
@davidkron davidkron deleted the plugin-artifact-excludes branch March 10, 2022 22:58
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

Successfully merging this pull request may close these issues.

3 participants