diff options
Diffstat (limited to 'archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java')
-rw-r--r-- | archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java b/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java index f853db81d..dad00f651 100644 --- a/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java +++ b/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java @@ -36,7 +36,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.support.ClassPathXmlApplicationContext; -import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; @@ -168,7 +167,7 @@ public class ArchivaCli throws ConsumerException, MalformedURLException { ManagedRepository repo = new ManagedRepository(); - repo.setId( new File( path ).getName() ); + repo.setId( Paths.get( path ).getFileName().toString()); repo.setName( "Archiva CLI Provided Repo" ); repo.setLocation( path ); |