We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I tried out the nexus3-cli and I get the following error upoloading, why is that ?
[root@alt-dts-g-sonar02] ~/testdir/spoe/SPOE/0.8 $ nexus3 download snapshots/test/test/1.4-SNAPSHOT/ test/ Downloading snapshots/test/test/1.4-SNAPSHOT/ to test/ Downloading[################################] 12/12 - 00:00:00 Downloaded 12 files to test/ [root@alt-dts-g-sonar02] ~/testdir/spoe/SPOE/0.8 $ nexus3 up test/ snapshots/test/ Uploading test/ to snapshots/test/ Error: b'[ {\n "name" : "dockerCleanup",\n "content" : "import org.sonatype.nexus.repository.storage.Asset;import org.sonatype.nexus.repository.storage.Query;import org.sonatype.nexus.repository.storage.StorageFacet;import groovy.json.JsonOutput;import groovy.json.JsonSlurper;def request = new JsonSlurper().parseText(args);println(request);assert request.repoName: 'repoName parameter is required';assert request.startDate: 'startDate parameter is required, format: yyyy-mm-dd';assert request.url: 'Assest url is required, format: %/cache/%';assert request.timeFilter instanceof String;def tq = request.timeFilter.toString() + ' < ';def repo = repository.repositoryManager.get(request.repoName);StorageFacet storageFacet = repo.facet(StorageFacet);def tx = storageFacet.txSupplier().get();def urls = [];try { tx.begin(); Iterable assets = tx. findAssets(Query.builder().where(tq.toString()).param(request.startDate).and('name MATCHES').param(request.url).build(), [repo]); urls = assets.collect {'/repository/'+ repo.name + '/' + it.name()}; assets.each { asset -> log.info('Deleting asset ' + asset.name()); tx.deleteAsset(asset); if (asset.componentId() != null) { log.info('Deleting component for asset ' + asset.name()); def component = tx.findComponent(asset.componentId()); tx.deleteComponent(component); } }; tx.commit(); def result = JsonOutput.toJson([ assets : urls, query : tq.toString(), query_term : request.url, before : request.startDate, repoName: request.repoName ]); log.info(JsonOutput.prettyPrint(result)); return result;} catch (Exception e) { log.warn('Error occurs while deleting snapshot images from docker repository: {}', e.toString()); tx.rollback();} finally { tx.close();}",\n "type" : "groovy"\n}, {\n "name" : "version",\n "content" : " import org.sonatype.nexus.repository.storage.Query; import org.sonatype.nexus.repository.storage.StorageFacet; import groovy.json.JsonOutput; def groupId = args.split(',')[0]; def repositoryId = args.split(',')[1]; def repo = repository.repositoryManager.get(repositoryId); StorageFacet storageFacet = repo.facet(StorageFacet); def tx = storageFacet.txSupplier().get(); try{ tx.begin(); def components = tx.findComponents(Query.builder().where('group = ').param(groupId).build(), [repo]); def found = components.collect { def baseVersion = it.attributes().child('maven2').get('baseVersion'); \"${baseVersion}\" }; found = found.unique(); tx.commit(); def result = JsonOutput.toJson(found); tx.close(); return result;}catch (Exception e){ tx.rollback()}finally{ tx.close()}",\n "type" : "groovy"\n} ]'
The text was updated successfully, but these errors were encountered:
hi, @drhelmer - can you please post the output of nexus3 repo show snapshots in here? I want to try and reproduce this issue locally. Thank you.
nexus3 repo show snapshots
edit: also the version of nexus 3 please
Sorry, something went wrong.
No branches or pull requests
I tried out the nexus3-cli and I get the following error upoloading, why is that ?
[root@alt-dts-g-sonar02] ~/testdir/spoe/SPOE/0.8 $ nexus3 download snapshots/test/test/1.4-SNAPSHOT/ test/
Downloading snapshots/test/test/1.4-SNAPSHOT/ to test/
Downloading[################################] 12/12 - 00:00:00
Downloaded 12 files to test/
[root@alt-dts-g-sonar02] ~/testdir/spoe/SPOE/0.8 $ nexus3 up test/ snapshots/test/
Uploading test/ to snapshots/test/
Error: b'[ {\n "name" : "dockerCleanup",\n "content" : "import org.sonatype.nexus.repository.storage.Asset;import org.sonatype.nexus.repository.storage.Query;import org.sonatype.nexus.repository.storage.StorageFacet;import groovy.json.JsonOutput;import groovy.json.JsonSlurper;def request = new JsonSlurper().parseText(args);println(request);assert request.repoName: 'repoName parameter is required';assert request.startDate: 'startDate parameter is required, format: yyyy-mm-dd';assert request.url: 'Assest url is required, format: %/cache/%';assert request.timeFilter instanceof String;def tq = request.timeFilter.toString() + ' < ';def repo = repository.repositoryManager.get(request.repoName);StorageFacet storageFacet = repo.facet(StorageFacet);def tx = storageFacet.txSupplier().get();def urls = [];try { tx.begin(); Iterable assets = tx. findAssets(Query.builder().where(tq.toString()).param(request.startDate).and('name MATCHES').param(request.url).build(), [repo]); urls = assets.collect {'/repository/'+ repo.name + '/' + it.name()}; assets.each { asset -> log.info('Deleting asset ' + asset.name()); tx.deleteAsset(asset); if (asset.componentId() != null) { log.info('Deleting component for asset ' + asset.name()); def component = tx.findComponent(asset.componentId()); tx.deleteComponent(component); } }; tx.commit(); def result = JsonOutput.toJson([ assets : urls, query : tq.toString(), query_term : request.url, before : request.startDate, repoName: request.repoName ]); log.info(JsonOutput.prettyPrint(result)); return result;} catch (Exception e) { log.warn('Error occurs while deleting snapshot images from docker repository: {}', e.toString()); tx.rollback();} finally { tx.close();}",\n "type" : "groovy"\n}, {\n "name" : "version",\n "content" : " import org.sonatype.nexus.repository.storage.Query; import org.sonatype.nexus.repository.storage.StorageFacet; import groovy.json.JsonOutput; def groupId = args.split(',')[0]; def repositoryId = args.split(',')[1]; def repo = repository.repositoryManager.get(repositoryId); StorageFacet storageFacet = repo.facet(StorageFacet); def tx = storageFacet.txSupplier().get(); try{ tx.begin(); def components = tx.findComponents(Query.builder().where('group = ').param(groupId).build(), [repo]); def found = components.collect { def baseVersion = it.attributes().child('maven2').get('baseVersion'); \"${baseVersion}\" }; found = found.unique(); tx.commit(); def result = JsonOutput.toJson(found); tx.close(); return result;}catch (Exception e){ tx.rollback()}finally{ tx.close()}",\n "type" : "groovy"\n} ]'
The text was updated successfully, but these errors were encountered: