Using a profile to keep mvn deployment stuff at bay until wanted

This commit is contained in:
Josh Steele
2024-08-26 15:50:30 -04:00
parent 0f614d9a42
commit d019b4a8ff
2 changed files with 44 additions and 17 deletions

View File

@@ -9,7 +9,7 @@ variables:
VERSION_COMMIT: "GitLab CI Versioning Commit" # Commit text for version update
VERSION_BRANCH: "update_version" # Branch used to merge version update commit
# Sets the artifact cache to a local directory within build area
MAVEN_CLI_OPTS: "-Dmaven.repo.local=../.m2/repository --batch-mode -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN"
MAVEN_CLI_OPTS: "-Dmaven.repo.local=../.m2/repository --batch-mode -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -P internal"
#Workflow rules that filters across the entire pipeline. Cleaner than -o ci.skip since there won't be a "skipped" pipeline.
workflow:

59
pom.xml
View File

@@ -49,20 +49,10 @@
</scm>
<distributionManagement>
<repository>
<id>central</id>
<name>surfshop-releases</name>
<url>http://surfshop.jhuapl.edu:8081/artifactory/libs-release-local</url>
</repository>
<snapshotRepository>
<id>central</id>
<name>surfshop-snapshots</name>
<url>http://surfshop.jhuapl.edu:8081/artifactory/libs-snapshot-local</url>
</snapshotRepository>
<!--<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository> -->
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<properties>
@@ -72,6 +62,45 @@
<maven.compiler.target>16</maven.compiler.target>
</properties>
<profiles>
<profile>
<id>internal</id>
<distributionManagement>
<repository>
<id>central</id>
<name>surfshop-releases</name>
<url>http://surfshop.jhuapl.edu:8081/artifactory/libs-release-local</url>
</repository>
<snapshotRepository>
<id>central</id>
<name>surfshop-snapshots</name>
<url>http://surfshop.jhuapl.edu:8081/artifactory/libs-snapshot-local</url>
</snapshotRepository>
</distributionManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</profile>
</profiles>
<build>
<pluginManagement>
<plugins>
@@ -198,7 +227,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
@@ -207,7 +235,6 @@
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
-->
</plugins>
</build>