[ 
https://issues.apache.org/jira/browse/NETBEANS-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16662276#comment-16662276
 ] 

Christian Lenz commented on NETBEANS-1540:
------------------------------------------

Hey Eric,

thx for explanation, I knew that I don't have enough knowledge to understand 
that, but still it doesn't feels correct.
IMHO than the warning should not be a warning, but an error as a hint, with a 
fix to add exact this dependency, in my example org-openide-filesystems to the 
pom. Nothing else will do the action on right clicking the dependency: "Declare 
as direct dependency". That would even more nicer than not to build. And IMHO 
the warning is wrong, because it is still an error whilc building. So with an 
error you know smth went wrong like the normal errors "can't find symbol 
FileObject", when you forget to import it. You have a fix to import it and 
everything is fine.

How does that sounds? Seems easy to change the warning to an error and makes 
much more sense.


Cheers

Chris

> Declare as direct dependency should be default for transitive dependencies
> --------------------------------------------------------------------------
>
>                 Key: NETBEANS-1540
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-1540
>             Project: NetBeans
>          Issue Type: Improvement
>          Components: projects - Maven
>    Affects Versions: Next
>            Reporter: Christian Lenz
>            Priority: Major
>
> 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:
> {code}
> Package from transitive module dependency referenced, declare a direct 
> dependency to fix.
> {code}
> When I try to build the project I got this error: 
> {code}
> [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
> {code}
> 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



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to