Skip to content

Commit

Permalink
Fixed profiles for local deployment and release
Browse files Browse the repository at this point in the history
  • Loading branch information
shashwata committed Mar 5, 2024
1 parent 6c66e55 commit c4ef837
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 23 deletions.
59 changes: 53 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,12 @@
<version>3.5.1</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>

<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
Expand All @@ -294,6 +300,8 @@
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<useReleaseProfile>true</useReleaseProfile>
<releaseProfiles>dist-ossrh</releaseProfiles>
<goals>deploy</goals>
</configuration>
</plugin>
Expand Down Expand Up @@ -353,15 +361,29 @@
</plugins>
</pluginManagement>

<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>install</id>
<activation>
<property>
<name>local-install</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jetbrains.dokka</groupId>
<artifactId>dokka-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>dist-ossrh</id>
<activation>
Expand All @@ -379,6 +401,31 @@
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.jetbrains.dokka</groupId>
<artifactId>dokka-maven-plugin</artifactId>
</plugin>

<!-- Release plugin will generate source jars as well -->

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>

<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>

Expand Down
21 changes: 4 additions & 17 deletions r2dbi-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,39 +154,26 @@

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jetbrains.dokka</groupId>
<artifactId>dokka-maven-plugin</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<configuration>
<runOrder>random</runOrder>
<includes>
<include>**/*Tests.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<artifactId>maven-deploy-plugin</artifactId>
</plugin>
</plugins>
<resources>
Expand Down

0 comments on commit c4ef837

Please sign in to comment.