Skip to content

Conversation

@michael-simons
Copy link
Contributor

As the shaded version is the default version and we can't suddenly not shade by default, we need to jump through some loops.

Note: A solution using a classifier was discarded as it would require two different poms (a normal one and the dependency-reduced one for the shades) and this is strongly discouraged.

  • The artifactId is concatened with a deploymentType property which is by default empty
  • Native image properties files are duplicated (there is no good transformer for them), one includes the fully qualified names of the original resources, the other one of the shaded ones
  • The shaded ones are excluded by default from the resources
  • maven-shade-plugin has been moved into a profile that is active unless skipShade is true
  • maven-shade-plugin will exclude the non-shaded native shims and include the shaded ones now
  • The slim profile will be activated when shading is deactived, setting deploymentType to slim

For the final deployment via CI something like this will be necesssary (two steps)

Deploy driver and the rest as used to:

mvn clean deploy

Deploy the slim version only

mvn  -DskipShade -pl org.neo4j.driver:neo4j-java-driver clean deploy

As the shaded version is the default version and we can't suddenly not shade by default, we need to jump through some loops.

Note: A solution using a classifier was discarded as it would require two different poms (a normal one and the dependency-reduced one for the shades) and this is strongly discouraged.

- The artifactId is concatened with a `deploymentType` property which is by default empty
- Native image properties files are duplicated (there is no good transformer for them), one includes the fully qualified names of the original resources, the other one of the shaded ones
- The shaded ones are excluded by default from the resources
- `maven-shade-plugin` has been moved into a profile that is active unless `skipShade` is true
- `maven-shade-plugin` will exclude the non-shaded native shims and include the shaded ones now
- The slim profile will be activated when shading is deactived, setting deploymentType to `slim`

For the final deployment via CI something like this will be necesssary (two steps)

Deploy driver and the rest as used to:

```
mvn clean deploy
```

Deploy the slim version only

```
mvn  -DskipShade -pl org.neo4j.driver:neo4j-java-driver clean deploy
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants