Skip to content

Commit

Permalink
Fix artifactory deployment.
Browse files Browse the repository at this point in the history
  • Loading branch information
mp911de committed Mar 7, 2023
1 parent 780b864 commit 73af381
Show file tree
Hide file tree
Showing 3 changed files with 205 additions and 21 deletions.
79 changes: 78 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,12 @@
<version>1.1.0</version>
</plugin>

<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>3.4.0</version>
</plugin>

</plugins>
</pluginManagement>
</build>
Expand All @@ -611,13 +617,27 @@
</repositories>
</profile>

<profile>

<id>snapshot</id>

<distributionManagement>
<repository>
<id>spring-libs-snapshot</id>
<name>Spring Snapshot Repository</name>
<url>https://repo.spring.io/libs-snapshot-local</url>
</repository>
</distributionManagement>

</profile>

<profile>

<id>milestone</id>

<distributionManagement>
<repository>
<id>repo.spring.io</id>
<id>spring-libs-milestone</id>
<name>Spring Milestone Repository</name>
<url>https://repo.spring.io/libs-milestone-local</url>
</repository>
Expand Down Expand Up @@ -802,6 +822,63 @@
</plugins>
</build>
</profile>

<profile>

<id>artifactory</id>

<build>

<pluginManagement>
<plugins>

<!-- Deploy to Artifactory -->

<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<id>build-info</id>
<goals>
<goal>publish</goal>
</goals>
<configuration>
<artifactory>
<includeEnvVars>false</includeEnvVars>
</artifactory>
<publisher>
<contextUrl>{{artifactory.server}}</contextUrl>
<username>{{artifactory.username}}</username>
<password>{{artifactory.password}}</password>
<repoKey>{{artifactory.staging-repository}}</repoKey>
<snapshotRepoKey>{{artifactory.staging-repository}}</snapshotRepoKey>
</publisher>
<buildInfo>
<buildName>{{artifactory.build-name}}</buildName>
<buildNumber>{{artifactory.build-number}}</buildNumber>
<buildUrl>{{BUILD_URL}}</buildUrl>
</buildInfo>
</configuration>
</execution>
</executions>
</plugin>

</plugins>
</pluginManagement>

<plugins>

<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
</plugin>

</plugins>

</build>
</profile>
</profiles>

<pluginRepositories>
Expand Down
108 changes: 107 additions & 1 deletion spring-vault-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,27 @@
</build>

<profiles>
<profile>

<id>snapshot</id>

<distributionManagement>
<repository>
<id>spring-libs-snapshot</id>
<name>Spring Snapshot Repository</name>
<url>https://repo.spring.io/libs-snapshot-local</url>
</repository>
</distributionManagement>

</profile>

<profile>

<id>milestone</id>

<distributionManagement>
<repository>
<id>repo.spring.io</id>
<id>spring-libs-milestone</id>
<name>Spring Milestone Repository</name>
<url>https://repo.spring.io/libs-milestone-local</url>
</repository>
Expand Down Expand Up @@ -283,6 +297,98 @@
</build>

</profile>

<profile>

<id>artifactory</id>

<build>

<pluginManagement>
<plugins>

<!-- Deploy to Artifactory -->

<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<id>build-info</id>
<goals>
<goal>publish</goal>
</goals>
<configuration>
<artifactory>
<includeEnvVars>false</includeEnvVars>
</artifactory>
<publisher>
<contextUrl>{{artifactory.server}}</contextUrl>
<username>{{artifactory.username}}</username>
<password>{{artifactory.password}}</password>
<repoKey>{{artifactory.staging-repository}}</repoKey>
<snapshotRepoKey>{{artifactory.staging-repository}}</snapshotRepoKey>
</publisher>
<buildInfo>
<buildName>{{artifactory.build-name}}</buildName>
<buildNumber>{{artifactory.build-number}}</buildNumber>
<buildUrl>{{BUILD_URL}}</buildUrl>
</buildInfo>
</configuration>
</execution>
</executions>
</plugin>

</plugins>
</pluginManagement>

<plugins>

<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
</plugin>

</plugins>

</build>
</profile>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>enforce-no-third-party-snapshots</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireReleaseDeps />
<NoSnapshotDependenciesInDependencyManagementRule implementation="de.smartics.maven.enforcer.rule.NoSnapshotsInDependencyManagementRule">
<onlyWhenRelease>true</onlyWhenRelease>
</NoSnapshotDependenciesInDependencyManagementRule>
</rules>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>de.smartics.rules</groupId>
<artifactId>smartics-enforcer-rules</artifactId>
<version>1.0.2</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
39 changes: 20 additions & 19 deletions spring-vault-distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>2.7.0</version>
<version>3.4.0</version>
<executions>
<execution>
<id>deploy-docs</id>
Expand All @@ -428,13 +428,14 @@
<!-- Retain only a single build -->
<buildName>Spring Vault Docs ${project.version}</buildName>
<buildRetentionCount>1</buildRetentionCount>
<buildUrl>{{BUILD_URL}}</buildUrl>
</buildInfo>
<publisher>
<contextUrl>https://repo.spring.io</contextUrl>
<username>${artifactory.username}</username>
<password>${artifactory.password}</password>
<repoKey>temp-private-local</repoKey>
<snapshotRepoKey>temp-private-local</snapshotRepoKey>
<contextUrl>{{artifactory.server}}</contextUrl>
<username>{{artifactory.username}}</username>
<password>{{artifactory.password}}</password>
<repoKey>{{artifactory.staging-repository}}</repoKey>
<snapshotRepoKey>{{artifactory.staging-repository}}</snapshotRepoKey>
<includePatterns>*.zip</includePatterns>
</publisher>
</configuration>
Expand All @@ -444,20 +445,20 @@
</plugins>
</pluginManagement>
</build>

<pluginRepositories>
<pluginRepository>
<id>bintray-plugins</id>
<name>bintray-plugins</name>
<url>https://jcenter.bintray.com</url>
</pluginRepository>

<pluginRepository>
<id>spring-plugins-release</id>
<url>https://repo.spring.io/plugins-release</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>

<pluginRepositories>
<pluginRepository>
<id>bintray-plugins</id>
<name>bintray-plugins</name>
<url>https://jcenter.bintray.com</url>
</pluginRepository>

<pluginRepository>
<id>spring-plugins-release</id>
<url>https://repo.spring.io/plugins-release</url>
</pluginRepository>
</pluginRepositories>

</project>

0 comments on commit 73af381

Please sign in to comment.