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

[MPOM-451] Move snapshot repositories in a profile #183

Merged
merged 1 commit into from
Dec 22, 2024
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
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>
Loading