Skip to content
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

Error when migrating from Nexus 2 FS repo #36

Closed
seboudry opened this issue Dec 15, 2017 · 3 comments
Closed

Error when migrating from Nexus 2 FS repo #36

seboudry opened this issue Dec 15, 2017 · 3 comments
Assignees

Comments

@seboudry
Copy link

There is an issue when using maven-repository-provisioner:1.2.1 to migrate from filesystem inside Nexus2 repository directory.

Using this command:

java -jar maven-repository-provisioner-*-jar-with-dependencies.jar \
     -cd "/sonatype-work/storage/releases" \
     -t "http://nexus3.company.com/repository/maven-releases" \
     -u admin -p admin123

Full log:

Provisioning artifacts: null
Source: https://repo1.maven.org/maven2
Target: http://nexus3.company.com/repository/maven-releases/
Username: admin
Password: ************************
IncludeSources: true
IncludeJavadoc: true
IncludeProvidedScope: false
IncludeTestScope: false
Check target: true
Verify only: false
Local cache or source repository directory: /sonatype-work/storage/releases


09:25:01.121 [main] INFO  MavenRepositoryProvisioner -  Absolute path: /sonatype-work/storage/releases
09:25:01.123 [main] INFO  MavenRepositoryProvisioner - Detected local cache directory '/sonatype-work/storage/releases'.
09:25:01.124 [main] INFO  MavenRepositoryProvisioner - No artifact coordinates specified - using cache directory as source.
09:25:01.126 [main] INFO  MavenRepositoryProvisioner - Artifact retrieval skipped.
09:25:01.127 [main] INFO  MavenRepositoryProvisioner - Artifact deployment starting.
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.String.substring(String.java:1967)
	at com.simpligility.maven.GavUtil.getGavFromRepositoryPath(GavUtil.java:18)
	at com.simpligility.maven.provisioner.MavenRepositoryDeployer.deployToRemote(MavenRepositoryDeployer.java:140)
	at com.simpligility.maven.provisioner.MavenRepositoryProvisioner.main(MavenRepositoryProvisioner.java:120)

Content of source directory:

root@nexus-654873208-1546f nexus]# ls -la /sonatype-work/storage/releases
total 36
drwxr-xr-x  6 root root 4096 Dec 15 07:16 .
drwxrwxrwx 26 root root 4096 Jul  3 14:36 ..
drwxr-xr-x  2 root root 4096 Dec 14 17:12 .index
drwxr-xr-x  2 root root 4096 Dec 15 07:16 .meta
drwxr-xr-x  5 root root 4096 Jul  5 12:41 .nexus
-rw-r--r--  1 root root   25 Dec 15 07:16 archetype-catalog.xml
-rw-r--r--  1 root root   32 Jul  5 12:42 archetype-catalog.xml.md5
-rw-r--r--  1 root root   40 Jul  5 12:42 archetype-catalog.xml.sha1
drwxr-xr-x  3 root root 4096 May  3  2017 com
@hhulwath
Copy link

I did 2 things: removed dot prefixes dirs (.index,.meta,.nexus) and found and removed an empty subdir found somewhere in the content dir
then pass

@mosabua mosabua self-assigned this Mar 3, 2018
@mosabua
Copy link
Member

mosabua commented Mar 3, 2018

Implementing a fix for this atm.

@mosabua
Copy link
Member

mosabua commented Mar 4, 2018

Thats now in master

@mosabua mosabua closed this as completed Mar 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants