-
Notifications
You must be signed in to change notification settings - Fork 616
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
Issues 1198: Maven specific features support for @TestArtifact annotation #1199
Conversation
[skip ci]
public void testSnapshotWithoutTimestampMetadataRebuild() | ||
@ExtendWith({ RepositoryManagementTestExecutionListener.class, ArtifactManagementTestExecutionListener.class }) | ||
public void testSnapshotWithoutTimestampMetadataRebuild(@MavenSnapshotRepository Repository repository, | ||
@MavenArtifactWithClassifiers(repository = REPOSITORY_SNAPSHOTS, id = "org.carlspring.strongbox.snapshots:metadata", versions = "2.0-SNAPSHOT") List<Path> snapshotArtifactPath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, how do you actually specify what classifiers to use when generating the artifacts? I'm not sure I get it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Classifiers defined in MavenArtifactWithClassifiersGeneratorStrategy.CLASSIFIERS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@carlspring classifiers parameter implemented as you requested (see here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much! :)
public void testSnapshotMetadataRebuild() | ||
@ExtendWith({ RepositoryManagementTestExecutionListener.class, ArtifactManagementTestExecutionListener.class }) | ||
public void testSnapshotMetadataRebuild(@MavenSnapshotRepository Repository repository, | ||
@MavenSnapshotArtifactWithClassifiers(id = "org.carlspring.strongbox:strongbox-metadata") List<Path> snapshotArtifacts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I get the idea behind this List<Path> ...
. I don't understand...
Would you mind explaining this sourcery to me? :-o
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it explained in #1165 under "To create multiple test artifact versions" section.
We have @MavenSnapshotArtifactWithClassifiers
here which is shortcut for @MavenArtifactWithClassifiers
with predefined 5 snapshot versions. So the List<Path>
will contain 5 elements, each for every version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have only one version then List
not required and single Path
can be injected.
[skip ci]
Thanks, @sbespalov ! :) |
Fixes #1198
@MavenTestArtifact
annotation implementedArtifactMetadataServiceSnapshotsTest
reworked to use@TestRespository
and@TestArtifact