Skip to content

Commit

Permalink
#86 updated release-notes.adoc
Browse files Browse the repository at this point in the history
  • Loading branch information
DirkMahler committed Jun 13, 2024
1 parent ccfefd0 commit 87cb103
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions plugin/maven/src/main/asciidoc/release-notes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

== 2.3.0

* Added missing classifier `tests` to test artifacts created by the Maven project scanner
* Ensure that the property `fileName` is set for `:Maven:Project` nodes that represent local (i.e. scanned) Maven projects

== 1.12.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ public class MavenArtifactCoordinates implements Coordinates {
/**
* The artifact type for test jars.
*/
public static final String ARTIFACTTYPE_TEST_JAR = "test-jar";
public static final String TYPE_TEST_JAR = "test-jar";
public static final String CLASSIFIER_TESTS = "tests";

private Artifact artifact;
private boolean testJar;
Expand All @@ -29,12 +30,12 @@ public String getName() {

@Override
public String getClassifier() {
return artifact.getClassifier();
return testJar ? CLASSIFIER_TESTS : artifact.getClassifier();
}

@Override
public String getType() {
return testJar ? ARTIFACTTYPE_TEST_JAR : artifact.getType();
return testJar ? TYPE_TEST_JAR : artifact.getType();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ private void scanAndVerify(Map<String, Object> properties, boolean expectedDepen
verify(projectDescriptor).setEffectiveModel(effectiveModelDescriptor);
verify(artifactCache).get(argThat(fqn -> fqn.contains(":jar:")), any());
verify(store).addDescriptorType(mainArtifactDescriptor, JavaClassesDirectoryDescriptor.class);
verify(artifactCache).get(argThat(fqn -> fqn.contains(":test-jar:")), any());
verify(artifactCache).get(argThat(fqn -> fqn.contains(":test-jar:tests:")), any());
verify(store).addDescriptorType(testArtifactDescriptor, JavaClassesDirectoryDescriptor.class);

verify(dependencyGraphBuilder).buildDependencyGraph(any(ProjectBuildingRequest.class), eq(null));
Expand Down

0 comments on commit 87cb103

Please sign in to comment.