org.immutables.tools.tools

Tools for Immutables that to be published as separate artifacts

License

License

Categories

Categories

Immutables Application Layer Libs Code Generators
GroupId

GroupId

org.immutables.tools
ArtifactId

ArtifactId

tools
Last Version

Last Version

4
Release Date

Release Date

Type

Type

pom
Description

Description

org.immutables.tools.tools
Tools for Immutables that to be published as separate artifacts
Project URL

Project URL

https://github.com/immutables/tools
Project Organization

Project Organization

The Immutables.org authors
Source Code Management

Source Code Management

https://github.com/immutables/tools.git

Download tools

Filename Size
tools-4.pom 3 KB
Browse

How to add to project

<!-- https://jarcasting.com/artifacts/org.immutables.tools/tools/ -->
<dependency>
    <groupId>org.immutables.tools</groupId>
    <artifactId>tools</artifactId>
    <version>4</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/org.immutables.tools/tools/
implementation 'org.immutables.tools:tools:4'
// https://jarcasting.com/artifacts/org.immutables.tools/tools/
implementation ("org.immutables.tools:tools:4")
'org.immutables.tools:tools:pom:4'
<dependency org="org.immutables.tools" name="tools" rev="4">
  <artifact name="tools" type="pom" />
</dependency>
@Grapes(
@Grab(group='org.immutables.tools', module='tools', version='4')
)
libraryDependencies += "org.immutables.tools" % "tools" % "4"
[org.immutables.tools/tools "4"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • maven-shade-plugin

maven-shade-plugin

Customized version of maven-shade-plugin.

<groupId>org.immutables.tools</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>4</version>

1. Relocation with $ uglyfication

Allows class relocation patterns to contain $ sign. If pattern ends with $ sign, the dollar sign will be prepended in front of class names. This effectively prevents clashed during code completion.

<relocation>
  <pattern>com.google.common</pattern>
  <shadedPattern>com.my.internal.$guava$</shadedPattern>
</relocation>

The above pattern will result in ImmutableList being relocated as

com.my.internal.$guava$.collect.$ImmutableList

2. ServiceResourceTransformer that actually works properly

  • Merges META-INF/services/* entries with deduplication of lines
  • Applied class relocations to merged entries

3. Minimize Jar that works properly

  • Does not remove used classes: fixed transitive class dependencies problem.
  • Does not remove classes used in META-INF/services/* for used service types. Removes META-INF/services/* for unused service types. Explicitly include META-INF/services/** in filters to not delete such files and make all provider implementation types marked as non-removable.

I would love someone to contribute/reimplement those changes to the original Apache Maven maven-shade-plugin. I just couldn't afford time to dive into processes or infrastructure there.

org.immutables.tools

Immutables

Java toolkits around immutability, annotation processing and high performance

Versions

Version
4
3
2