slawekjaranowski commented on code in PR #233:
URL:
https://github.com/apache/maven-dependency-plugin/pull/233#discussion_r958178650
##########
src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestCopyDependenciesMojo2.java:
##########
@@ -373,7 +373,50 @@ public void testSubPerArtifactAndTypeRemoveVersion()
for ( Artifact artifact : artifacts )
{
String fileName = DependencyUtil.getFormattedFileName( artifact,
true );
- File folder = DependencyUtil.getFormattedOutputDirectory( false,
true, true, false, true,
+ File folder = DependencyUtil.getFormattedOutputDirectory( false,
true, true, false, true, false,
+
mojo.outputDirectory, artifact );
+ File file = new File( folder, fileName );
+ assertTrue( file.exists() );
+ }
+ }
+
+ public void testSubPerArtifactRemoveType()
+ throws Exception
+ {
+ mojo.useSubDirectoryPerArtifact = true;
+ mojo.stripType = true;
+
+ mojo.execute();
+
+ Set<Artifact> artifacts = mojo.getProject().getArtifacts();
+ for ( Artifact artifact : artifacts )
+ {
+ // TODO fix test
+ String fileName = DependencyUtil.getFormattedFileName( artifact,
false );
+ File folder = DependencyUtil.getFormattedOutputDirectory( false,
false, true, false, false, true,
+ mojo.outputDirectory, artifact );
+ File file = new File( folder, fileName );
+ assertTrue( file.exists() );
Review Comment:
If tests for `DependencyUtil` cover such - we can keep this as a simple test
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]