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

Added timestamped snapshot version to example regular expressions #348

Merged
merged 1 commit into from
Dec 16, 2021
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
16 changes: 8 additions & 8 deletions src/site/markdown/keysmap-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,24 +97,24 @@ match a specific artifact with the version and any packaging
test.groupId:artifactId:1.0.0 = 0x1234567890123456789012345678901234567890
---

match any artifact from group with any packaging and a SNAPSHOT version by regular expression
match any artifact from group with any packaging and a SNAPSHOT/timestamped version by regular expression

test.groupId:*:~.*-SNAPSHOT$ = 0x1234567890123456789012345678901234567890
test.groupId:*:~.*-(SNAPSHOT|\d{8,}\.\d{6}-\d+) = 0x1234567890123456789012345678901234567890
---

match any artifact from group with any packaging and a non-SNAPSHOT version by negated regular expression
match any artifact from group with any packaging and a non-SNAPSHOT/timestamped version by negated regular expression

test.groupId:*:!~.*-SNAPSHOT$ = 0x1234567890123456789012345678901234567890
test.groupId:*:!~.*-(SNAPSHOT|\d{8,}\.\d{6}-\d+) = 0x1234567890123456789012345678901234567890
---

match a specific artifact with any packaging and a SNAPSHOT version by regular expression
match a specific artifact with any packaging and a SNAPSHOT/timestamped version by regular expression

test.groupId:artifactId:~.*-SNAPSHOT$ = 0x1234567890123456789012345678901234567890
test.groupId:artifactId:~.*-(SNAPSHOT|\d{8,}\.\d{6}-\d+) = 0x1234567890123456789012345678901234567890
---

match a specific artifact with specific packaging and a SNAPSHOT version by regular expression
match a specific artifact with specific packaging and a SNAPSHOT/timestamped version by regular expression

test.groupId:artifactId:jar:~.*-SNAPSHOT$ = 0x1234567890123456789012345678901234567890
test.groupId:artifactId:jar:~.*-(SNAPSHOT|\d{8,}\.\d{6}-\d+) = 0x1234567890123456789012345678901234567890
---

match a specific artifact with any version and packaging and many keys
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,34 +75,36 @@ public Object[][] artifactsList() {
{"test.*", testArtifact().build(), true},
{"*", testArtifact().build(), true},
// Regular expression in version
{"test.group:test:~.*-SNAPSHOT$", testArtifact().build(), false},
{"test.group:test:!~.*-SNAPSHOT$", testArtifact().build(), true},
{"test.group:test:~.*-SNAPSHOT$", testArtifact().version("1.1.1-SNAPSHOT").build(), true},
{"test.group:test:!~.*-SNAPSHOT$", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"test.group:*:~.*-SNAPSHOT$", testArtifact().build(), false},
{"test.group:*:!~.*-SNAPSHOT$", testArtifact().build(), true},
{"test.group:*:~.*-SNAPSHOT$", testArtifact().version("1.1.1-SNAPSHOT").build(), true},
{"test.group:*:!~.*-SNAPSHOT$", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"test.group:*:jar:~.*-SNAPSHOT$", testArtifact().build(), false},
{"test.group:*:jar:!~.*-SNAPSHOT$", testArtifact().build(), true},
{"test.group:*:jar:~.*-SNAPSHOT$", testArtifact().version("1.1.1-SNAPSHOT").build(), true},
{"test.group:*:jar:!~.*-SNAPSHOT$", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"test.group:*:pom:~.*-SNAPSHOT$", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"test.group:*:pom:!~.*-SNAPSHOT$", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"test.group:test:jar:~.*-SNAPSHOT$", testArtifact().build(), false},
{"test.group:test:jar:!~.*-SNAPSHOT$", testArtifact().build(), true},
{"test.group:test:jar:~.*-SNAPSHOT$", testArtifact().version("1.1.1-SNAPSHOT").build(), true},
{"test.group:test:jar:!~.*-SNAPSHOT$", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"test.group:test:pom:~.*-SNAPSHOT$", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"test.group:test:pom:!~.*-SNAPSHOT$", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"test.group:other:jar:~.*-SNAPSHOT$", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"test.group:other:jar:!~.*-SNAPSHOT$", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"other.group:test:jar:~.*-SNAPSHOT$", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"other.group:test:jar:!~.*-SNAPSHOT$", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"test.group:test:jar:~.*-SNAPshot$", testArtifact().version("1.1.1-snapSHOT").build(), true},
{"test.group:test:jar:!~.*-SNAPshot$", testArtifact().version("1.1.1-snapSHOT").build(), false},
{"test.group:test:jar:~.*-snapSHOT$", testArtifact().version("1.1.1-SNAPshot").build(), true},
{"test.group:test:jar:!~.*-snapSHOT$", testArtifact().version("1.1.1-SNAPshot").build(), false},
{"test.group:test:~.*-SNAPSHOT", testArtifact().build(), false},
{"test.group:test:!~.*-SNAPSHOT", testArtifact().build(), true},
{"test.group:test:~.*-SNAPSHOT", testArtifact().version("1.1.1-SNAPSHOT").build(), true},
{"test.group:test:!~.*-SNAPSHOT", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"test.group:test:~.*-SNAPSHOT", testArtifact().version("1.1.1-SNAPSHOT-malicious").build(), false},
{"test.group:test:!~.*-SNAPSHOT", testArtifact().version("1.1.1-SNAPSHOT-malicious").build(), true},
{"test.group:*:~.*-SNAPSHOT", testArtifact().build(), false},
{"test.group:*:!~.*-SNAPSHOT", testArtifact().build(), true},
{"test.group:*:~.*-SNAPSHOT", testArtifact().version("1.1.1-SNAPSHOT").build(), true},
{"test.group:*:!~.*-SNAPSHOT", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"test.group:*:jar:~.*-SNAPSHOT", testArtifact().build(), false},
{"test.group:*:jar:!~.*-SNAPSHOT", testArtifact().build(), true},
{"test.group:*:jar:~.*-SNAPSHOT", testArtifact().version("1.1.1-SNAPSHOT").build(), true},
{"test.group:*:jar:!~.*-SNAPSHOT", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"test.group:*:pom:~.*-SNAPSHOT", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"test.group:*:pom:!~.*-SNAPSHOT", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"test.group:test:jar:~.*-SNAPSHOT", testArtifact().build(), false},
{"test.group:test:jar:!~.*-SNAPSHOT", testArtifact().build(), true},
{"test.group:test:jar:~.*-SNAPSHOT", testArtifact().version("1.1.1-SNAPSHOT").build(), true},
{"test.group:test:jar:!~.*-SNAPSHOT", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"test.group:test:pom:~.*-SNAPSHOT", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"test.group:test:pom:!~.*-SNAPSHOT", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"test.group:other:jar:~.*-SNAPSHOT", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"test.group:other:jar:!~.*-SNAPSHOT", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"other.group:test:jar:~.*-SNAPSHOT", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"other.group:test:jar:!~.*-SNAPSHOT", testArtifact().version("1.1.1-SNAPSHOT").build(), false},
{"test.group:test:jar:~.*-SNAPshot", testArtifact().version("1.1.1-snapSHOT").build(), true},
{"test.group:test:jar:!~.*-SNAPshot", testArtifact().version("1.1.1-snapSHOT").build(), false},
{"test.group:test:jar:~.*-snapSHOT", testArtifact().version("1.1.1-SNAPshot").build(), true},
{"test.group:test:jar:!~.*-snapSHOT", testArtifact().version("1.1.1-SNAPshot").build(), false},
};
}

Expand Down