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

maven-plugin-development Gradle Plugin for Maven Plugin #554

Closed
JLLeitschuh opened this issue Apr 6, 2020 · 7 comments
Closed

maven-plugin-development Gradle Plugin for Maven Plugin #554

JLLeitschuh opened this issue Apr 6, 2020 · 7 comments

Comments

@JLLeitschuh
Copy link
Member

There is now a Gradle Plugin to help Gradle developers produce Maven plugins.

https://github.com/britter/maven-plugin-development

If there's a desire to unify the build, this may help by allowing us to simplify the plugin development for this project: https://github.com/diffplug/spotless/tree/master/plugin-maven

@nedtwigg
Copy link
Member

nedtwigg commented May 3, 2020

@lutovich just in case you didn't see this. I have no opinion either way.

@lutovich
Copy link
Contributor

lutovich commented May 3, 2020

Interesting! This plugin could potentially simplify the build of spotless-maven-plugin

@nedtwigg
Copy link
Member

Thanks to buildcache, our standard CI build is now ~45 seconds. But the maven builds are 7 - 10 minutes, every time. e.g. https://app.circleci.com/pipelines/github/diffplug/spotless/734/workflows/eb22b955-dd19-40a8-aaa3-bd6519d9ac84

The linked plugin recently added buildcache support: britter/maven-plugin-development#7

It's not high on my todo, but it would be nice to slurp this in bring our average build times down a ton. Especially for new contributors, a clean build of a fresh clone takes a really long time, and most of that is maven.

@welandaz
Copy link
Contributor

welandaz commented Jun 20, 2022

Hey everyone!
Continuing discussion started here - #1237

So the maven-plugin build is not fully cacheable. That's primarily because the dependencies needed for the build are downloaded into "localMavenRepository" folder every time the build is triggered (even if the inputs/outputs are specified properly).
From what I can tell, the root cause lies in the "_remote.repositories" file, which contains date time and its changing from build to build.
Example for antlr:
#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. #Mon Jun 13 20:05:38 EEST 2022 antlr-2.7.2.jar>central= antlr-2.7.2.pom>central=

In order to fix this, that whole folder has to be cached (although normal dependency cache would probably be a better solution and a proper one I guess).
Alternatively, the plugin mentioned above could solve this altogether, but I haven't checked it yet.

If you'd like, I can have a look at it and try to experiment with the build using the plugin.

@nedtwigg
Copy link
Member

I would love a PR for this, thanks very much for investigating!

@nedtwigg
Copy link
Member

I'm gonna take a whack at this.

@nedtwigg
Copy link
Member

First publish of this new build is plugin-maven 2.31.0.

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

No branches or pull requests

4 participants