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

Martin commented on NETBEANS-2397:
----------------------------------

The problem is that *the module mechanisms of java modular system are not 
working (when using maven projects)*, in particular the *java KEYWORDS _provide 
with_ are not working*.

The ServiceLoader in mavenproject1 must provide one instance in its iterator - 
the one provided by mavenproject2 with SamplImpl, but it does not, it does 
return 0 instances.

*You can reproduce the problem by either running or debugging mavenproject3 
(there is one main, it does make one call).*

When using the exact same project setup with the exact same files, but using 
classic netbeans ant project, everything runs fine.

So I think it is a good guess to assume that something with the linker is not 
correct.

 

I really do not know how to explain more. The sample project is already nailing 
it down to the very bottom.

 

 

I hope that helps to remove this issue. I have used NB for years and loving it. 
But right now, *I can neither run or debug my code with NB.* That's why I made 
this a "Blocker".

> Java's provide ... with NOT working in maven projects
> -----------------------------------------------------
>
>                 Key: NETBEANS-2397
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-2397
>             Project: NetBeans
>          Issue Type: Bug
>    Affects Versions: 11.0
>         Environment: Windows10
>            Reporter: Martin
>            Priority: Blocker
>         Attachments: netbeans11_sample.mp4, sample.zip, vscode_sample.mp4
>
>
> Please check the attached sample.
>  
> The sample is working with VS Code and IntelliJ Idea.
> Also working when doing with "old school" netbeans (ant) projects.
>  
> Please fix urgently!
>  
> Some linker problem?
>  
> --------
> Problem is
>  * mavenproject1 uses I_Sample
>  * mavenproject2 provides I_Sample with SampleImpl
>  * mavenproject3 requires mavenproject1 and mavenproject2
>  
> When you debug or run mavenproject3
>  * it will call mavenproject1.Sample.load
>  * since mavenproject2 is required, the serviceloader must return the loaded 
> SampleImpl instance BUT IT DOES NOT
>  
>  



--
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