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

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

Go to download

A Maven archetype that can generate a project for building an UnboundID Server SDK extension bundle.

There is a newer version: 1.0.16
Show 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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>${groupId}</groupId>
  <artifactId>${artifactId}</artifactId>
  <version>${version}</version>
  <packaging>jar</packaging>

  <!-- You must customize the following values. -->
  <!-- By convention, the extension name uses lowercased dash-delimited words. -->
  <name>example-extension</name>
  <description>A description of your extension.</description>
  <organization>
    <name>ExampleCorp</name>
    <url>https://example.com</url>
  </organization>

  <properties>
    <!--
    The following properties will be used during the course of building one or
    more extensions for UnboundID server products. If multiple extensions will
    be packaged into the same jar file, then these property values should refer
    to the collection rather than individual extensions.
    -->

    <!--
    The Java compiler source and target versions for this project.
    -->
    <source.version>1.7</source.version>
    <target.version>1.7</target.version>

    <!--
    The Server SDK version for which this extension will be built.

    EXAMPLE:  <server-sdk.version>6.0.0.0</server-sdk.version>
    -->
    <server-sdk.version>6.0.0.0</server-sdk.version>

    <!--
    The Maven version string of the Server SDK dependency to build against.

    EXAMPLE:  <server-sdk.maven-version>6.0.0.0-SNAPSHOT</server-sdk.maven-version>
    -->
    <server-sdk.maven-version>${server-sdk.version}</server-sdk.maven-version>

    <!--
    The name for this extension or set of extensions. It must begin with an
    ASCII alphabetic character and must contain only ASCII alphabetic
    characters, numeric digits, the period, and the dash.

    EXAMPLE:  extension.name=user-extension
    -->
    <extension.name>${project.name}</extension.name>

    <!--
    The version string for this extension or set of extensions. It must begin
    with an ASCII alphabetic character or numeric digit and must contain only
    ASCII alphabetic characters, numeric digits, the period, and the dash.

    EXAMPLE:  extension.version=1.0
    -->
    <extension.version>${project.version}</extension.version>

    <!--
    The name of the vendor for this extension or set of extensions. It must be
    provided, but may contain any non-empty set of characters.

    EXAMPLE:  <extension.vendor.name>Example Corp.</extension.vendor.name>
    -->
    <extension.vendor.name>${project.organization.name}</extension.vendor.name>

    <!--
    The unique ID of the vendor for this extension or set of extensions. It
    must be provided and should use a notation similar to that of Java packages.

    EXAMPLE:  <extension.vendor.id>com.example</extension.vendor.id>
    -->
    <extension.vendor.id>${project.groupId}</extension.vendor.id>

    <!--
    The URL of the vendor for this extension or set of extensions. It must be
    provided and should be a valid URL.

    EXAMPLE:  extension.vendor.url=http://www.example.com/
    -->
    <extension.vendor.url>${project.organization.url}</extension.vendor.url>

    <!--
    Contact information (e.g., e-mail address, phone number, URL, etc.) for the
    individual or group responsible for supporting this extension. It must be
    provided, but may contain any non-empty set of characters.

    EXAMPLE:  [email protected]
    -->
    <extension.vendor.contact>CHANGEME</extension.vendor.contact>

    <!--
    Indicates whether to include the extension source code in the jar file along
    with the compiled classes.  Including source code can help ensure that the
    code is always available to those who might need to support the extension.
    It must be provided, and the value should be either "true" or "false".
    -->
    <include.source>true</include.source>

    <!--
    Used to set the Build-Time value in the jar manifest.
    -->
    <maven.build.timestamp.format>yyyyMMddHHmmss'Z'</maven.build.timestamp.format>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.5.1</version>
        <configuration>
          <source>${source.version}</source>
          <target>${target.version}</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.4.1</version>
        <executions>
          <execution>
            <id>enforce-property</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireProperty>
                  <property>extension.name</property>
                  <message>You must set an extension.name property.</message>
                  <regex>[a-zA-Z]([a-zA-Z0-9\.\-])*</regex>
                  <regexMessage>The extension.name property must begin with an ASCII alphabetic character and must contain only ASCII alphabetic characters, numeric digits, the period, and the dash.</regexMessage>
                </requireProperty>
                <requireProperty>
                  <property>extension.version</property>
                  <message>You must set an extension.version property.</message>
                  <regex>[a-zA-Z0-9]([a-zA-Z0-9\.\-])*</regex>
                  <regexMessage>The extension.version property must begin with an ASCII alphabetic character or numeric digit and must contain only ASCII alphabetic characters, numeric digits, the period, and the dash.</regexMessage>
                </requireProperty>
                <requireProperty>
                  <property>extension.vendor.name</property>
                  <message>You must set an extension.vendor.name property.</message>
                </requireProperty>
                <requireProperty>
                  <property>extension.vendor.id</property>
                  <message>You must set an extension.vendor.id property.</message>
                  <regex>([a-zA-Z_$][a-zA-Z\d_$]*\.)*[a-zA-Z_$][a-zA-Z\d_$]*</regex>
                  <regexMessage>The extension.vendor.id property must must be provided and should use a notation similar to that of Java packages.</regexMessage>
                </requireProperty>
                <requireProperty>
                  <property>extension.vendor.url</property>
                  <message>You must set an extension.vendor.url property.</message>
                </requireProperty>
                <requireProperty>
                  <property>extension.vendor.contact</property>
                  <message>You must set an extension.vendor.contact property.</message>
                </requireProperty>
                <requireProperty>
                  <property>include.source</property>
                  <message>You must set an include.source property.</message>
                  <regex>(true|false)</regex>
                  <regexMessage>The include.source property must have a value of either 'true' or 'false'.</regexMessage>
                </requireProperty>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.0.0</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.4</version>
        <configuration>
          <outputDirectory>${project.build.directory}/javadoc</outputDirectory>
          <stylesheetfile>javadoc/ping-javadoc-stylesheet.css</stylesheetfile>
          <linksource>${include.source}</linksource>
          <show>protected</show>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.6</version>
        <configuration>
          <archive>
            <addMavenDescriptor>false</addMavenDescriptor>
            <index>true</index>
            <manifest>
              <addClasspath>false</addClasspath>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
            <manifestEntries>
              <Build-Time>${maven.build.timestamp}</Build-Time>
              <Extension-Support-Contact>${extension.vendor.contact}</Extension-Support-Contact>
              <UnboundID-Server-SDK-Version>${server-sdk.version}</UnboundID-Server-SDK-Version>
            </manifestEntries>
          </archive>
          <excludes>
            <exclude>velocity/</exclude>
            <exclude>velocity/*</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.unboundid</groupId>
        <artifactId>server-sdk-docs-maven-plugin</artifactId>
        <version>1.0.3-SNAPSHOT</version>
        <configuration>
          <!-- The following configuration may be customized, if needed. -->
          <velocityResourceLoaderPath>${project.basedir}/src/main/resources/velocity</velocityResourceLoaderPath>
          <indexTemplate>index.html.vm</indexTemplate>
          <extensionTemplate>extension.html.vm</extensionTemplate>
        </configuration>
        <dependencies>
          <!-- This adds the Server SDK extension(s) to the plugin's classpath
          so that it can process arguments, example usages, etc. -->
          <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>${project.artifactId}</artifactId>
            <version>${project.version}</version>
          </dependency>
          <dependency>
            <groupId>com.unboundid</groupId>
            <artifactId>server-sdk</artifactId>
            <version>${server-sdk.maven-version}</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>build-server-sdk-docs</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.2-beta-5</version>
        <executions>
          <execution>
            <id>create-zip-archive</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>src/main/assembly/assembly.xml</descriptor>
              </descriptors>
              <finalName>${extension.vendor.id}.${extension.name}-${project.version}</finalName>
              <appendAssemblyId>false</appendAssemblyId>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>com.unboundid</groupId>
      <artifactId>server-sdk</artifactId>
      <version>${server-sdk.maven-version}</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>

</project>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy