Skip to content

Commit

Permalink
Only compress and build sources jar for release
Browse files Browse the repository at this point in the history
This patch attempts to do the following:

* Avoid building the sources jar during shading, since it adds
  time and produces many duplicate file warnings. We explicitly
  re-activate the sources jar in the release profile (and others).
* Avoid compression of the shaded jar except during release and
  other profiles. I'm not sure this is working right, because it
  appears the files are still getting compressed.
  • Loading branch information
headius committed Jul 31, 2024
1 parent 3916604 commit 4414e90
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
6 changes: 4 additions & 2 deletions shaded/pom.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
transformers: [ {'@implementation' => 'org.apache.maven.plugins.shade.resource.ManifestResourceTransformer',
mainClass: 'org.jruby.Main',
manifestEntries: {'Automatic-Module-Name' => 'org.jruby.dist'}}],
createSourcesJar: true
createSourcesJar: false,
compress: false
)
end

Expand Down Expand Up @@ -82,7 +83,8 @@
filters: [
{artifact: 'com.headius:invokebinder', excludes: '**/module-info.class'}
],
createSourcesJar: true
createSourcesJar: true,
compress: true
)
end
end
Expand Down
12 changes: 11 additions & 1 deletion shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ DO NOT MODIFY - GENERATED CODE
</manifestEntries>
</transformer>
</transformers>
<createSourcesJar>true</createSourcesJar>
<createSourcesJar>false</createSourcesJar>
<compress>false</compress>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -157,6 +158,7 @@ DO NOT MODIFY - GENERATED CODE
</filter>
</filters>
<createSourcesJar>true</createSourcesJar>
<compress>true</compress>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -211,6 +213,7 @@ DO NOT MODIFY - GENERATED CODE
</filter>
</filters>
<createSourcesJar>true</createSourcesJar>
<compress>true</compress>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -265,6 +268,7 @@ DO NOT MODIFY - GENERATED CODE
</filter>
</filters>
<createSourcesJar>true</createSourcesJar>
<compress>true</compress>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -319,6 +323,7 @@ DO NOT MODIFY - GENERATED CODE
</filter>
</filters>
<createSourcesJar>true</createSourcesJar>
<compress>true</compress>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -373,6 +378,7 @@ DO NOT MODIFY - GENERATED CODE
</filter>
</filters>
<createSourcesJar>true</createSourcesJar>
<compress>true</compress>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -427,6 +433,7 @@ DO NOT MODIFY - GENERATED CODE
</filter>
</filters>
<createSourcesJar>true</createSourcesJar>
<compress>true</compress>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -481,6 +488,7 @@ DO NOT MODIFY - GENERATED CODE
</filter>
</filters>
<createSourcesJar>true</createSourcesJar>
<compress>true</compress>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -535,6 +543,7 @@ DO NOT MODIFY - GENERATED CODE
</filter>
</filters>
<createSourcesJar>true</createSourcesJar>
<compress>true</compress>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -589,6 +598,7 @@ DO NOT MODIFY - GENERATED CODE
</filter>
</filters>
<createSourcesJar>true</createSourcesJar>
<compress>true</compress>
</configuration>
</execution>
</executions>
Expand Down

0 comments on commit 4414e90

Please sign in to comment.