Skip to content

Commit

Permalink
Add configuration of mvn packge for future releasing into pom (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
kornys authored Feb 6, 2024
2 parents 82cd781 + 2ebbb5c commit 351ad83
Showing 1 changed file with 127 additions and 2 deletions.
129 changes: 127 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,33 @@
<packaging>pom</packaging>
<version>0.0.1-SNAPSHOT</version>

<licenses>
<license>
<name>The Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>

<name>Test Metadata Generator</name>
<description>Generates metadata for junit tests</description>
<url>https://github.com/skodjob/test-metadata-generator</url>

<scm>
<connection>scm:git:git:/github.com/skodjob/test-metadata-generator.git</connection>
<developerConnection>scm:git:ssh://github.com/skodjob/test-metadata-generator.git</developerConnection>
<url>https://github.com/skodjob/test-metadata-generator</url>
</scm>

<issueManagement>
<system>GitHub</system>
<url>https://github.com/skodjob/test-metadata-generator/issues</url>
</issueManagement>

<developers>
<developer>
<id>im-konge</id>
<name>Lukáš Král</name>
<email>[email protected]</email>
<organization>Red Hat</organization>
<organizationUrl>https://www.redhat.com</organizationUrl>
</developer>
<developer>
<id>kornys</id>
Expand All @@ -28,6 +49,17 @@
</developer>
</developers>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<modules>
<module>test-docs-generator-maven-plugin</module>
</modules>
Expand All @@ -38,6 +70,10 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.source.plugin.version>3.3.0</maven.source.plugin.version>
<maven.deploy.plugin.version>3.1.1</maven.deploy.plugin.version>
<maven.gpg.version>3.0.1</maven.gpg.version>
<sonatype.nexus.staging>1.6.7</sonatype.nexus.staging>
<maven.javadoc.version>3.4.1</maven.javadoc.version>
<maven.assembly.version>3.4.2</maven.assembly.version>
</properties>

<dependencyManagement>
Expand All @@ -52,6 +88,24 @@

<build>
<plugins>
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-javadoc-plugin</artifactId>-->
<!-- <version>${maven.javadoc.version}</version>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <id>attach-javadocs</id>-->
<!-- <goals>-->
<!-- <goal>jar</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <show>public</show>-->
<!-- <failOnError>true</failOnError>-->
<!-- <failOnWarnings>true</failOnWarnings>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>${maven.source.plugin.version}</version>
Expand Down Expand Up @@ -81,4 +135,75 @@
</plugins>
</build>

<profiles>
<profile>
<id>ossrh</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<!--suppress UnresolvedMavenProperty -->
<gpg.executable>${env.GPG_EXECUTABLE}</gpg.executable>
<!--suppress UnresolvedMavenProperty -->
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven.gpg.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--batch</arg>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${sonatype.nexus.staging}</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven.assembly.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<tarLongFileMode>posix</tarLongFileMode>
<descriptors>
<descriptor>src/main/assembly/dist.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>

0 comments on commit 351ad83

Please sign in to comment.