Skip to content

Commit

Permalink
[MPOM-451] Move shapshot repository elements into a separate profile
Browse files Browse the repository at this point in the history
  • Loading branch information
lprimak committed Dec 19, 2024
1 parent 477dc35 commit f0057ee
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 22 deletions.
9 changes: 8 additions & 1 deletion docs/src/site/apt/index.apt.vm
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ Apache Software Foundation Parent POM

** <<url>>: {{<<<https://www.apache.org/>>>}}. You should override this.

** <<repositories>>: The pom adds the Apache snapshot
** <<repositories>>: Optional: the pom adds the Apache snapshot
repository ({{<<<https://repository.apache.org/snapshots>>>}})
This only happens if the <<<apache.snapshots>>> property is set,
or the <<<use-apache-snapshots>>> profile is active.

** <<distributionManagement>>: The POM sets up for releases to the Apache Nexus
instance at
Expand Down Expand Up @@ -191,6 +193,11 @@ Notices

When you need publish site descriptor in your project you should add, like:

* Since version <<34>> <<<repositories>>> section has been moved to the <<<use-apache-snapshots>>> profile.

Apache snapshot repository is now optional, and is only added when the profile is activated.

It can be activated by setting the <<<apache.snapshots>>> property or activating the <<<use-apache-snapshots>>> profile directly.
+------+
<build>
<plugins>
Expand Down
49 changes: 28 additions & 21 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,27 +137,6 @@ under the License.
<version.maven-war-plugin>3.4.0</version.maven-war-plugin>
</properties>

<repositories>
<repository>
<id>apache.snapshots</id>
<name>Apache Snapshot Repository</name>
<url>https://repository.apache.org/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>apache.snapshots</id>
<name>Apache Snapshot Repository</name>
<url>https://repository.apache.org/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
</pluginRepositories>

<build>
<pluginManagement>
<plugins>
Expand Down Expand Up @@ -568,5 +547,33 @@ under the License.
</pluginManagement>
</build>
</profile>
<profile>
<id>use-apache-snapshots</id>
<activation>
<property>
<name>apache.snapshots</name>
</property>
</activation>
<repositories>
<repository>
<id>apache.snapshots</id>
<name>Apache Snapshot Repository</name>
<url>https://repository.apache.org/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>apache.snapshots</id>
<name>Apache Snapshot Repository</name>
<url>https://repository.apache.org/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</project>

0 comments on commit f0057ee

Please sign in to comment.