Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Next
-
None
-
None
Description
Here is a dummy code of an action from a maven based NetBeans module: https://pastebin.com/bh2HmtB5. As you can see, i use FileObject. First I get the warning inside of the Java editor:
Package from transitive module dependency referenced, declare a direct dependency to fix.
When I try to build the project I got this error:
[INFO] NBM Plugin generates manifest [ERROR] Project uses classes from transitive module org.netbeans.api:org-openide-filesystems:jar:RELEASE82 which will not be accessible at runtime. [INFO] To fix the problem, add this module as direct dependency. For OSGi bundles that are supposed to be wrapped in NetBeans modules, use the useOSGiDependencies=false parameter
Yes I already know how to fix this, but if this is an error, right after I created a maven based netbeans module and I have to fix it by my own, because of the transitive dependency, why is it not default a direct dependency? I mean I have to fix it anyway? Is there a real reason, where it is possible that it stays as a transitive dependency?
Due to that this is a must have to fix it manually, to trigger the build, IMHO it is a have to, to make it default, to not getting errors, when I add this dependency.
Cheers
Chris