apache / netbeans-mavenutils-nbm-maven-plugin

Apache NetBeans Maven Utils parent pom
https://netbeans.apache.org/
Apache License 2.0
13 stars 27 forks source link

nbm-maven-plugin A few error messages improvements #188

Open arsi-apli opened 3 months ago

arsi-apli commented 3 months ago

I think for a beginner these error messages are absolute hell, but even for me, an experienced one, it's quite a time killer. For the friend dependency I need to find the correct group and artifactId. For the transitive module I can define module as direct dependency directly from NB, but when I have 150 modules in there, that search also takes a while. And yet the plugin has this information directly in itself, it just needs to be used... Alternatively, a parameter could be added to the configuration to disable them. But for me they should be on by default..

Failed to execute goal org.apache.netbeans.utilities:nbm-maven-plugin:14.3-SNAPSHOT:manifest (default-manifest) on project ZapliScadaEditor:
Module has friend dependency on org.netbeans.modules.java.hints but is not listed as a friend.

vs

Failed to execute goal org.apache.netbeans.utilities:nbm-maven-plugin:14.3-SNAPSHOT:manifest (default-manifest) on project ZapliScadaEditor: 
Module has friend dependency on org.netbeans.modules.java.hints but is not listed as a friend.
Add the following lines to the plugin configuration:
<configuration>
    <moduleDependencies>
    ...
    <dependency>
       <id>org.netbeans.modules:org-netbeans-modules-java-hints</id>
       <type>impl</type>
    </dependency>
    ...
    </moduleDependencies>
</configuration>
Project uses classes from transitive module org.netbeans.api:org-openide-io:jar:RELEASE126-ZAPLI1 which will not be accessible at runtime.
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

vs

Project uses classes from transitive module org.netbeans.api:org-openide-io:jar:RELEASE126-ZAPLI1 which will not be accessible at runtime.
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
Add the following lines to the dependencies:
<dependency>
  <groupId>org.netbeans.api</groupId>
  <artifactId>org-openide-io</artifactId>
  <version>${netbeans.version}</version>
</dependency>
neilcsmith-net commented 3 months ago

Second suggestion sounds like it could be good. As for the first, we shouldn't be encouraging the use of internal APIs, so -1 from me. There's a better question there about why this is needed!