jasperkamerling commented on code in PR #233:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/233#discussion_r958157029


##########
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() );
+        }
+    }
+
+    public void testSubPerArtifactAndTypeRemoveType()
+        throws Exception
+    {
+        mojo.getProject().setArtifacts( stubFactory.getTypedArtifacts() );
+        mojo.getProject().setDependencyArtifacts( new HashSet<Artifact>() );
+        mojo.useSubDirectoryPerArtifact = true;
+        mojo.useSubDirectoryPerType = true;
+        mojo.stripType = true;
+
+        mojo.execute();
+
+        Set<Artifact> artifacts = mojo.getProject().getArtifacts();
+        for ( Artifact artifact : artifacts )
+        {
+            // TODO fix test

Review Comment:
   Accidentally left this in here after testing. The tests do work.



-- 
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]

Reply via email to