<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>org.m1theo</groupId>
 <artifactId>apt-repo</artifactId>
 <version>0.2.3</version>
 <packaging>maven-plugin</packaging>

 <name>apt-repo Maven Plugin</name>

 <description>This plugin turns your maven build for deb files into an apt-repository. 
It is meant to be used in conjunction with plugins like "jdeb", which generate deb files from 
your artifacts. apt-repo will generate an apt Release and Packages.gz file for these deb files. 
Therefore the apt command will recognize your maven build as a valid repo.</description>

 <url>https://github.com/theoweiss/apt-repo</url>
 <licenses>
  <license>
   <name>Eclipse Public License - v 1.0</name>
   <url>http://www.eclipse.org/legal/epl-v10.html</url>
   <distribution>repo</distribution>
  </license>
 </licenses>

  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>

 <scm>
  <connection>scm:git:git://github.com/theoweiss/apt-repo.git</connection>
  <url>https://github.com/theoweiss/apt-repo.git</url>
  <developerConnection>scm:git:git@github.com:theoweiss/apt-repo.git</developerConnection>
 </scm>

 <developers>
  <developer>
   <id>theoweiss</id>
   <name>Thomas Weiss</name>
   <email>theo@m1theo.org</email>
   <roles>
    <role>Lead Developer</role>
   </roles>
   <timezone>+1</timezone>
  </developer>
 </developers>

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

 <dependencies>
  <dependency>
   <groupId>org.apache.maven</groupId>
   <artifactId>maven-plugin-api</artifactId>
   <version>2.0</version>
  </dependency>
  <dependency>
   <groupId>org.apache.maven.plugin-tools</groupId>
   <artifactId>maven-plugin-annotations</artifactId>
   <version>3.2</version>
   <scope>provided</scope>
  </dependency>
  <dependency>
   <groupId>org.codehaus.plexus</groupId>
   <artifactId>plexus-utils</artifactId>
   <version>3.0.8</version>
  </dependency>
  <dependency>
   <groupId>junit</groupId>
   <artifactId>junit</artifactId>
   <version>4.8.2</version>
   <scope>test</scope>
  </dependency>
  <dependency>
   <groupId>org.apache.commons</groupId>
   <artifactId>commons-compress</artifactId>
   <version>1.5</version>
  </dependency>
  <dependency>
   <groupId>commons-codec</groupId>
   <artifactId>commons-codec</artifactId>
   <version>1.2</version>
  </dependency>
   <dependency>
    <groupId>org.apache.maven</groupId>
     <artifactId>maven-project</artifactId>
     <version>${mavenVersion}</version>
   </dependency>
 </dependencies>

 <build>
  <plugins>
   <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-plugin-plugin</artifactId>
    <version>3.2</version>
    <configuration>
     <goalPrefix>apt-repo</goalPrefix>
     <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
    </configuration>
    <executions>
     <execution>
      <id>mojo-descriptor</id>
      <goals>
       <goal>descriptor</goal>
      </goals>
     </execution>
     <execution>
      <id>help-goal</id>
      <goals>
       <goal>helpmojo</goal>
      </goals>
     </execution>
    </executions>
   </plugin>
  </plugins>
 </build>
 <profiles>
  <profile>
   <id>run-its</id>
   <build>
    <pluginManagement>
     <plugins>
      <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-release-plugin</artifactId>
       <version>2.4.2</version>
       <configuration>
        <mavenExecutorId>forked-path</mavenExecutorId>
        <useReleaseProfile>false</useReleaseProfile>
        <arguments>${arguments} -Psonatype-oss-release</arguments>
       </configuration>
      </plugin>
     </plugins>
    </pluginManagement>
    <plugins>
     <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-invoker-plugin</artifactId>
      <version>1.7</version>
      <configuration>
       <debug>true</debug>
       <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
       <pomIncludes>
        <pomInclude>*/pom.xml</pomInclude>
       </pomIncludes>
       <postBuildHookScript>verify</postBuildHookScript>
       <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
       <settingsFile>src/it/settings.xml</settingsFile>
       <goals>
        <goal>clean</goal>
        <goal>test-compile</goal>
       </goals>
      </configuration>
      <executions>
       <execution>
        <id>integration-test</id>
        <goals>
         <goal>install</goal>
         <goal>integration-test</goal>
         <goal>verify</goal>
        </goals>
       </execution>
      </executions>
     </plugin>
    </plugins>
   </build>
  </profile>
  <profile>
   <id>release-sign-artifacts</id>
   <activation>
    <property>
     <name>performRelease</name>
     <value>true</value>
    </property>
   </activation>
   <build>
    <plugins>
     <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-gpg-plugin</artifactId>
      <version>1.4</version>
      <executions>
       <execution>
        <id>sign-artifacts</id>
        <phase>verify</phase>
        <goals>
         <goal>sign</goal>
        </goals>
       </execution>
      </executions>
     </plugin>
    </plugins>
   </build>
  </profile>
 </profiles>
</project>
