You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by César García <ce...@gmail.com> on 2022/06/10 02:47:16 UTC
NetBeans Module with dependencies
Hi,
I'm trying to generate a NetBeans module that can use the graphs displayed
in the Profiler module.
My intention is to use Maven for module development, but it does not create
the module correctly, the MANIFEST.MF and the .jar and .nbm files do not
include the required dependencies.
I include the pom.xml for your kind comments.
I made the same module with Ant and it worked including a direct dependency
on the ...profiler-ui module.
I've already tried using various maven plugins like "shade", but I can't
get the application to recognize the ...profiler-ui module.
I appreciate your help,
-----------------
The pom.xml
-------------------
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>mavenproject9</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>nbm</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.netbeans.utilities</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<version>4.7</version>
<extensions>true</extensions>
<!-- This section indicates the modules that are friends -->
<configuration>
<moduleDependencies>
<dependency>
<id>org.netbeans.modules:org-netbeans-lib-profiler-charts</id>
<type>impl</type>
<explicitValue>org.netbeans.lib.profiler.charts/1 > 1.22</explicitValue>
</dependency>
<dependency>
<id>org.netbeans.modules:org-netbeans-lib-profiler-ui</id>
<type>impl</type>
<explicitValue>org.netbeans.lib.profiler.ui/1 >
1</explicitValue>
</dependency>
</moduleDependencies>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-api-annotations-common</artifactId>
<version>RELEASE130</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-windows</artifactId>
<version>RELEASE130</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util</artifactId>
<version>RELEASE130</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util-ui</artifactId>
<version>RELEASE130</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util-lookup</artifactId>
<version>RELEASE130</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-awt</artifactId>
<version>RELEASE130</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-modules-settings</artifactId>
<version>RELEASE130</version>
</dependency>
<dependency>
<groupId>org.netbeans.modules</groupId>
<artifactId>org-netbeans-lib-profiler-ui</artifactId>
<version>RELEASE130</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.modules</groupId>
<artifactId>org-netbeans-lib-profiler-charts</artifactId>
<version>RELEASE130</version>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
Re: NetBeans Module with dependencies
Posted by Michael Bien <mb...@gmail.com>.
Hi Cesar,
can't see anything wrong with that pom beside <type>jar</type> which
shouldn't be there I believe.
Have you tried to compare the nbm from your ant project with the one
generated by maven? The module dependencies specifically - maybe some
friend dependency is missing or wrong.
best regards,
michael
On 10.06.22 04:47, César García wrote:
> Hi,
>
> I'm trying to generate a NetBeans module that can use the graphs displayed
> in the Profiler module.
>
> My intention is to use Maven for module development, but it does not create
> the module correctly, the MANIFEST.MF and the .jar and .nbm files do not
> include the required dependencies.
>
> I include the pom.xml for your kind comments.
>
> I made the same module with Ant and it worked including a direct dependency
> on the ...profiler-ui module.
>
> I've already tried using various maven plugins like "shade", but I can't
> get the application to recognize the ...profiler-ui module.
>
> I appreciate your help,
>
>
>
> -----------------
> The pom.xml
> -------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
> http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <groupId>com.mycompany</groupId>
> <artifactId>mavenproject9</artifactId>
> <version>1.0-SNAPSHOT</version>
> <packaging>nbm</packaging>
> <build>
> <plugins>
>
> <plugin>
> <groupId>org.apache.netbeans.utilities</groupId>
> <artifactId>nbm-maven-plugin</artifactId>
> <version>4.7</version>
> <extensions>true</extensions>
>
> <!-- This section indicates the modules that are friends -->
> <configuration>
> <moduleDependencies>
> <dependency>
>
> <id>org.netbeans.modules:org-netbeans-lib-profiler-charts</id>
> <type>impl</type>
>
> <explicitValue>org.netbeans.lib.profiler.charts/1 > 1.22</explicitValue>
>
> </dependency>
> <dependency>
>
> <id>org.netbeans.modules:org-netbeans-lib-profiler-ui</id>
>
> <type>impl</type>
> <explicitValue>org.netbeans.lib.profiler.ui/1 >
> 1</explicitValue>
> </dependency>
> </moduleDependencies>
> </configuration>
>
> </plugin>
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <version>3.8.1</version>
> <configuration>
> <source>1.8</source>
> <target>1.8</target>
> </configuration>
> </plugin>
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-jar-plugin</artifactId>
> <version>3.1.2</version>
> <configuration>
> <archive>
>
> <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
> <manifest>
> <addClasspath>true</addClasspath>
> </manifest>
> </archive>
> </configuration>
> </plugin>
>
> </plugins>
> </build>
>
> <dependencies>
> <dependency>
> <groupId>org.netbeans.api</groupId>
> <artifactId>org-netbeans-api-annotations-common</artifactId>
> <version>RELEASE130</version>
> </dependency>
> <dependency>
> <groupId>org.netbeans.api</groupId>
> <artifactId>org-openide-windows</artifactId>
> <version>RELEASE130</version>
> </dependency>
> <dependency>
> <groupId>org.netbeans.api</groupId>
> <artifactId>org-openide-util</artifactId>
> <version>RELEASE130</version>
> </dependency>
> <dependency>
> <groupId>org.netbeans.api</groupId>
> <artifactId>org-openide-util-ui</artifactId>
> <version>RELEASE130</version>
> </dependency>
> <dependency>
> <groupId>org.netbeans.api</groupId>
> <artifactId>org-openide-util-lookup</artifactId>
> <version>RELEASE130</version>
> </dependency>
> <dependency>
> <groupId>org.netbeans.api</groupId>
> <artifactId>org-openide-awt</artifactId>
> <version>RELEASE130</version>
> </dependency>
> <dependency>
> <groupId>org.netbeans.api</groupId>
> <artifactId>org-netbeans-modules-settings</artifactId>
> <version>RELEASE130</version>
> </dependency>
> <dependency>
> <groupId>org.netbeans.modules</groupId>
> <artifactId>org-netbeans-lib-profiler-ui</artifactId>
> <version>RELEASE130</version>
> <type>jar</type>
> </dependency>
> <dependency>
> <groupId>org.netbeans.modules</groupId>
> <artifactId>org-netbeans-lib-profiler-charts</artifactId>
> <version>RELEASE130</version>
> </dependency>
> </dependencies>
>
> <properties>
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> </properties>
> </project>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists