Skip to content
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

Classpath directory not found in multi-module Gradle project setup #38

Open
ucguy4u opened this issue Nov 25, 2024 · 0 comments
Open

Classpath directory not found in multi-module Gradle project setup #38

ucguy4u opened this issue Nov 25, 2024 · 0 comments

Comments

@ucguy4u
Copy link

ucguy4u commented Nov 25, 2024

I encountered an issue while using the ArchUnit Gradle Plugin in a multi-module project. The plugin fails to locate the classpath directory and throws a NoSuchFileException. Below are the details of the error:

Classpath ./config-state-store-example/build/classes/java/main doesn't exist : loading all classes from root, ie ./config-state-store-example/build/classes/java/main even though it's probably not what you want to achieve. Enable debug logs in your build to see the list of actual resources being loaded and analyzed by the plugin.

java.nio.file.NoSuchFileException: /Users/chauhanuday/workspace/poc/config-state-store-example/build/classes/java/main
    at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)

Steps to Reproduce:

Create a multi-module Gradle project.
Apply the ArchUnit Gradle Plugin to one or more modules.
Run the Gradle build using ./gradlew build.
Expected Behavior: The plugin should correctly identify the classpath directories for each module and analyze them without errors.

Actual Behavior: The plugin fails to find the classpath directory (build/classes/java/main) and throws a NoSuchFileException. It then attempts to load all classes from the root directory, which is not the intended behavior.

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

No branches or pull requests

1 participant