More progress and I think I figured out why I had to install modules into my 
own local .m2

I’m using a “settings.xml" file from work that is mirroring all maven central 
libraries.

We are using version 3.33.1-01 and it looks like it doesn’t support 
“downloadable remote indexing” so Netbeans wasn’t seeing the libraries.

The IDE is giving me an error:

org.apache.maven.wagon.ResourceDoesNotExistException: Resource missing at 
https://nexus.mycompany.com/content/groups/public/.index/nexus-maven-repository-index.properties
 404 .index/nexus-maven-repository-index.properties
java.io.FileNotFoundException: Resource nexus-maven-repository-index.properties 
does not exist

So, the IDE isn’t updating it’s indexes.

I saw this post and even a comment from Jesse Glick about his surprise and 
saying Netbeans Maven won’t be able to work properly.

https://stackoverflow.com/questions/41467162/how-to-download-remote-index-in-nexus-oss-3-2
 
<https://stackoverflow.com/questions/41467162/how-to-download-remote-index-in-nexus-oss-3-2>


Hope this helps others..

- Tim



> On Sep 25, 2021, at 4:52 PM, Tim Mullé <tmu...@gmail.com> wrote:
> 
> I made some progress..I started over following the following links and now 
> have an application that recognizes my custom project.
> 
> https://dzone.com/articles/how-create-maven-nb-project-type 
> <https://dzone.com/articles/how-create-maven-nb-project-type>
> https://netbeans.apache.org/tutorials/nbm-projecttype.html 
> <https://netbeans.apache.org/tutorials/nbm-projecttype.html>
> 
> I did have to manually add a jar file to my local repo in order to get it to 
> work however. 
> Just following the instructions as is didn’t work because I got the error:
> 
>> Some tokens required by included modules are not provided by included 
>> modules. The application will fail starting up. The missing tokens are:
>>    org.netbeans.spi.project.ProjectManagerImplementation          ref: 
>> [org.netbeans.modules.projectapi]
> 
> Turns out that I needed to install the ‘org-netbeans-modules-projectapi-nb’ 
> jar into my local repo.
> This module provides the implementation of ProjectManagerImplementation that 
> was missing.
> 
> I did: 
> 
> > mvn install:install-file -Dfile=org-netbeans-modules-projectapi-nb.jar 
> > -DgroupId=org.netbeans.modules 
> > -DartifactId=org-netbeans-modules-projectapi-nb -Dversion=
> RELEASE125 -Dpackaging=jar
> 
> I found this jar by looking at a working Ant based platform build I did and 
> seeing which modules it included and noticed the *-nb version wasn’t 
> available in Maven central..so I had
> to manually add it.
> 
> Once I did that and added it to my POM.xml it all compiled and ran.
> 
> Here is a new repo showing my code: 
> https://github.com/tmulle/NBTextAnalyzer.git 
> <https://github.com/tmulle/NBTextAnalyzer.git>
> 
> So, the next thing to do is to see if I can get the JSON module working…
> 
> - Tim
> 
> 
>> On Sep 25, 2021, at 11:29 AM, Tim Mullé <tmu...@gmail.com 
>> <mailto:tmu...@gmail.com>> wrote:
>> 
>> Hi,
>> 
>> I’m trying to make a simple Maven based Platform test application that uses 
>> initially:
>> 
>> - Project API - (so I can have custom project types, wizards, etc)
>> - JSON editor (so I can view, edit, JSON files)
>> 
>> and I’m getting the following strange errors. I’m guessing because I’m not 
>> including
>> all the correct modules?
>> 
>> I’m finding it difficult to know which modules to include using Maven based 
>> development
>> versus the Ant which have the nice library picker UI.
>> 
>> I’m getting a compile error and I’m not sure how to figure out what the 
>> correct modules I need.
>> 
>> Some tokens required by included modules are not provided by included 
>> modules. The application will fail starting up. The missing tokens are:
>>    org.netbeans.spi.project.ProjectManagerImplementation          ref: 
>> [org.netbeans.modules.projectapi]
>>    org.netbeans.modules.parsing.impl.indexing.implspi.ActiveDocumentProvider 
>>          ref: [org.netbeans.modules.parsing.indexing]
>> 
>> I find myself trying to randomly pick which modules I think would satisfy 
>> the module dependencies and adding them to my POM
>> but I’m not doing very well.
>> 
>> I’ve also found a lot of times when I get the error saying something is not 
>> a friend of … and then I found online that I have to create 
>> a module.xml file and then add some entries to fix this, and it requires me 
>> to then look at each modules MANIFEST.MF that I’m trying
>> to be a friend with and add that to my module.xml file. Seems very 
>> tedious..unless I’m missing something much easier.
>> 
>> Here is the link to my test code: 
>> https://github.com/tmulle/MavenNBTestApplication 
>> <https://github.com/tmulle/MavenNBTestApplication>
>> 
>> Any help would be appreciated.. 
> 

Reply via email to