Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move maven publish build to parent pom #428

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