Skip to content

Commit

Permalink
Merge pull request #428 from bci-oss/chore/maven-publish-to-publish-p…
Browse files Browse the repository at this point in the history
…arentpom

Move maven publish build to parent pom
  • Loading branch information
tunacicek authored Jun 17, 2024
2 parents e1170d9 + 23f8fa3 commit 6b63ff3
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-edc-ext-to-maven-central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Publish to the Maven Central Repository
shell: bash
run: |
mvn clean verify nexus-staging:deploy -f libraries/edc-extension/pom.xml -P release-to-central
mvn clean verify nexus-staging:deploy -P release-to-central
env:
MAVEN_USERNAME: "${{ secrets.ORG_OSSRH_USERNAME }}"
MAVEN_PASSWORD: "${{ secrets.ORG_OSSRH_PASSWORD }}"
Expand Down
37 changes: 2 additions & 35 deletions libraries/edc-extension/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@
<build>
<resources>
<resource>
<directory>${project.parent.basedir}</directory>
<directory>../..</directory>
<includes>
<include>LICENSE</include>
<include>NOTICE.md</include>
<include>DEPENDENCIES</include>
</includes>
<targetPath>META-INF/</targetPath>
<targetPath>META-INF</targetPath>
</resource>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
Expand Down Expand Up @@ -154,37 +154,4 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>release-to-central</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<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>

<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>

</project>
56 changes: 44 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,6 @@
<sonar.java.source>17</sonar.java.source>
</properties>

<modules>
<module>backend</module>
<module>access-control-service-interface</module>
<module>access-control-service-sql-impl</module>
<module>libraries/edc-extension</module>
<!-- more modules are expected to come -->
</modules>

<dependencyManagement>
<dependencies>
<!-- Predefined potential dependencies and versions -->
Expand Down Expand Up @@ -526,6 +518,43 @@
</plugins>
</build>

<profiles>
<profile>
<id>release-to-central</id>
<modules>
<module>libraries/edc-extension</module>
</modules>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<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>
<profile>
<id>default</id>
<modules>
<module>backend</module>
<module>access-control-service-interface</module>
<module>access-control-service-sql-impl</module>
<module>libraries/edc-extension</module>
<!-- more modules are expected to come -->
</modules>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
</profiles>

<repositories>
<repository>
<id>Maven Central</id>
Expand All @@ -535,10 +564,13 @@
</repositories>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/eclipse-tractusx/sldt-digital-twin-registry</url>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</distributionManagement>
</project>

0 comments on commit 6b63ff3

Please sign in to comment.