On 9/16/25 03:33, Laszlo Kishalmi wrote:
>
> Well, you can do an implementation version dependency (I do not know if those
> are available in maven based plugins),
>
config via plugin:
<plugin>
<groupId>org.apache.netbeans.utilities</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<version>14.3</version>
<extensions>true</extensions>
<configuration>
<moduleDependencies>
<dependency>
<id>org.netbeans.modules:org-netbeans-modules-maven</id>
<type>impl</type>
</dependency>
</moduleDependencies>
</configuration>
</plugin>
dependency to the impl module instead of api:
<dependency>
<groupId>org.netbeans.modules</groupId>
<artifactId>org-netbeans-modules-maven</artifactId>
<version>RELEASE260</version>
</dependency>
build might complain about transitive deps and ask to declare them directly, do
that too.
test with:
System.out.println(NbMavenProject.class);
if this doesn't throw a class loading exception it worked.
best regards,
-mbien
> though that really binds your plugin to a specific NetBeans version.
>
> As Maven plugin is not public it is hard to implement plugins outside
> NetBeans to it.
> There are two possibilities:
>
> 1. Ask NetBeans team to make the Maven plugin public.
> 2. Create a PR to add your plugin as a friend to the Maven plugin.
>
> I think option 1 would be preferred. Though even then you would need to wait
> for NetBeans 28.
>
>
> On 9/15/25 14:49, Pablo Rodriguez Pina wrote:
>> Been 3 days going crazy, not even grok, chatgpt or gemini can help me (and
>> they have tried hard)
>>
>> Is it possible to use NbMavenProject from a plugin that i make if my plugin
>> is not a "friend dependency" Nomatter what i try, the plugins classloader
>> wont make see it at runtime.
>>
>> Also, what is going on with this org.jspecify.jspecify is that in a
>> different maven repo? Its not in central
>>
>> <dependency>
>> <groupId>org.netbeans.modules</groupId>
>> <artifactId>org-netbeans-modules-maven-apisupport</artifactId>
>> <version>${netbeans.version}</version>
>> <exclusions>
>> <exclusion>
>> <groupId>org.jspecify.jspecify</groupId>
>> <artifactId>jspecify</artifactId>
>> </exclusion>
>> </exclusions>
>> <scope>provided</scope>
>> </dependency>
>>
>> What are you supposed to do to use maven apis from a plugin? Is it possible?
>>
---------------------------------------------------------------------
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