use maven artifacts of checkstyle instead of supplying zip/jar in git repository
Builds of https://github.com/checkstyle/checkstyle are uploaded to https://repo1.maven.org/maven2/com/puppycrawl/tools/checkstyle/
Currently the source and the resulting jar ist copied manually to https://github.com/checkstyle/eclipse-cs/tree/master/net.sf.eclipsecs.checkstyle
But why?
These artifacts can be referenced (and unpacked, if you need this) in https://github.com/checkstyle/eclipse-cs/blob/master/net.sf.eclipsecs.checkstyle/pom.xml see https://maven.apache.org/plugins/maven-dependency-plugin/unpack-mojo.html
This way the eclipse-cs git repository would not increase in size by nearly 20MB for every checkstyle update.
The eclipse-cs repository currently is over 300MB, mainly because of files like these in the history:
94b486c59c05 23MiB net.sf.eclipsecs.checkstyle/checkstyle-8.20-all.jar
f7fff4c013fe 23MiB net.sf.eclipsecs.checkstyle/checkstyle-8.19-all.jar
090187882420 11MiB net.sf.eclipsecs.checkstyle/checkstyle-8.32-all.jar
494fd60dcca0 11MiB net.sf.eclipsecs.checkstyle/checkstyle-8.31-all.jar
...
2aa2941ac9a2 6,7MiB net.sf.eclipsecs.checkstyle/checkstyle-checkstyle-8.32.zip
a9735169f2e9 6,6MiB net.sf.eclipsecs.checkstyle/checkstyle-checkstyle-8.31.zip
b130dbaaf230 6,5MiB net.sf.eclipsecs.checkstyle/checkstyle-checkstyle-8.30.zip
ba0f1c2357e4 6,5MiB net.sf.eclipsecs.checkstyle/checkstyle-checkstyle-8.29.zip
...
and thats some of the files.
complete list of files in git history: history_filesizes.txt
@mickroll , if you know how to avoid this copy of jars - please contribute a PR.
@romani i noticed something weird: the contents of net.sf.eclipsecs.checkstyle/checkstyle-8.32-all.jar differs from what seems to be its source: https://github.com/checkstyle/checkstyle/releases/download/checkstyle-8.32/checkstyle-8.32-all.jar There are a lot of additional classes in there:
- commons beanutils
- commons collections
- google guava
- antlr
- javax.annotations
- ...and so on
Is there any documentation how this jar is built? update: Do you have any information on what versions of these libraries are required?
Is there any documentation how this jar is built?
https://github.com/checkstyle/checkstyle/blob/f2c914fc68363e80f5c1d2294c2e42e6fb60121f/.ci/travis/travis.sh#L174
https://github.com/checkstyle/checkstyle/blob/f2c914fc68363e80f5c1d2294c2e42e6fb60121f/release.sh#L49
Do you have any information on what versions of these libraries are required?
all of them comes from checktyle library, -all.jar should have all depended libraries embedded.
to run right after download - https://checkstyle.org/cmdline.html#Download_and_Run
-all.jar is not compliant with maven rules on jars, so it is not in maven repo, but we keep it in other repo - Github artifacts. We can probably upload it to any other repo if there is benefit.
Thanks for pointing me there. Now i see the why and how.
-all.jaris not compliant with maven rules on jars, so it is not in maven repo, but we keep it in other repo - Github artifacts. We can probably upload it to any other repo if there is benefit.
There is no need for uploading the uber-jar to maven repository, i found a way to automatically download it from github.
The tycho/maven partnership is a bit disapponting. I am new to it, but this is what i found: https://wiki.eclipse.org/Tycho/How_Tos/Dependency_on_pom-first_artifacts#It_is_not_possible_to_mix_pom-first_and_manifest-first_projects_in_the_same_reactor_build.
[Tycho] Dependency resolution happens very early during maven build, before execution of build lifecycle of any project
Scanning all dependencies even before they may have been downloaded using Maven instrumentation makes it impossible to download a file/dependency that the build itself relies upon. There is a reference to that *-all.jar in net.sf.eclipsecs.checkstyle/build.properties.
Maybe a tycho expert can help here, i am not one of those.
This reduces my help to remove the sources-zip file from the git repository, as i have done with https://github.com/checkstyle/eclipse-cs/pull/241 It's still a pretty ugly solution, but i think it is a bit better than before. Reduces update-costs by about 6,5MB or roughly 1/3.
I think we would need to use the maven-bundle-plugin to turn checkstyle into an osgi bundle which can then be imported by net.sf.eclipsecs.checkstyle. I can give this a try.
I think we would need to use the maven-bundle-plugin to turn checkstyle into an osgi bundle which can then be imported by
net.sf.eclipsecs.checkstyle. I can give this a try.
@Calixte Did you find some time to investigate in this direction?