mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-12-29 03:39:48 +01:00
284 lines
8.9 KiB
XML
284 lines
8.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
|
|
MIT License
|
|
|
|
Copyright (c) 2020-present Cloudogu GmbH and Contributors
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
in the Software without restriction, including without limitation the rights
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included in all
|
|
copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
SOFTWARE.
|
|
|
|
-->
|
|
<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>
|
|
|
|
<parent>
|
|
<groupId>sonia.scm.packaging</groupId>
|
|
<artifactId>scm-packaging</artifactId>
|
|
<version>2.12.0-SNAPSHOT</version>
|
|
</parent>
|
|
|
|
<artifactId>docker</artifactId>
|
|
<packaging>pom</packaging>
|
|
<version>2.12.0-SNAPSHOT</version>
|
|
|
|
<dependencies>
|
|
|
|
<dependency>
|
|
<groupId>sonia.scm</groupId>
|
|
<artifactId>scm-server</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
|
|
<plugin>
|
|
<groupId>pl.project13.maven</groupId>
|
|
<artifactId>git-commit-id-plugin</artifactId>
|
|
<version>4.0.0</version>
|
|
<executions>
|
|
<execution>
|
|
<id>get-git-commit-id</id>
|
|
<goals>
|
|
<goal>revision</goal>
|
|
</goals>
|
|
<phase>initialize</phase>
|
|
</execution>
|
|
</executions>
|
|
<configuration>
|
|
<skipPoms>false</skipPoms>
|
|
<includeOnlyProperties>
|
|
<includeOnlyProperty>^git.commit.id.abbrev$</includeOnlyProperty>
|
|
</includeOnlyProperties>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-resources-plugin</artifactId>
|
|
<version>3.1.0</version>
|
|
<executions>
|
|
<execution>
|
|
<id>copy-dockerfile</id>
|
|
<phase>prepare-package</phase>
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
|
|
<configuration>
|
|
<outputDirectory>${project.build.directory}/build</outputDirectory>
|
|
<resources>
|
|
<resource>
|
|
<directory>.</directory>
|
|
<includes>
|
|
<include>Dockerfile</include>
|
|
</includes>
|
|
<filtering>false</filtering>
|
|
</resource>
|
|
</resources>
|
|
</configuration>
|
|
|
|
</execution>
|
|
<execution>
|
|
<id>copy-sources</id>
|
|
<phase>prepare-package</phase>
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
|
|
<configuration>
|
|
<outputDirectory>${project.build.directory}/build</outputDirectory>
|
|
<resources>
|
|
<resource>
|
|
<directory>src/main/fs</directory>
|
|
<filtering>false</filtering>
|
|
<excludes>
|
|
<exclude>**/scm/*</exclude>
|
|
</excludes>
|
|
</resource>
|
|
<resource>
|
|
<directory>src/main/fs</directory>
|
|
<filtering>true</filtering>
|
|
<includes>
|
|
<include>**/scm/*</include>
|
|
</includes>
|
|
</resource>
|
|
</resources>
|
|
</configuration>
|
|
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
|
<version>3.1.2</version>
|
|
<executions>
|
|
<execution>
|
|
<id>copy-server</id>
|
|
<phase>prepare-package</phase>
|
|
<goals>
|
|
<goal>copy-dependencies</goal>
|
|
</goals>
|
|
<configuration>
|
|
<includeScope>runtime</includeScope>
|
|
<outputDirectory>${project.build.directory}/build/opt/scm-server/lib</outputDirectory>
|
|
<overWriteReleases>false</overWriteReleases>
|
|
<overWriteSnapshots>false</overWriteSnapshots>
|
|
<overWriteIfNewer>true</overWriteIfNewer>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>copy-webapp</id>
|
|
<phase>prepare-package</phase>
|
|
<goals>
|
|
<goal>copy</goal>
|
|
</goals>
|
|
<configuration>
|
|
<artifactItems>
|
|
<artifactItem>
|
|
<groupId>sonia.scm</groupId>
|
|
<artifactId>scm-webapp</artifactId>
|
|
<version>${project.version}</version>
|
|
<type>war</type>
|
|
<outputDirectory>${project.build.directory}/build/opt/scm-server/var/webapp</outputDirectory>
|
|
<destFileName>scm-webapp.war</destFileName>
|
|
</artifactItem>
|
|
</artifactItems>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-deploy-plugin</artifactId>
|
|
<version>2.8.2</version>
|
|
<configuration>
|
|
<skip>true</skip>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<groupId>org.codehaus.gmavenplus</groupId>
|
|
<artifactId>gmavenplus-plugin</artifactId>
|
|
<version>1.9.0</version>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.codehaus.groovy</groupId>
|
|
<artifactId>groovy-all</artifactId>
|
|
<version>3.0.3</version>
|
|
<type>pom</type>
|
|
<scope>runtime</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
<executions>
|
|
<execution>
|
|
<id>set-repository-and-version</id>
|
|
<phase>initialize</phase>
|
|
<goals>
|
|
<goal>execute</goal>
|
|
</goals>
|
|
<configuration>
|
|
<scripts>
|
|
<script>${project.basedir}/src/main/build/name.groovy</script>
|
|
</scripts>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>add-package-yml</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>execute</goal>
|
|
</goals>
|
|
<configuration>
|
|
<scripts>
|
|
<script>${project.basedir}/src/main/build/packageYaml.groovy</script>
|
|
</scripts>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<groupId>com.spotify</groupId>
|
|
<artifactId>dockerfile-maven-plugin</artifactId>
|
|
<version>1.4.13</version>
|
|
<configuration>
|
|
<repository>${docker.repository}</repository>
|
|
<useMavenSettingsForAuth>true</useMavenSettingsForAuth>
|
|
<contextDirectory>target/build</contextDirectory>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>build</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>build</goal>
|
|
</goals>
|
|
<configuration>
|
|
<tag>${docker.tag}</tag>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>build-latest</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>build</goal>
|
|
</goals>
|
|
<configuration>
|
|
<tag>latest</tag>
|
|
<skip>${docker.skipLatest}</skip>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>push</id>
|
|
<phase>deploy</phase>
|
|
<goals>
|
|
<goal>push</goal>
|
|
</goals>
|
|
<configuration>
|
|
<tag>${docker.tag}</tag>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>push-latest</id>
|
|
<phase>deploy</phase>
|
|
<goals>
|
|
<goal>push</goal>
|
|
</goals>
|
|
<configuration>
|
|
<tag>latest</tag>
|
|
<skip>${docker.skipLatest}</skip>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
</plugins>
|
|
</build>
|
|
|
|
</project>
|