Skip to content

Commit 4611302

Browse files
Update README.md
1 parent e2f0d5d commit 4611302

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,16 @@ Add this to the `<plugins>` section of your `pom.xml`:
5353
</executions>
5454
</plugin>
5555
```
56-
where `your-scala-dependency` is a name of your Scala dependency without the version suffix (if there are more than one, just add them with more `<param>` tags).
56+
where `your-scala-dependency` is a name of your Scala dependency **without** the version suffix (if there are more than one, just add them with more `<param>` tags). This should be the same as `artifactId` in your `<dependency>` section.
57+
58+
The plugin modifies the dependency's JAR file in your local Maven repository. It opens the jar, reads `META-INF/MANIFEST.MF` and adds to it a line:
59+
```
60+
Automatic-Module-Name: your-scala-dependency
61+
```
62+
if it is missing. If the property `Automatic-Module-Name` already exists, the plugin does nothing - we assume that in that case the dependency should already work. This prevents the plugin from modifying the same JAR file more than once.
63+
64+
#### Potential problems
65+
66+
1. If `Automatic-Module-Name` already exists but is set to a value that is still invalid for Java 9+, the plugin won't fix this.
67+
2. The plugin changes the contents of the JAR file, but it does not update the checksum. If you check it later on, it won't match.
68+
3. The plugin relies on that you don't need two versions of the same Scala library for different Scala versions. If you do (but... why?) it will modify only one of them and ignore the other.

0 commit comments

Comments
 (0)