Skip to content

Commit

Permalink
remove duplicate checkstyle.jar
Browse files Browse the repository at this point in the history
* remove and gitignore the checkstyle.jar in eclipsecs.core
* have only the copy in eclipsecs.checkstyle remain
* export packages of transitive dependencies from the
eclipsecs.checkstyle project. this is not a good practice, but
represents exactly what happened before: consuming the third party
dependencies from the checkstyle library

fixes checkstyle#385

In a follow-up change the re-exported packages should be removed, and
instead be replaced by taking the respective libraries into the target
platform.
  • Loading branch information
Bananeweizen committed Apr 2, 2024
1 parent eec9691 commit 73222fe
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
7 changes: 6 additions & 1 deletion net.sf.eclipsecs.checkstyle/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-17
Export-Package: .,
com.google.common.base,
com.google.common.cache,
com.google.common.io,
com.puppycrawl.tools.checkstyle,
com.puppycrawl.tools.checkstyle.api;
uses:="org.xml.sax.helpers,
Expand All @@ -31,7 +34,9 @@ Export-Package: .,
com.puppycrawl.tools.checkstyle.checks.whitespace,
com.puppycrawl.tools.checkstyle.filefilters,
com.puppycrawl.tools.checkstyle.filters,
com.puppycrawl.tools.checkstyle.utils
com.puppycrawl.tools.checkstyle.meta,
com.puppycrawl.tools.checkstyle.utils,
org.apache.commons.lang3
Bundle-ClassPath: .,
checkstyle-10.14.2-all.jar
Automatic-Module-Name: net.sf.eclipsecs.checkstyle
1 change: 0 additions & 1 deletion net.sf.eclipsecs.core/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
</classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="lib/checkstyle-10.14.2-all.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
2 changes: 2 additions & 0 deletions net.sf.eclipsecs.core/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# only the eclipsecs.checkstyle project shall contain a copy of the checkstyle jar
**/checkstyle*.jar
3 changes: 1 addition & 2 deletions net.sf.eclipsecs.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ Bundle-ManifestVersion: 2
Bundle-SymbolicName: net.sf.eclipsecs.core;singleton:=true
Bundle-Version: 10.14.2.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ClassPath: .,
lib/checkstyle-10.14.2-all.jar
Bundle-ClassPath: .
Bundle-Activator: net.sf.eclipsecs.core.CheckstylePlugin
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor
Expand Down
2 changes: 0 additions & 2 deletions net.sf.eclipsecs.core/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ source.. = src/
jars.compile.order = .
bin.includes = .,\
META-INF/,\
lib/,\
license/,\
plugin.xml,\
schema/,\
lib/checkstyle-10.14.2-all.jar,\
OSGI-INF/
javacDefaultEncoding.. = UTF-8
Binary file removed net.sf.eclipsecs.core/lib/checkstyle-10.14.2-all.jar
Binary file not shown.
4 changes: 1 addition & 3 deletions upgrade-version.build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ Apply all necessary manual code changes now.

<!-- download new version -->
<get src="https://github.com/checkstyle/checkstyle/releases/download/checkstyle-${toVersion}/checkstyle-${toVersion}-all.jar"
dest="${basedir}/net.sf.eclipsecs.checkstyle/checkstyle-${toVersion}-all.jar"/>
<copy file="${basedir}/net.sf.eclipsecs.checkstyle/checkstyle-${toVersion}-all.jar"
tofile="${basedir}/net.sf.eclipsecs.core/lib/checkstyle-${toVersion}-all.jar"/>
dest="${basedir}/net.sf.eclipsecs.checkstyle/checkstyle-${toVersion}-all.jar"/>
</target>

</project>

0 comments on commit 73222fe

Please sign in to comment.