You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Eymeric VIEUILLE <EV...@sii.fr.INVALID> on 2021/11/08 14:28:48 UTC

Implementation dependency in a maven module

Hi !

I am doing the migration of a netbeans based application from Ant to Maven (Netbeans 12.0 version)

In our project, we had implementation dependencies on netbeans modules (core-windows for example). In the old way, no problem : on the dependency core-windows, you could right click and go in < Edit > menu to select < Implementation Version > and set the expected < Major Release Version > value.

Now with Maven, in my pom.xml, i added :
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.14</version>
                <configuration>
                    <archive>
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                        <manifestEntries>
                            <OpenIDE-Module-Layer>framework/api/layer.xml</OpenIDE-Module-Layer>
                        </manifestEntries>
                        <moduleDependencies>
                            <dependency>
                                <id>org.netbeans.modules:org-netbeans-core-windows</id>
                                <type>impl</type>
                            </dependency>
                        </moduleDependencies>
                    </archive>
                </configuration>
            </plugin>

I get the following error when compiling :
Plugin org.apache.maven.plugins:maven-jar-plugin:3.14 or one of its dependencies could not be resolved: Failure to find org.apache.maven.plugins:maven-jar-plugin:jar:3.14 in https://repo.maven.apache.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of mirror1 has elapsed or updates are forced -> [Help 1]

The 3.14 version of maven-jar-plugin is effectively not available on this repository (only olders < 3.2). Am i pointing at the wrong maven repository ?

Moreover, I think i'm doing it the wrong way for adding the implementation dependency properly in my project. Can you tell me how i can do it ?