blob: 2e47dcdd5e0efdb55d5fd2c5494b02601798e6f4 [file] [log] [blame]
<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>
<parent>
<groupId>org.eclipse.scada.deploy.repack-incubation</groupId>
<artifactId>org.eclipse.scada.deploy.repack-base</artifactId>
<version>0.3.0.M10</version>
<relativePath>base.xml</relativePath>
</parent>
<groupId>org.eclipse.scada.deploy.repack-incubation</groupId>
<artifactId>org.eclipse.scada.deploy.repack-base.pack</artifactId>
<version>0.3.0.M10</version>
<packaging>pom</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>download-files</id>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- download file -->
<mkdir dir="${project.build.directory}/downloads/" />
<get src="${srcDir}/${srcFile}" dest="${project.build.directory}/downloads/${srcFile}"
usetimestamp="true" />
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>deb</id>
<build>
<plugins>
<plugin>
<artifactId>jdeb</artifactId>
<groupId>org.vafer</groupId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jdeb</goal>
</goals>
<configuration>
<skipPOMs>false</skipPOMs>
<dataSet>
<data>
<src>${project.build.directory}/downloads/${srcFile}</src>
<type>file</type>
<mapper>
<type>perm</type>
<prefix>/usr/share/eclipsescada/p2</prefix>
</mapper>
</data>
</dataSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!--rpm must be a profile since it requires 'rpmbuild' on the target machine -->
<id>rpm</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
<configuration>
<copyright>EPL</copyright>
<distribution>Eclipse NeoSCADA %{version} (Incubation)</distribution>
<group>Application/Misc</group>
<changelogFile>rpm/changelog</changelogFile>
<version>${unqualifiedVersion}</version>
<release>${maven.build.timestamp}</release>
<defineStatements>
<!-- <defineStatement>_unpackaged_files_terminate_build 0</defineStatement> -->
</defineStatements>
</configuration>
<executions>
<execution>
<id>generate-rpm</id>
<goals>
<goal>rpm</goal>
</goals>
<configuration>
<mappings>
<mapping>
<directory>/usr/share/eclipsescada/p2</directory>
<directoryIncluded>false</directoryIncluded>
<filemode>0644</filemode>
<username>root</username>
<groupname>root</groupname>
<sources>
<source>
<location>${project.build.directory}/downloads/${srcFile}</location>
</source>
</sources>
</mapping>
</mappings>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile> <!-- rpm -->
</profiles>
</project>