Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ target/

# rbenv for pimpmychangelog
.ruby-version

.flattened-pom.xml
27 changes: 23 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ stages:
variables:
REGISTRY: registry.ddbuild.io

# From the tagged repo, push the release artifact
deploy_to_sonatype:
.sonatype_release:
stage: deploy_to_sonatype

rules:
Expand All @@ -19,6 +18,10 @@ deploy_to_sonatype:

image: $REGISTRY/images/mirror/maven:3.9-eclipse-temurin-17

variables:
# Pom of the project to release, relative to the repository root.
RELEASE_POM: ./pom.xml

script:
# Ensure we don't print commands being run to the logs during credential
# operations
Expand All @@ -43,8 +46,12 @@ deploy_to_sonatype:

- set -x

- echo "Building release..."
- mvn -DperformRelease=true --settings ./settings.xml clean deploy
- echo "Building release of $RELEASE_POM..."
- mvn -DperformRelease=true --settings ./settings.xml -f "$RELEASE_POM" clean deploy

# From the tagged repo, push the release artifact
deploy_to_sonatype:
extends: .sonatype_release

artifacts:
expire_in: 6 mos
Expand All @@ -57,6 +64,18 @@ deploy_to_sonatype:
- ./target/*.sha256
- ./target/*.sha512

deploy_dogstatsd_http:
extends: .sonatype_release
variables:
RELEASE_POM: ./dogstatsd-http/pom.xml
artifacts:
expire_in: 6 mos
paths:
- ./dogstatsd-http/core/target/*.jar
- ./dogstatsd-http/core/target/*.asc
- ./dogstatsd-http/forwarder/target/*.jar
- ./dogstatsd-http/forwarder/target/*.asc

# This job creates the GPG key used to sign the releases
create_key:
stage: create_key
Expand Down
21 changes: 1 addition & 20 deletions dogstatsd-http/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.datadoghq</groupId>
<artifactId>dogstatsd-http</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${version}</version>
</parent>

<artifactId>dogstatsd-http-core</artifactId>
Expand All @@ -22,23 +22,4 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19</version>
</plugin>
</plugins>
</build>
</project>
27 changes: 6 additions & 21 deletions dogstatsd-http/forwarder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,23 @@
<parent>
<groupId>com.datadoghq</groupId>
<artifactId>dogstatsd-http</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${version}</version>
</parent>

<artifactId>dogstatsd-http-forwarder</artifactId>
<packaging>jar</packaging>
<name>dogstatsd-http-forwarder</name>
<description>HTTP forwarder for DogStatsD metrics.</description>

<properties>
<maven.compiler.release>11</maven.compiler.release>
</properties>

<dependencies>
<dependency>
<groupId>com.datadoghq</groupId>
<artifactId>dogstatsd-http-core</artifactId>
<version>${project.version}</version>
<version>${version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand All @@ -27,23 +31,4 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19</version>
</plugin>
</plugins>
</build>
</project>
130 changes: 127 additions & 3 deletions dogstatsd-http/pom.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
<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">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
child.project.url.inherit.append.path="false">
<modelVersion>4.0.0</modelVersion>

<groupId>com.datadoghq</groupId>
<artifactId>dogstatsd-http</artifactId>
<packaging>pom</packaging>
<name>dogstatsd-http</name>
<version>1.0.0-SNAPSHOT</version>
<version>${version}</version>
<description>Aggregator for the DogStatsD HTTP client modules.</description>
<url>https://github.com/DataDog/java-dogstatsd-client</url>

<properties>
<version>1.0.0-SNAPSHOT</version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>7</maven.compiler.release>
</properties>

<licenses>
Expand All @@ -23,7 +26,9 @@
</license>
</licenses>

<scm>
<scm child.scm.url.inherit.append.path="false"
child.scm.connection.inherit.append.path="false"
child.scm.developerConnection.inherit.append.path="false">
<url>https://github.com/DataDog/java-dogstatsd-client</url>
<connection>scm:git:git@github.com:DataDog/java-dogstatsd-client.git</connection>
<developerConnection>scm:git:git@github.com:Datadog/java-dogstatsd-client.git</developerConnection>
Expand All @@ -37,6 +42,47 @@
</developer>
</developers>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<release>${maven.compiler.release}</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.8.0</version>
<configuration>
<flattenMode>ossrh</flattenMode>
</configuration>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<execution>
<id>flatten.clean</id>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>spotless</id>
Expand Down Expand Up @@ -68,6 +114,84 @@
</plugins>
</build>
</profile>

<profile>
<id>deploy-artifacts</id>
<activation>
<activeByDefault>false</activeByDefault>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.8.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<waitUntil>validated</waitUntil>
<deploymentName>dogstatsd-http:${project.version}</deploymentName>
<!-- The aggregator pom is build-time only: children are flattened
into standalone poms with no parent reference, so it is never
resolved by consumers and must not be published. -->
<excludeArtifacts>
<excludeArtifact>dogstatsd-http</excludeArtifact>
</excludeArtifacts>
</configuration>
</plugin>
<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>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<modules>
Expand Down
Loading