-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java 9 support #47
Comments
Yes, unfortunately at the moment ArchUnit doesn't support Java 9 (yet). This is not only the way it detects classes on the classpath (relying on |
I've pushed a first attempt to support Java 9, can you test this? You have to add the SNAPSHOT repository:
and include the Java 9 Dependency:
|
With this hotfix, the class files of my Java9 project are scanned and broken architecture rules are reported by ArchUnit tests correctly. |
Okay, since I haven't gotten any negative feedback, I'll merge this back into master in a couple of days. So if anyone has a reason why this approach doesn't work, speak now or forever hold your peace 😉 |
Is there a release planned for this? I want to use ArchUnit but can't because my project is on Java 9. |
I have to admit, I'm feeling the urge to shout out some excuses like "deadlines in my project" or my bad idea to release this together with JUnit 5 support, but I'll refrain from it 😉 You're absolutely right, this should have been released long ago, so I proudly present ArchUnit 0.8.0 I'd be happy about any feedback,
Unfortunately my bread and butter is in legacy, so I have no big real life project at hand, where I could try out, how this feels with many big Java 9 modules, etc. |
Wow, that was fast! Thanks! 😃 |
Glad to hear that it works 😃 |
You could consider adding an Automatic-Module-Name to your Manifest: http://branchandbound.net/blog/java/2017/12/automatic-module-name/ I'll let you know if I encounter anything. In the mean time, Travis has just reported successful builds on various JVMs for my first ArchUnit tests: https://travis-ci.org/jqno/equalsverifier/builds/380319383 🎉 |
Great 😃 |
I'm sorry, you're right, it's there. 👍 |
Bumps \[gradle/wrapper-validation-action\](https://github.com/gradle/wrapper-validation-action) from 1.0.4 to 1.0.5. # Release notes from [gradle/wrapper-validation-action's releases](https://github.com/gradle/wrapper-validation-action/releases): > ## v1.0.5 > ------ > > ### Gradle Wrapper Validation > > * Update dependencies for Node 16 ([#53](https://github-redirect.dependabot.com/gradle/wrapper-validation-action/issues/53)) > * Update dependencies with security vulnerabilities ([#67](https://github-redirect.dependabot.com/gradle/wrapper-validation-action/issues/67)) > * Update various other dependencies ([#45](https://github-redirect.dependabot.com/gradle/wrapper-validation-action/issues/45), [#47](https://github-redirect.dependabot.com/gradle/wrapper-validation-action/issues/47), [#48](https://github-redirect.dependabot.com/gradle/wrapper-validation-action/issues/48), [#54](https://github-redirect.dependabot.com/gradle/wrapper-validation-action/issues/54)) # Commits * [`55e685c`](gradle/wrapper-validation-action@55e685c) Dependencies * [`f232d2e`](gradle/wrapper-validation-action@f232d2e) Merge branch 'master' into releases/v1 * [`9aa31f2`](gradle/wrapper-validation-action@9aa31f2) Merge pull request [#67](https://github-redirect.dependabot.com/gradle/wrapper-validation-action/issues/67) from gradle/dd/update-deps * [`5d6ea91`](gradle/wrapper-validation-action@5d6ea91) Extend timeout for Jest tests * [`db7df1f`](gradle/wrapper-validation-action@db7df1f) Update dependencies with vulnerabilities * [`859c332`](gradle/wrapper-validation-action@859c332) Merge pull request [#53](https://github-redirect.dependabot.com/gradle/wrapper-validation-action/issues/53) from KengoTODA/node-16 * [`d0ffc95`](gradle/wrapper-validation-action@d0ffc95) ci: install node v16 instead of v12 * [`6793660`](gradle/wrapper-validation-action@6793660) Merge remote-tracking branch 'upstream/master' into node-16 * [`781fa15`](gradle/wrapper-validation-action@781fa15) Merge pull request [#54](https://github-redirect.dependabot.com/gradle/wrapper-validation-action/issues/54) from gradle/dependabot/npm\_and\_yarn/ansi-regex-5.0.1 * [`7606dd0`](gradle/wrapper-validation-action@7606dd0) Bump ansi-regex from 5.0.0 to 5.0.1 Additional commits viewable in [compare view](gradle/wrapper-validation-action@v1.0.4...v1.0.5)
With Java 9, the application class loader isn't an instance of URLClassLoader any more, but ArchUnit searches for a class loader of this type.
So ArchUnit doesn't find any classes in class path.
So no classes are checked and all tests pass successfully.
ArchUnit must be modified to support both Java 8 or lower and Java 9 class loading mechanism.
The text was updated successfully, but these errors were encountered: