Skip to content

Commit e2f0d5d

Browse files
Update README.md
1 parent 3465fbf commit e2f0d5d

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,26 @@ You compile the project and you see this warning:
3131
... and then when you run your program, it crashes when it tries to access the given Scala dependency.
3232
Paraphrasing [this answer on Stack Overflow](https://stackoverflow.com/questions/48714633/automatic-module-name-containing-number/48714979#48714979), since Java 9, Java does not recognize suffixes in modules names like `_2.13` as version numbers and treat them as integral parts of modules names. So, when your project tries to use a class from the Scala dependency, it will look for `your.scala.dependency.2.13` instead of just `your.scala.dependency`, it will fail to do it, and it will crash.
3333

34+
### Usage
3435

36+
Add this to the `<plugins>` section of your `pom.xml`:
37+
```
38+
<plugin>
39+
<groupId>io.github.makingthematrix</groupId>
40+
<artifactId>scala-suffix-maven-plugin</artifactId>
41+
<version>0.0.3</version>
42+
<configuration>
43+
<libraries>
44+
<param>your-scala-dependency</param>
45+
</libraries>
46+
</configuration>
47+
<executions>
48+
<execution>
49+
<goals>
50+
<goal>suffix</goal>
51+
</goals>
52+
</execution>
53+
</executions>
54+
</plugin>
55+
```
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).

0 commit comments

Comments
 (0)