GitHub user matthiasblaesing added a comment to the discussion: Need help with 
dependency resolution on NBM

Don't use implementation dependencies. They are evil and will break and in this 
case it does to. Change the project like this:

```diff
# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- a/ro.emilianbold.modules.maven.search.remote/pom.xml
+++ b/ro.emilianbold.modules.maven.search.remote/pom.xml
@@ -13,29 +13,18 @@
                 <version>14.5</version>
                 <extensions>true</extensions>
                 <configuration>
+                    
<codeNameBase>ro.emilianbold.modules.maven.search.remote</codeNameBase>
                     <useOSGiDependencies>false</useOSGiDependencies>
-                    <moduleDependencies>
-                        <dependency>
-                            
<id>org.netbeans.modules:org-netbeans-modules-maven</id>
-                            <type>impl</type>
-                            <!--<explicitValue>org.netbeans.modules.maven/2 = 
1</explicitValue>-->
-                        </dependency>
-                        <dependency>
-                            
<id>org.netbeans.modules:org-netbeans-modules-maven-indexer</id>
-                            <type>impl</type>
-                            <!--<explicitValue>org.netbeans.modules.maven/2 = 
1</explicitValue>-->
-                        </dependency>
-                    </moduleDependencies>
                     <!--<verifyRuntime>warn</verifyRuntime>-->                 
   
                 </configuration>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.8.1</version>
+                <version>3.15.0</version>
                 <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
+                    <release>17</release>
+                    <proc>full</proc>
                 </configuration>
             </plugin>
             <plugin>
@@ -58,11 +47,6 @@
         </dependency>
         <dependency>
             <groupId>org.netbeans.modules</groupId>
-            <artifactId>org-netbeans-modules-maven</artifactId>
-            <version>RELEASE160</version>
-        </dependency>
-        <dependency>
-            <groupId>org.netbeans.modules</groupId>
             <artifactId>org-netbeans-modules-maven-indexer</artifactId>
             <version>RELEASE160</version>
         </dependency>

```

Changes:

- maven indexer allows the module with codename base 
`ro.emilianbold.modules.maven.search.remote` to use friend API, so for now lets 
reuse that instead of an implementation dependency (long term either this 
function must move into the NetBeans codebase or maven indexer needs a real API)
- drop the implementation dependencies
- use current version of maven-compiler-plugin, use release flag, enable 
annotation processing (relevant on newer JDKs, which by default don't run 
annotation processors found on the classpath unless instructured)
- remove unused maven dependency

GitHub link: 
https://github.com/apache/netbeans/discussions/9419#discussioncomment-17158747

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


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