Skip to content

Commit

Permalink
Merge pull request #378 from devgateway/feature/4.x/open-some-reflect…
Browse files Browse the repository at this point in the history
…ive-access

feature/4.x/open some reflective access
  • Loading branch information
nmandrescu authored Jun 1, 2021
2 parents b29dd32 + 6248a0e commit 57c22b2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
7 changes: 3 additions & 4 deletions forms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,12 @@ This module is packaged as a fat jar. For testing purposes, the default configur
You can run the forms module just as any module of dg-toolkit:


`java -Dspring.profiles.active=dev -jar target/forms-0.0.1-SNAPSHOT.jar --illegal-access=warn`
`java @argfile.txt -Dspring.profiles.active=dev -jar target/forms-0.0.1-SNAPSHOT.jar`

This will start everything, including an embedded Tomcat Web server and all the services attached it.

`--illegal-access=warn` is needed in JDK 16 until other dependencies are migrated.
Use `--illegal-access=permit` to keep the logs clear from such warnings.
See [#364](https://github.com/devgateway/dg-toolkit/issues/364).
`@argfile.txt` stores additional VM arguments, in particular to grant reflective access to
specific modules for other modules. Use `@$MODULE_DIR$/src/main/resources/argfile.txt` in IDE.

# Using Spring Boot Developer Tools

Expand Down
4 changes: 4 additions & 0 deletions forms/src/main/resources/argfile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
--add-opens java.naming/javax.naming=ALL-UNNAMED
--add-opens java.base/java.lang.reflect=ALL-UNNAMED
--add-opens java.base/java.lang.ref=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>16</source>
<target>16</target>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
</plugins>
Expand Down
7 changes: 3 additions & 4 deletions web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ The web module is part of its larger dg-toolkit parent build, so you need to bui

Because it gets packaged as a fat jar, starting it is piece of cake:

`java -jar target/web-0.0.1-SNAPSHOT.jar --illegal-access=warn`
`java @argfile.txt -jar target/web-0.0.1-SNAPSHOT.jar`

`--illegal-access=warn` is needed in JDK 16 until other dependencies are migrated.
Use `--illegal-access=permit` to keep the logs clear from such warnings.
See [#364](https://github.com/devgateway/dg-toolkit/issues/364).
`@argfile.txt` stores additional VM arguments, in particular to grant reflective access to
specific modules for other modules.

This will start everything, including an embedded Tomcat Web server and all the services attached it.

Expand Down

0 comments on commit 57c22b2

Please sign in to comment.