Hello,
When I pull sonatype/nexus3 image is it possible to use jars from it to add them to CLASSPATH and run groovy script for creating repository?
My question comes from situation when I received below error after running groovy script in Docker container:
/usr/bin/build-classpath: Could not find ../../jvm/java/lib Java extension
for this JVM /usr/bin/build-classpath: error: Some specified jars were not found
org.codehaus.groovy.control.MultipleCompilationErrorsException: startupfailed:
/usr/bin/scripts/list.groovy: 1: unable to resolve class org.sonatype.nexus.repository.Repository
@ line 1, column 1.
import org.sonatype.nexus.repository.Repository
^
It is my code:
import org.sonatype.nexus.repository.Repository
repository.repositoryManager.browse().each { Repository repo ->
println repo.name
}
Is it good way to do it?
Thanks for help :)