Skip to content

Commit

Permalink
Prepare publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Cédric de Launois committed Feb 21, 2025
1 parent d9f82c3 commit 8ecffcc
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 10 deletions.
24 changes: 24 additions & 0 deletions maven-settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!-- This file provides passwords and key details to the Maven plugins that sign our artifacts
and deploy them to the OSSRH repository. The secret information is passed in with
Travis CI secure environment variables in .travis.yml. -->
<settings>
<servers>
<server>
<id>ossrh</id>
<username>${env.OSSRH_USERNAME}</username>
<password>${env.OSSRH_PASSWORD}</password>
</server>
</servers>
<profiles>
<profile>
<id>ossrh</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>gpg</gpg.executable>
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
</properties>
</profile>
</profiles>
</settings>
49 changes: 39 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
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.delaunois</groupId>
<artifactId>brotherql</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>brotherql</name>
<description>Java library for printing labels using the raster language protocol on Brother QL printers</description>
<url>https://github.com/vxel/brotherql</url>

<groupId>org.delaunois</groupId>
<artifactId>brotherql</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<licenses>
<license>
<name>MIT License</name>
Expand All @@ -31,13 +30,20 @@
<scm>
<connection>scm:git:git://github.com/vxel/brotherql.git</connection>
<developerConnection>scm:git:ssh://github.com:vxel/brotherql.git</developerConnection>
<url>https://github.com/vxel/brotherql/tree/master</url>
<url>https://github.com/vxel/brotherql</url>
</scm>

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

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>

<build>
<plugins>
<plugin>
Expand All @@ -57,8 +63,6 @@
</plugin>

<plugin>


<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.2</version>
Expand All @@ -73,10 +77,24 @@
</configuration>
</plugin>

<plugin>
<!-- Recommended way to deploy to OSSRH -->
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.7.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>false</autoPublish>
<deploymentName>${project.artifactId}:${project.version}</deploymentName>
<waitUntil>validated</waitUntil>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -90,7 +108,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<version>3.10.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -116,6 +134,17 @@
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<arguments>-ntp</arguments>
<scmCommentPrefix/>
<tagNameFormat>v@{project.version}</tagNameFormat>
</configuration>
</plugin>

</plugins>
</build>

Expand Down

0 comments on commit 8ecffcc

Please sign in to comment.