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

Fix exclusion for LanguageServer uber jar assembly #3143

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,15 @@
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>plugin.properties</resource>
</transformer>
<transformer
<transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer">
</transformer>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>**/*.java</exclude>
<exclude>META-INF/INDEX.LIST</exclude>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@
<overWriteIfNewer>true</overWriteIfNewer>
<excludeTransitive>true</excludeTransitive>
<excludeArtifactIds>
com.ibm.icu,
org.apache.ant,
org.apache.commons.lang,
org.apache.commons.logging,
icu4j,
commons-logging,
org.eclipse.core.commands,
org.eclipse.core.contenttype,
org.eclipse.core.expressions,
Expand Down Expand Up @@ -120,7 +118,7 @@
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>plugin.properties</resource>
</transformer>
<transformer
<transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer">
</transformer>
</transformers>
Expand All @@ -141,6 +139,7 @@
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>**/*.java</exclude>
<exclude>META-INF/INDEX.LIST</exclude>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@
<overWriteIfNewer>true</overWriteIfNewer>
<excludeTransitive>true</excludeTransitive>
<excludeArtifactIds>
com.ibm.icu,
org.apache.ant,
org.apache.commons.lang,
org.apache.commons.logging,
icu4j,
commons-logging,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmmm in my tests this was not sufficient.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From this comment I assume you only checked the ls jar didn't you?
#3137 (comment)

But to me it looks like the maven-dependencies-plugin only copies to the target/libs folder whoose content is then installed as dependency and then shaded into the uber jar.
And the shading seems to consider all dependencies (I'm not on expert on this), which again includes e.g. commons-logging.
I have to admit I don't know what the ultimate goal was with the exclusion, but it definitively prevents the copying to the target/libs folder. It currently does not prevent the inclusion into the ls jar.

Copy link
Contributor

@cdietrich cdietrich Aug 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes (jar tf), but on the base of your xtext/commons-logging branch

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(start runtime eclipse, create new xtext project)

org.eclipse.core.commands,
org.eclipse.core.contenttype,
org.eclipse.core.expressions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,8 @@ class IdeProjectDescriptor extends ProjectDescriptor {
<overWriteIfNewer>true</overWriteIfNewer>
<excludeTransitive>true</excludeTransitive>
<excludeArtifactIds>
com.ibm.icu,
org.apache.ant,
org.apache.commons.lang,
org.apache.commons.logging,
icu4j,
commons-logging,
org.eclipse.core.commands,
org.eclipse.core.contenttype,
org.eclipse.core.expressions,
Expand Down Expand Up @@ -206,7 +204,7 @@ class IdeProjectDescriptor extends ProjectDescriptor {
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>plugin.properties</resource>
</transformer>
<transformer
<transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer">
</transformer>
</transformers>
Expand All @@ -229,6 +227,7 @@ class IdeProjectDescriptor extends ProjectDescriptor {
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>**/*.java</exclude>
<exclude>META-INF/INDEX.LIST</exclude>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,19 +413,11 @@ public PomFile pom() {
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t\t\t\t\t");
_builder.append("com.ibm.icu,");
_builder.append("icu4j,");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t\t\t\t\t");
_builder.append("org.apache.ant,");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t\t\t\t\t");
_builder.append("org.apache.commons.lang,");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t\t\t\t\t");
_builder.append("org.apache.commons.logging,");
_builder.append("commons-logging,");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t\t\t\t\t");
Expand Down Expand Up @@ -675,7 +667,7 @@ public PomFile pom() {
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t\t\t");
_builder.append("<transformer ");
_builder.append("<transformer");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t\t\t\t");
Expand Down Expand Up @@ -802,6 +794,10 @@ public PomFile pom() {
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t\t\t\t\t");
_builder.append("<exclude>**/*.java</exclude>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t\t\t\t\t");
_builder.append("<exclude>META-INF/INDEX.LIST</exclude>");
_builder.newLine();
_builder.append("\t\t");
Expand Down
Loading