Skip to content

Commit

Permalink
Fulfill requirement for publishing to Maven central
Browse files Browse the repository at this point in the history
  • Loading branch information
fstab committed Jul 4, 2021
1 parent 4a14263 commit 750c431
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 4 deletions.
12 changes: 12 additions & 0 deletions integration_tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,16 @@
</dependency>
</dependencies>
</dependencyManagement>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
47 changes: 47 additions & 0 deletions jmx_prometheus_javaagent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,53 @@
</plugins>
</build>

<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
<configuration>
<!-- Artifacts published to Maven central must have a source JAR. -->
<!-- Include pom.xml so that the source JAR is not empty. -->
<includePom>true</includePom>
</configuration>
</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>
<configuration>
<!-- Artifacts published to Maven central must have a javadoc JAR. -->
<!-- Copy the javadoc over from the Java 6 module. -->
<includeDependencySources>true</includeDependencySources>
<dependencySourceIncludes>
<dependencySourceInclude>${project.groupId}:jmx_prometheus_javaagent_java6</dependencySourceInclude>
</dependencySourceIncludes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
Expand Down
11 changes: 7 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
<tag>HEAD</tag>
</scm>

<developers>
<developer>
<name>Fabian Stäber</name>
<email>[email protected]</email>
</developer>
</developers>

<modules>
<module>collector</module>
<module>jmx_prometheus_httpserver</module>
Expand Down Expand Up @@ -102,10 +109,6 @@
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
Expand Down

0 comments on commit 750c431

Please sign in to comment.