Skip to content

Commit

Permalink
Skip Maven snapshots repositories from versions checking - fix 2 (#8542)
Browse files Browse the repository at this point in the history
Items repository -> snapshots,releases -> enabled has a default value as true,
so it is enough to defined releases as false for snapshots repositories

fix #5947
  • Loading branch information
slawekjaranowski authored Dec 6, 2023
1 parent dd8ccf2 commit 57b6db9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def serialize_mvn_repo(entry)
end

def snapshot_repo(entry)
entry[:snapshots] == "true" && (entry[:releases].nil? || entry[:releases] == "false")
entry[:releases] == "false" && (entry[:snapshots].nil? || entry[:snapshots] == "true")
end

def serialize_urls(entry, pom)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@
%w(
http://scala-tools.org/repo-releases
http://repository.jboss.org/maven2
https://oss.sonatype.org/content/repositories/snapshots-only
https://oss.sonatype.org/content/repositories/releases-false-only
https://oss.sonatype.org/content/repositories/snapshots-with-releases
http://plugin-repository.jboss.org/maven2
https://oss.sonatype.org/content/repositories/plugin-snapshots-only
https://oss.sonatype.org/content/repositories/plugin-releases-false-only
https://oss.sonatype.org/content/repositories/plugin-snapshots-with-releases
https://repo.maven.apache.org/maven2
)
Expand Down
20 changes: 10 additions & 10 deletions maven/spec/fixtures/poms/custom_repositories_pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ url>http://github.com/davidB/${project.artifactId}</url
</snapshots>
</repository>
<repository>
<id>snapshot-only-repository</id>
<url>https://oss.sonatype.org/content/repositories/snapshots-only</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>releases-false-only-repository</id>
<url>https://oss.sonatype.org/content/repositories/releases-false-only</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
<repository>
<id>snapshot-with-releases-repository</id>
Expand All @@ -123,11 +123,11 @@ url>http://github.com/davidB/${project.artifactId}</url
</snapshots>
</pluginRepository>
<pluginRepository>
<id>plugin-snapshot-only-repository</id>
<url>https://oss.sonatype.org/content/repositories/plugin-snapshots-only</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>plugin-releases-false-only-repository</id>
<url>https://oss.sonatype.org/content/repositories/plugin-releases-false-only</url>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
<pluginRepository>
<id>plugin-snapshot-with-releases-repository</id>
Expand Down

0 comments on commit 57b6db9

Please sign in to comment.