Closed ruebot closed 8 years ago
I've not seen this before, but it looks to me like it's a Vagrant-specific issue. Some quick Googling suggests to me Vagrant expects root access for many of its operations. I'm not at all familiar with Vagrant, so I couldn't explain why, but see, e.g., https://stackoverflow.com/questions/23760750/vagrant-up-by-non-sudo-vagrant-user-fails .
On Sat, Mar 19, 2016 at 7:22 PM, Nick Ruest notifications@github.com wrote:
I'm setting up a vagrant build https://github.com/web-archive-group/warcbase_workshop_vagrant for the workshops @ianmilligan1 https://github.com/ianmilligan1 and I'll be running at IIPC and Congress, and running into an issue building warcbase.
If I try and build it as the vagrant user, or root, I get the following:
$ mvn -e -X clean package appassembler:assemble -DskipTests ... [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7:14.287s [INFO] Finished at: Sat Mar 19 22:48:33 UTC 2016 [INFO] Final Memory: 27M/60M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.0:enforce (enforce-maven) on project warcbase: Execution enforce-maven of goal org.apache.maven.plugins:maven-enforcer-plugin:1.0:enforce failed: Plugin org.apache.maven.plugins:maven-enforcer-plugin:1.0 or one of its dependencies could not be resolved: Could not find artifact org.beanshell:bsh:jar:2.0b4 -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.0:enforce (enforce-maven) on project warcbase: Execution enforce-maven of goal org.apache.maven.plugins:maven-enforcer-plugin:1.0:enforce failed: Plugin org.apache.maven.plugins:maven-enforcer-plugin:1.0 or one of its dependencies could not be resolved: Could not find artifact org.beanshell:bsh:jar:2.0b4 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.PluginExecutionException: Execution enforce-maven of goal org.apache.maven.plugins:maven-enforcer-plugin:1.0:enforce failed: Plugin org.apache.maven.plugins:maven-enforcer-plugin:1.0 or one of its dependencies could not be resolved: Could not find artifact org.beanshell:bsh:jar:2.0b4 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:82) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more Caused by: org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugins:maven-enforcer-plugin:1.0 or one of its dependencies could not be resolved: Could not find artifact org.beanshell:bsh:jar:2.0b4 at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:215) at org.apache.maven.plugin.internal.DefaultMavenPluginManager.createPluginRealm(DefaultMavenPluginManager.java:353) at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupPluginRealm(DefaultMavenPluginManager.java:321) at org.apache.maven.plugin.DefaultBuildPluginManager.getPluginRealm(DefaultBuildPluginManager.java:175) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:78) ... 20 more Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not find artifact org.beanshell:bsh:jar:2.0b4 at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216) at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:358) at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:207) ... 24 more Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact org.beanshell:bsh:jar:2.0b4 at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:528) ... 27 more [ERROR] [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
If I vagrant ssh into the machine after the build, and build normally with mvn clean package appassembler:assemble -DskipTests the build fails as well. But, if I run it with sudo (sudo mvn clean package appassembler:assemble -DskipTests) it builds fine.
I setup TravisCI with no sudo as a sanity check, and it built fine https://travis-ci.org/ruebot/warcbase/builds/117182689. See also #205 https://github.com/lintool/warcbase/pull/205.
Have you run into this before?
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/lintool/warcbase/issues/206
@jrwiebe yep. I've been down a bunch paths with this :smile:
I've tried to do the build with the standard vagrant user, here, and then as root here. I'm getting that same error Could not find artifact org.beanshell:bsh:jar:2.0b4
every hoop I jump through.
That jar is on the filesystem too, so I'm not sure what's going on. If maven can't find it, read it, or it's just not in it's path? But, sudo mvn build works fine. shrugs
...nothing really jumped out in the pom.xml
either... and I tried a mvn install:install-file -Dfile=\path\to\bsh-2.0b4.jar
with no success.
Resolved it with https://github.com/web-archive-group/warcbase_workshop_vagrant/commit/a0934c8de384e0a5fbeb0cb3b7844e171e8044d8
Something is up with vagrant finding all those artifacts. It finds others in /home/vagrant/.m2
, but not those.
I'm setting up a vagrant build for the workshops @ianmilligan1 and I'll be running at IIPC and Congress, and running into an issue building warcbase.
If I try and build it as the vagrant user, or root, I get the following:
If I
vagrant ssh
into the machine after the build, and build normally withmvn clean package appassembler:assemble -DskipTests
the build fails as well. But, if I run it with sudo (sudo mvn clean package appassembler:assemble -DskipTests
) it builds fine.I setup TravisCI with no sudo as a sanity check, and it built fine. See also #205.
Have you run into this before?