build-profile
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>org.quattor.maven</groupId>
<artifactId>build-profile</artifactId>
<version>1.63</version>
</dependency><?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>build-profile</artifactId>
<packaging>pom</packaging>
<name>build-profile</name>
<url>http://quattor.org/cfg-modules/</url>
<parent>
<groupId>org.quattor.maven</groupId>
<artifactId>maven</artifactId>
<version>1.63</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<RELEASE>${rpm.release}</RELEASE>
<build-info>
#
# ${project.artifactId}, ${project.version}, ${RELEASE}, ${maven.build.timestamp}
#
</build-info>
<man.page.dir>/usr/share/man</man.page.dir>
<prove.args>-q</prove.args>
<unittest />
<!-- perl module headers.
Usage: at the beginning of the module put:
#${PMpre} Some::Namespace::packagename${PMpost}
The space after the ${PMpre} is mandatory, due to maven space eating properties
TODO: http://stackoverflow.com/questions/7389995/how-do-i-preserve-whitespace-in-a-maven-plugin-configuration
TODO: Should add up to 20 lines of text for fixed offset? -> move to the QuattorBuild.java
-->
<PMpre>${line.separator}
${license-info}
${developer-info}
${author-info}
package
</PMpre>
<!-- version numbers should be boring: http://www.dagolden.com/index.php/369/version-numbers-should-be-boring/
always use 'use version;' and a version instance for pre 5.10 support
you can now refer to these modules with vstrings: 'use X::Y::Z v1.2.3;'
-->
<PMpost>;
use strict;
use warnings;
use version;
our $VERSION = version->new("v${no-snapshot-version}");
${line.separator}
</PMpost>
<!--
Generic component config.pan template
Assumes main component type to be named <name>_component
Ends with a pan /software/components/<name> prefix
-->
<PMcomponent>${PMpre} NCM::Component::${project.artifactId}${PMpost}</PMcomponent>
<componentconfignospma>
${license-info}
${developer-info}
${author-info}
unique template components/${project.artifactId}/config;
include 'components/${project.artifactId}/schema';
bind '/software/components/${project.artifactId}' = ${project.artifactId}_component;
'/software/packages' = pkg_repl('ncm-${project.artifactId}', '${no-snapshot-version}-${rpm.release}', 'noarch');
include if_exists('components/${project.artifactId}/site-config');
prefix '/software/components/${project.artifactId}';
'active' ?= true;
'dispatch' ?= true;
'version' ?= '${no-snapshot-version}';
</componentconfignospma>
<componentconfig>
${componentconfignospma}
'dependencies/pre' ?= list('spma');
</componentconfig>
<componentschema>
${license-info}
${developer-info}
${author-info}
declaration template components/${project.artifactId}/schema;
</componentschema>
<changelogtimestamp>${maven.build.timestamp}</changelogtimestamp>
<maven.build.timestamp.format>E MMM dd yyyy</maven.build.timestamp.format>
</properties>
<dependencies>
<dependency>
<groupId>org.quattor.maven</groupId>
<artifactId>assemblies</artifactId>
<type>tar.gz</type>
<version>1.63</version>
<classifier>assemblies</classifier>
</dependency>
<dependency>
<groupId>org.quattor.maven</groupId>
<artifactId>build-scripts</artifactId>
<type>tar.gz</type>
<version>1.63</version>
<classifier>scripts</classifier>
</dependency>
</dependencies>
<repositories>
<repository>
<id>quattor-releases</id>
<url>${release.url}</url>
</repository>
</repositories>
<profiles>
<profile>
<id>cfg-module-rpm</id>
<activation>
<file>
<exists>/usr/bin/rpmbuild</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
<executions>
<execution>
<id>build-rpm</id>
<goals>
<goal>attached-rpm</goal>
</goals>
</execution>
<execution>
<id>setup-version</id>
<goals>
<goal>version</goal>
</goals>
<phase>process-sources</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.5.4</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>cfg-module-dist</id>
<activation>
<file>
<missing>deactivate.cfg.module.dist</missing>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.quattor.maven</groupId>
<artifactId>quattor-build-maven-plugin</artifactId>
<executions>
<execution>
<id>set-build-properties</id>
<goals>
<goal>set-build-properties</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>filter-changelog</id>
<phase>compile</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<encoding>UTF-8</encoding>
<delimiters>
<delimiter>${*}</delimiter>
</delimiters>
<useDefaultDelimiters>false</useDefaultDelimiters>
<outputDirectory>${project.build.directory}</outputDirectory>
<resources>
<resource>
<directory>${project.build.directory}/dependency/build-scripts/</directory>
<filtering>true</filtering>
<includes>
<include>ChangeLog.template</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>filter-pan-sources</id>
<phase>process-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<encoding>UTF-8</encoding>
<delimiters>
<delimiter>${*}</delimiter>
</delimiters>
<useDefaultDelimiters>false</useDefaultDelimiters>
<outputDirectory>${project.build.directory}/pan/</outputDirectory>
<resources>
<resource>
<directory>src/main/pan</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>filter-perl-sources</id>
<phase>process-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<encoding>UTF-8</encoding>
<delimiters>
<delimiter>${*}</delimiter>
</delimiters>
<useDefaultDelimiters>false</useDefaultDelimiters>
<outputDirectory>${project.build.directory}/lib/perl/NCM/Component</outputDirectory>
<resources>
<resource>
<directory>src/main/perl</directory>
<filtering>true</filtering>
<includes>
<include>*.pm</include>
<include>**/*.pm</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>filter-pod-sources</id>
<phase>process-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<encoding>UTF-8</encoding>
<delimiters>
<delimiter>${*}</delimiter>
</delimiters>
<useDefaultDelimiters>false</useDefaultDelimiters>
<outputDirectory>${project.build.directory}/doc/pod/NCM/Component</outputDirectory>
<resources>
<resource>
<directory>src/main/perl</directory>
<filtering>true</filtering>
<includes>
<include>*.pod</include>
<include>**/*.pod</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.quattor.pan</groupId>
<artifactId>panc-maven-plugin</artifactId>
<version>10.8</version>
<executions>
<execution>
<id>check-generated-pan-syntax</id>
<phase>compile</phase>
<goals>
<goal>check-syntax</goal>
</goals>
<configuration>
<sourceDirectory>${project.build.directory}/pan</sourceDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-assemblies-scripts</id>
<phase>process-sources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.quattor.maven</groupId>
<artifactId>assemblies</artifactId>
<type>tar.gz</type>
<classifier>assemblies</classifier>
</artifactItem>
<artifactItem>
<groupId>org.quattor.maven</groupId>
<artifactId>build-scripts</artifactId>
<type>tar.gz</type>
<classifier>scripts</classifier>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>pod2man</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${project.build.directory}/dependency/build-scripts/pod2man.pl</executable>
<workingDirectory>${basedir}</workingDirectory>
<arguments>
<argument>${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<extensions>true</extensions>
<executions>
<execution>
<id>tarballs</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptorSourceDirectory>${project.build.directory}/dependency/assemblies</descriptorSourceDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.5.4</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>module-test</id>
<activation>
<property>
<name>env.PERL5LIB</name>
</property>
<file>
<missing>deactivate.module.test</missing>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>prove</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>prove</executable>
<workingDirectory>${basedir}</workingDirectory>
<arguments>
<argument>-I</argument>
<argument>${project.build.directory}/lib/perl</argument>
<argument>-I</argument>
<argument>src/test/perl</argument>
<argument>${prove.args}</argument>
<argument>-I</argument>
<argument>${project.build.directory}/dependency/build-scripts/</argument>
<argument>src/test/perl/${unittest}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.5.4</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>building-module</id>
<activation>
<file>
<exists>src/main</exists>
</file>
</activation>
<distributionManagement>
<repository>
<id>quattor.releases</id>
<name>Releases</name>
<url>${release.url}</url>
</repository>
<snapshotRepository>
<id>quattor.snapshots</id>
<name>Snapshots</name>
<url>${snapshot.url}</url>
</snapshotRepository>
</distributionManagement>
</profile>
</profiles>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.quattor.maven</groupId>
<artifactId>quattor-build-maven-plugin</artifactId>
<version>1.63</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
<configuration>
<release>${RELEASE}</release>
<summary>NCM component for ${project.artifactId}</summary>
<name>ncm-${project.artifactId}</name>
<group>System Environment/Base</group>
<packager>Quattor</packager>
<vendor>Quattor</vendor>
<defaultDirmode>755</defaultDirmode>
<defaultFilemode>644</defaultFilemode>
<defaultUsername>root</defaultUsername>
<defaultGroupname>root</defaultGroupname>
<license>ASL 2.0 and EU Datagrid</license>
<copyright>${license-url}</copyright>
<url>https://github.com/quattor/configuration-modules-core/tree/master/ncm-${project.artifactId}</url>
<changelogFile>${project.build.directory}/ChangeLog.template</changelogFile>
<needarch>noarch</needarch>
<description>${project.name}</description>
<mappings>
<mapping>
<directory>/usr/lib</directory>
<directoryIncluded>false</directoryIncluded>
<sources>
<source>
<location>${project.build.directory}/lib</location>
</source>
</sources>
</mapping>
<mapping>
<directory>/usr/share/doc/ncm-${project.artifactId}-${project.version}</directory>
<filemode>644</filemode>
<username>root</username>
<groupname>root</groupname>
<documentation>true</documentation>
<directoryIncluded>false</directoryIncluded>
<sources>
<source>
<location>${project.build.directory}</location>
<includes>
<include>ChangeLog.template</include>
</includes>
</source>
</sources>
</mapping>
<mapping>
<directory>/usr/share/doc/pan</directory>
<documentation>true</documentation>
<directoryIncluded>false</directoryIncluded>
<sources>
<source>
<location>${project.build.directory}/pan</location>
</source>
</sources>
</mapping>
<mapping>
<directory>${man.page.dir}</directory>
<documentation>true</documentation>
<directoryIncluded>false</directoryIncluded>
<sources>
<source>
<location>${project.build.directory}/doc/man</location>
</source>
</sources>
</mapping>
</mappings>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.5.4</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>