Skip to content

Commit

Permalink
Adiciona profile de deploy no pom.xml
Browse files Browse the repository at this point in the history
Signed-off-by: Manoel Campos <manoelcampos@gmail.com>
  • Loading branch information
manoelcampos committed Jun 12, 2023
1 parent 9a82af7 commit 99b63b9
Showing 1 changed file with 121 additions and 0 deletions.
121 changes: 121 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<description>
Biblioteca Java para geração de QRCode PIX "Copia e Cola" e exportação do código para imagem.
</description>
<url>https://github.com/competeaqui/qrcode-pix-java</url>

<inceptionYear>2023</inceptionYear>

Expand Down Expand Up @@ -54,6 +55,126 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<profiles>
<profile>
<!--
A profile used to execute all goals required to deploy
the project to the Maven Central.
To execute use: mvn clean deploy -P sonatype
To check the deployed artifact and probably release it to maven central
you should visit https://oss.sonatype.org.
MAKE SURE YOU ARE LOGGED IN TO SEE YOUR DEPLOYMENTS.
-->
<id>sonatype</id>

<!--
URLs to deploy the project at the Maven Central (http://mvnrepository.com)
using a Sonatype account (http://central.sonatype.org)
See the "all" profile in this pom for deployment information.
-->
<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>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- Forking the process was causing runtime exceptions
when running tests with Java 10+ -->
<forkCount>0</forkCount>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<failOnError>false</failOnError>
</configuration>
</plugin>

<!--
Signs the generated jar using GPG, as required for deploying at the Maven Central.
Configurations are defined into the local repo settings.xml
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<!-- Prevent `gpg` from using pinentry programs
and avoid "gpg: signing failed: Inappropriate ioctl for device" error. -->
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>

<!--
Plugin to deploy to the maven central using a Sonatype account.
Credentials are defined into the local repo settings.xml
-->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>competeaqui-ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<!--If the artifact will be automatically released to maven central after the upload to sonatype.-->
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<!-- Necessário para executar o JUnit em projetos Maven -->
Expand Down

0 comments on commit 99b63b9

Please sign in to comment.