/
POM Migration
POM Migration
POM Skeleton
<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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <!-- (1) --> <parent> <artifactId>snap-engine</artifactId> <groupId>org.esa.snap</groupId> <version>2.0.0-SNAPSHOT</version> </parent> <!-- (2) --> <artifactId>mymod</artifactId> <!-- (3) --> <packaging>nbm</packaging> <!-- (4) --> <name>Human-readable mymod name</name> <!-- (5) --> <description>Human-readable mymod description.</description> <dependencies> <!-- (6) --> <dependency> <groupId>jdom</groupId> <artifactId>jdom2</artifactId> <version>2.1</version> </dependency> <!-- (7) --> <dependency> <groupId>org.esa.snap</groupId> <artifactId>snap-ceres-core</artifactId> </dependency> <dependency> <groupId>org.esa.snap</groupId> <artifactId>snap-core</artifactId> </dependency> </dependencies> <build> <plugins> <!-- (8) --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>nbm-maven-plugin</artifactId> <configuration> <publicPackages> <!-- (9) --> <publicPackage>org.jdom2.*</publicPackage> <!-- (10) --> <publicPackage>org.esa.snap.myext</publicPackage> </publicPackages> </configuration> </plugin> <!-- (11) --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <useDefaultManifestFile>true</useDefaultManifestFile> </configuration> </plugin> </plugins> </build> </project>
- Use the parent for extension modules.
- The
artifactId
will be used with thegroupId
to generate the manifest headerOpenIDE-Module
. ThegroupId
andversion
are inherited from parent in this case.Âversion
 will generate the manifest headersOpenIDE-Module-Specification-Version
and ÂOpenIDE-Module-Implementation-Version
, the latter will include a timestamp. - Packing must always be nbm to generate NBM files.
- Name will generate the manifest headerÂ
OpenIDE-Module-Name
. - Description will be used to generateÂ
OpenIDE-Module-Short-Description
- This 3rd-party dependency will result in a private JAR located in ${cluster}/modules/ext/org.esa.snap.mymod/jdom2.jar. Another NB module depending on mymod and wanting to use jdom2 does not need to import it explicitely again as long as you export its API as a public package(s). See below. If you don't export the jdom2 API, a second private ext-JAR will be created in the cluster.
- The following are NB-module dependencies from which the manifest headerÂ
OpenIDE-Module-Module-Dependencies
will be derived. - Required declaration of the  Maven NBM plugin.
- Optinally export the 3rd party jdom2 API so that other modules don't need to import the JAR.Â
- Optionally export API from myext.
Note thatÂorg.esa.snap.myext
only exports classes in themyext
  package, while the valueorg.esa.snap.myext.*
exportsÂmyext
plus all subpackages, recursively. - Required declaration of the Maven JAR Plugin.Â
useDefaultManifestFile
must be set totrue
.
, multiple selections available,
Related content
SNAP Project Development
SNAP Project Development
Read with this
API and Architectural Changes in SNAP 10
API and Architectural Changes in SNAP 10
More like this
IntelliJ IDEA
IntelliJ IDEA
More like this
SNAP 12 deprecated classes and methods
SNAP 12 deprecated classes and methods
More like this
How to build SNAP from sources
How to build SNAP from sources
More like this
How to develop an extension module
How to develop an extension module
More like this