All Downloads are FREE. Search and download functionalities are using the official Maven repository.

archetype-resources.pom.xml Maven / Gradle / Ivy

Go to download

"Maven Old Java Object" Project builder . From this archetype, maven can build and initialize a SF3JSWING child project folder structure.

The newest version!
<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>
        <groupId>${groupId}</groupId>
        <artifactId>${artifactId}</artifactId>
        <version>${version}</version>
        <packaging>pom</packaging>
        <url>${url}</url>
        <!-- 

        This the parent project POM. It's the project management file. 
        The Core module collects all non platform dependent Java sources and resources.
        The Platform module works dependently on the host operating system. It aggregates the core module as a
        direct dependency and releases an artifact named with the classifier -${co.prj.os}-api.
        Desktop projects that want to depend on this POM must add the groupId:artifactId as a new dependency with the classifier "project".
        For instance :
        <pre>
        
        <dependency>
            <groupId>net.sf.sf3jswing</groupId>
            <artifactId>thega-[platform]</artifactId>
            <version>0.9.0-SNAPSHOT</version>
            <classifier>api</classifier>
        </dependency>
        
        </pre>
        
        -->
        <dependencyManagement>
        <dependencies>
                <dependency>
                                <groupId>net.sf.sf3jswing</groupId>
                                <artifactId>api-core</artifactId>
                                <version>4.6.8-SNAPSHOT</version>
                </dependency>
                        <dependency>
                                <groupId>net.sf.sf3jswing</groupId>
                                <artifactId>api-win</artifactId>
                                <version>4.6.8-SNAPSHOT</version>
                                <classifier>api</classifier>
                        </dependency>
                        <dependency>
                                <groupId>net.sf.sf3jswing</groupId>
                                <artifactId>api-lnx</artifactId>
                                <version>4.6.8-SNAPSHOT</version>
                                <classifier>api</classifier>
                        </dependency>
                        <dependency>
                                <groupId>net.sf.sf3jswing</groupId>
                                <artifactId>api-osx</artifactId>
                                <version>4.6.8-SNAPSHOT</version>
                                <classifier>api</classifier>
                        </dependency>       
        </dependencies>
        </dependencyManagement>
        <modules>
                <module>${artifactId}-osx</module>
                <module>${artifactId}-win</module>
                <module>${artifactId}-lnx</module>
                <module>${artifactId}-core</module>
        </modules>
        <properties>
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                <maven.compiler.source>1.7</maven.compiler.source>
                <maven.compiler.target>1.7</maven.compiler.target>
                <ant.project.name>${mojo_name_ant}</ant.project.name>
        </properties>
        <!-- Sonatype Deployment -->
        <distributionManagement>
                <snapshotRepository>
                        <id>ossrh</id>
                        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
        </distributionManagement>
        <repositories>
                <repository>
                        <id>ossrh-snapshots</id>
                        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </repository>
                <repository>
                        <id>ossrh-releases</id>
                        <url>https://oss.sonatype.org/content/repositories/releases</url>
                </repository>
                <repository>
                        <id>central-maven2</id>
                        <url>http://central.maven.org/maven2</url>
                </repository>
                <!--other libraries if any-->
                <repository>
                        <id>project.local.${project.artifactId}</id>
                        <name>libRepo.local.${project.artifactId}</name>
                        <url>file:${project.basedir}/lib</url>
                </repository>
        </repositories>
        <profiles>
                <profile> 
                        <id>ossrh-release</id>
                        <build>
                                <plugins>
                                        <plugin>
                                                <groupId>org.apache.maven.plugins</groupId>
                                                <artifactId>maven-source-plugin</artifactId>
                                                <version>2.4</version>
                                        </plugin>
                                        <plugin>
                                                <groupId>org.apache.maven.plugins</groupId>
                                                <artifactId>maven-javadoc-plugin</artifactId>
                                                <version>2.10.3</version>
                                                <configuration>
                                                        <!-- JavaDoc configuration here for custom layout-->
                                                        <tags>
                                                                <tag>
                                                                        <name>default</name>
                                                                        <placement>m</placement>
                                                                        <head>Default value :</head>
                                                                </tag>
                                                                <tag>
                                                                        <name>discussion</name>
                                                                        <placement>a</placement>
                                                                        <head>More about :</head>
                                                                </tag>
                                                        </tags>
                                                        <failOnError>false</failOnError>
                                                </configuration>
                                                <executions>
                                                        <execution>
                                                                <id>attach-javadocs</id>
                                                                <goals>
                                                                        <goal>jar</goal>
                                                                </goals>
                                                        </execution>
                                                </executions>
                                        </plugin>
                                        <plugin>
                                                <groupId>org.apache.maven.plugins</groupId>
                                                <artifactId>maven-gpg-plugin</artifactId>
                                                <version>1.6</version>
                                        </plugin>
                                </plugins>
                                <pluginManagement>
                                        <plugins>
                                                <plugin>
                                                        <groupId>org.apache.maven.plugins</groupId>
                                                        <artifactId>maven-source-plugin</artifactId>
                                                        <version>2.4</version>
                                                        <executions>
                                                                <execution>
                                                                        <id>attach-sources</id>
                                                                        <goals>
                                                                                <goal>jar-no-fork</goal>
                                                                        </goals>
                                                                </execution>
                                                        </executions>
                                                </plugin>
                                                <plugin>
                                                        <groupId>org.apache.maven.plugins</groupId>
                                                        <artifactId>maven-javadoc-plugin</artifactId>
                                                        <version>2.10.3</version>
                                                        <executions>
                                                                <execution>
                                                                        <id>attach-javadocs</id>
                                                                        <goals>
                                                                                <goal>jar</goal>
                                                                        </goals>
                                                                </execution>
                                                        </executions>
                                                </plugin> 
                                                <plugin>
                                                        <groupId>org.apache.maven.plugins</groupId>
                                                        <artifactId>maven-gpg-plugin</artifactId>
                                                        <version>1.6</version>
                                                        <executions>
                                                                <execution>
                                                                        <id>sign-artifacts</id>
                                                                        <phase>verify</phase>
                                                                        <goals>
                                                                                <goal>sign</goal>
                                                                        </goals>
                                                                </execution>
                                                        </executions>
                                                </plugin>
                                        </plugins>
                                </pluginManagement>
                        </build>
                </profile>
        </profiles>
        <build>
                <plugins>
                        <plugin>
                                <groupId>org.codehaus.mojo</groupId>
                                <artifactId>properties-maven-plugin</artifactId>
                                <version>1.0.0</version>
                        </plugin>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-release-plugin</artifactId>
                                <version>2.5.3</version>
                                <configuration>
                                        <autoVersionSubmodules>true</autoVersionSubmodules>
                                        <useReleaseProfile>false</useReleaseProfile>
                                        <releaseProfiles>ossrh-release</releaseProfiles>
                                        <goals>deploy</goals>
                                </configuration>
                        </plugin>
                        <plugin>
                                <groupId>org.sonatype.plugins</groupId>
                                <artifactId>nexus-staging-maven-plugin</artifactId>
                                <version>1.6.7</version>
                        </plugin>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-scm-plugin</artifactId>
                                <version>1.9.4</version>
                        </plugin>
                </plugins>
                <pluginManagement>
                        <plugins>
                                <plugin>
                                        <!-- Sonatype Nexus Staging deployment -->
                                        <groupId>org.sonatype.plugins</groupId>
                                        <artifactId>nexus-staging-maven-plugin</artifactId>
                                        <version>1.6.3</version>
                                        <extensions>true</extensions>
                                        <configuration>
                                                <serverId>ossrh</serverId>
                                                <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                                                <autoReleaseAfterClose>true</autoReleaseAfterClose>
                                        </configuration>
                                </plugin>
                                <plugin>
                                        <!-- tell children that there are properties files imported -->
                                        <groupId>org.codehaus.mojo</groupId>
                                        <artifactId>properties-maven-plugin</artifactId>
                                        <version>1.0.0</version>
                                        <executions>
                                                <execution>
                                                        <phase>initialize</phase>
                                                        <goals>
                                                                <goal>read-project-properties</goal>
                                                        </goals>
                                                        <configuration>
                                                                <files>
                                                                        <file>${basedir}/etc/module-build.properties</file>
                                                                </files>
                                                        </configuration>
                                                </execution>
                                        </executions>
                                </plugin>
                                <!--Extract AntBuildFiles's resources-->
                                <plugin>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-dependency-plugin</artifactId>
                                        <version>2.10</version>
                                        <executions>
                                                <execution>
                                                        <id>unpack</id>
                                                        <phase>generate-resources</phase>
                                                        <goals>
                                                                <goal>unpack-dependencies</goal>
                                                        </goals>
                                                        <configuration>
                                                                <includeGroupIds>${project.groupId}</includeGroupIds>
                                                                <includeArtifactIds>AntBuildFiles</includeArtifactIds>
                                                                <!-- lookup in dependency tree -->
                                                                <excludeTransitive>false</excludeTransitive>
                                                                <overWrite>true</overWrite>
                                                                <outputDirectory>${project.build.directory}/ant-build-files</outputDirectory>
                                                                <excludes>META-INF/**</excludes>
                                                                <overWriteReleases>true</overWriteReleases>
                                                                <overWriteSnapshots>true</overWriteSnapshots>
                                                        </configuration>
                                                </execution>
                                        </executions>
                                </plugin>
                                <!-- tell children to run an Ant script -->
                                <plugin>
                                        <artifactId>maven-antrun-plugin</artifactId>
                                        <version>1.8</version>                                        
                                        <executions>
                                                <execution>
                                                        <id>ant-magic</id>
                                                        <phase>generate-resources</phase>
                                                        <goals>
                                                                <goal>run</goal>
                                                        </goals>
                                                        <configuration>                                                                
                                                                <exportAntProperties>false</exportAntProperties>     
                                                                <target>
                                                                        <!-- pass maven project properties to Ant script -->
                                                                        <property name="co.prj.artifactId" value="${project.parent.artifactId}" />
                                                                        <property name="co.prj.basedir" location="${basedir}/../${ant.project.name}" />
                                                                        <property name="co.prj.os" value="${platformClass}" />
                                                                        <property name="co.prj.os.arch" value="${platformClass.arch}" />
                                                                        <property name="build-files" value="${project.build.directory}/ant-build-files" />
                                                                        <ant antfile="${co.prj.basedir}/build-${co.prj.os}-${co.prj.os.arch}.xml" target="process-resources" />
                                                                </target>
                                                        </configuration>
                                                </execution>
                                        </executions>
                                </plugin>
                                <plugin>
                                        <!-- tell children pom.xml to jar and add dependencies to the resulting file -->
                                        <artifactId>maven-jar-plugin</artifactId>
                                        <version>2.6</version>
                                        <executions>
                                                <execution>
                                                        <phase>package</phase>
                                                        <goals>
                                                                <goal>jar</goal>
                                                        </goals>
                                                </execution>
                                        </executions>
                                </plugin>
                                <plugin>
                                        <!-- tell children pom.xml to read api-descriptor for assembly plugin -->
                                        <artifactId>maven-assembly-plugin</artifactId>
                                        <version>2.2</version>        
                                        <dependencies>
                                                <dependency>
                                                        <groupId>net.sf.sf3jswing</groupId>
                                                        <artifactId>asl-descriptors</artifactId>
                                                        <version>1.0.0</version>
                                                </dependency>
                                        </dependencies>         
                                        <executions>
                                                <!-- tell children to create a project source bundle from assembly and register 
                                                into repositories as <descriptorRef> "project"  (=classifier) -->
                                                <execution>
                                                        <id>create-project-src-bundle</id>
                                                        <phase>package</phase>
                                                        <goals>
                                                                <goal>single</goal>
                                                        </goals>                                                        
                                                        <configuration>
                                                                <formats>
                                                                        <format>jar</format>
                                                                </formats>
                                                                <descriptorRefs>
                                                                        <descriptorRef>project</descriptorRef>
                                                                </descriptorRefs>
                                                        </configuration>
                                                </execution>
                                                <execution>
                                                        <id>create-distributable-jar-bundle</id>
                                                        <phase>package</phase>
                                                        <goals>
                                                                <goal>single</goal>
                                                        </goals>                                                
                                                        <configuration>   
                                                                <descriptorRefs>
                                                                        <descriptorRef>my-distribution</descriptorRef>
                                                                </descriptorRefs>
                                                                <finalName>${project.build.finalName}-${platformClass}</finalName>  
                                                                <classifier>${platformClass}</classifier>
                                                                <archive>
                                                                        <manifest>
                                                                                <classpathPrefix>/lib</classpathPrefix>
                                                                                <addClasspath>true</addClasspath>
                                                                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                                                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                                                                                <mainClass>${co.prj.os.app.run.main}</mainClass>
                                                                        </manifest>
                                                                </archive>
                                                        </configuration>
                                                </execution>                                   
                                                
                                        </executions>
                                </plugin>
                        </plugins>
                </pluginManagement>              
                <filters>
                        <filter>etc/module-build.properties</filter>
                </filters>
                <resources>
                        <!-- native libraries .so, .dll .dylib are copied into the root folder of the package JAR -->
                        <resource>
                                <directory>src/main/resources</directory>                                
                                <excludes>
                                        <exclude>natives/*</exclude>
                                        <exclude>assemblies/**</exclude>
                                </excludes>
                                <filtering>true</filtering>
                        </resource>
                        <resource>
                                <directory>src/main/resources/natives</directory>      
                        </resource>
                </resources>
        </build>
        <name>${mojo_name}</name>
        <description>${mojo_desc}</description>
                
        <!-- sonatype required information -->
        <licenses>
                <license>
                        <name>${mojo_license_name}</name>
                        <url>${mojo_license_url}</url>
                </license>
        </licenses>
        <developers>
                <developer>
                        <name>${mojo_jks_co_user_realname}</name>
                        <email>${mojo_jks_co_email}</email>
                        <organization>${mojo_jks_co_name}</organization>
                        <organizationUrl>${mojo_jks_co_url}</organizationUrl>
                </developer>
        </developers>
        <scm>
                <connection>${mojo_scm_connection}</connection>
                <developerConnection>${mojo_scm_connection_dev}</developerConnection>
                <url>${mojo_scm_url}</url>
        </scm>
</project>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy