Uploaded image for project: 'ShrinkWrap'
  1. ShrinkWrap
  2. SHRINKWRAP-337

Shrinkwrap maven resolver should be able to work offline after it worked online once: it should not download from the internet every time the test is running

XMLWordPrintable

      To reproduce:

      git clone https://github.com/kpiwko/blog.git kpiwko-blog
      cd kpiwko-blog
      // add jboss repo to ~/.m2/settings.xml
      Run tests => succeeds!
      // remove jboss repo from ~/.m2/settings.xml
      Run tests => Fails

      12:10:27.818 WARN - Failed downloading org/jboss/arquillian/arquillian-bom/1.0.0.CR5/arquillian-bom-1.0.0.CR5.pom from http://repo1.maven.org/maven2/, reason: org.apache.maven.wagon.ResourceDoesNotExistException: Could not find org/jboss/arquillian/arquillian-bom/1.0.0.CR5/arquillian-bom-1.0.0.CR5.pom in http://repo1.maven.org/maven2
      12:10:28.077 WARN - Failed downloading org/jboss/arquillian/extension/arquillian-drone-bom/1.0.0.CR2/arquillian-drone-bom-1.0.0.CR2.pom from http://repo1.maven.org/maven2/, reason: org.apache.maven.wagon.ResourceDoesNotExistException: Could not find org/jboss/arquillian/extension/arquillian-drone-bom/1.0.0.CR2/arquillian-drone-bom-1.0.0.CR2.pom in http://repo1.maven.org/maven2
      
      java.lang.RuntimeException: Could not invoke deployment method: public static org.jboss.shrinkwrap.api.spec.WebArchive com.acme.ui.LoginScreenDefaultSeleniumTestCase.createDeployment()
      	at org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator.invoke(AnnotationDeploymentScenarioGenerator.java:160)
      	at org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator.generateDeployment(AnnotationDeploymentScenarioGenerator.java:94)
      	at org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator.generate(AnnotationDeploymentScenarioGenerator.java:57)
      	at org.jboss.arquillian.container.test.impl.client.deployment.DeploymentGenerator.generateDeployment(DeploymentGenerator.java:79)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
      	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
      	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
      	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
      	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
      	at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
      	at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:96)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
      	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
      	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
      	at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:68)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
      	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
      	at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:54)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
      	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
      	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
      	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
      	at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:80)
      	at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:158)
      	at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:290)
      	at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:45)
      	at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:175)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      	at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:123)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
      	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:71)
      	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:199)
      	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
      Caused by: java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator.invoke(AnnotationDeploymentScenarioGenerator.java:156)
      	... 53 more
      Caused by: org.jboss.shrinkwrap.resolver.api.ResolutionException: Found 10 problems while building POM model from /home/gdesmet/projects/jboss/arquillian/kpiwko-blog/drone-selenium/pom.xml1/ [ERROR] Non-resolvable import POM: Failed to resolve POM for org.jboss.arquillian:arquillian-bom:1.0.0.CR5 due to Could not find artifact org.jboss.arquillian:arquillian-bom:pom:1.0.0.CR5 in central (http://repo1.maven.org/maven2) @ org.jboss.arquillian.extension.drone:drone-blog-selenium-example:1.0.0-SNAPSHOT, /home/gdesmet/projects/jboss/arquillian/kpiwko-blog/drone-selenium/pom.xml
      2/ [ERROR] Non-resolvable import POM: Failed to resolve POM for org.jboss.arquillian.extension:arquillian-drone-bom:1.0.0.CR2 due to Could not find artifact org.jboss.arquillian.extension:arquillian-drone-bom:pom:1.0.0.CR2 in central (http://repo1.maven.org/maven2) @ org.jboss.arquillian.extension.drone:drone-blog-selenium-example:1.0.0-SNAPSHOT, /home/gdesmet/projects/jboss/arquillian/kpiwko-blog/drone-selenium/pom.xml
      3/ [ERROR] 'dependencies.dependency.version' for org.jboss.arquillian.junit:arquillian-junit-container:jar is missing. @ org.jboss.arquillian.extension.drone:drone-blog-selenium-example:1.0.0-SNAPSHOT, /home/gdesmet/projects/jboss/arquillian/kpiwko-blog/drone-selenium/pom.xml
      4/ [ERROR] 'dependencies.dependency.version' for org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven:jar is missing. @ org.jboss.arquillian.extension.drone:drone-blog-selenium-example:1.0.0-SNAPSHOT, /home/gdesmet/projects/jboss/arquillian/kpiwko-blog/drone-selenium/pom.xml
      5/ [ERROR] 'dependencies.dependency.version' for org.jboss.arquillian.extension:arquillian-drone-impl:jar is missing. @ org.jboss.arquillian.extension.drone:drone-blog-selenium-example:1.0.0-SNAPSHOT, /home/gdesmet/projects/jboss/arquillian/kpiwko-blog/drone-selenium/pom.xml
      6/ [ERROR] 'dependencies.dependency.version' for org.jboss.arquillian.extension:arquillian-drone-selenium:jar is missing. @ org.jboss.arquillian.extension.drone:drone-blog-selenium-example:1.0.0-SNAPSHOT, /home/gdesmet/projects/jboss/arquillian/kpiwko-blog/drone-selenium/pom.xml
      7/ [ERROR] 'dependencies.dependency.version' for org.jboss.arquillian.extension:arquillian-drone-selenium-server:jar is missing. @ org.jboss.arquillian.extension.drone:drone-blog-selenium-example:1.0.0-SNAPSHOT, /home/gdesmet/projects/jboss/arquillian/kpiwko-blog/drone-selenium/pom.xml
      8/ [ERROR] 'dependencies.dependency.version' for org.seleniumhq.selenium:selenium-java:jar is missing. @ org.jboss.arquillian.extension.drone:drone-blog-selenium-example:1.0.0-SNAPSHOT, /home/gdesmet/projects/jboss/arquillian/kpiwko-blog/drone-selenium/pom.xml
      9/ [ERROR] 'dependencies.dependency.version' for org.seleniumhq.selenium:selenium-server:jar is missing. @ org.jboss.arquillian.extension.drone:drone-blog-selenium-example:1.0.0-SNAPSHOT, /home/gdesmet/projects/jboss/arquillian/kpiwko-blog/drone-selenium/pom.xml
      10/ [ERROR] 'dependencies.dependency.version' for org.slf4j:slf4j-simple:jar is missing. @ org.jboss.arquillian.extension.drone:drone-blog-selenium-example:1.0.0-SNAPSHOT, /home/gdesmet/projects/jboss/arquillian/kpiwko-blog/drone-selenium/pom.xml
      
      	at org.jboss.shrinkwrap.resolver.impl.maven.MavenRepositorySystem.loadPom(MavenRepositorySystem.java:154)
      	at org.jboss.shrinkwrap.resolver.impl.maven.MavenRepositorySystem.loadPom(MavenRepositorySystem.java:126)
      	at org.jboss.shrinkwrap.resolver.impl.maven.MavenBuilderImpl.loadMetadataFromPom(MavenBuilderImpl.java:153)
      	at com.acme.ui.Deployments.createLoginScreenDeployment(Deployments.java:43)
      	at com.acme.ui.LoginScreenDefaultSeleniumTestCase.createDeployment(LoginScreenDefaultSeleniumTestCase.java:44)
      	... 58 more
      Caused by: org.apache.maven.model.building.ModelBuildingException: 10 problems were encountered while building the effective model for org.jboss.arquillian.extension.drone:drone-blog-selenium-example:1.0.0-SNAPSHOT
      [ERROR] Non-resolvable import POM: Failed to resolve POM for org.jboss.arquillian:arquillian-bom:1.0.0.CR5 due to Could not find artifact org.jboss.arquillian:arquillian-bom:pom:1.0.0.CR5 in central (http://repo1.maven.org/maven2) @ 
      [ERROR] Non-resolvable import POM: Failed to resolve POM for org.jboss.arquillian.extension:arquillian-drone-bom:1.0.0.CR2 due to Could not find artifact org.jboss.arquillian.extension:arquillian-drone-bom:pom:1.0.0.CR2 in central (http://repo1.maven.org/maven2) @ 
      [ERROR] 'dependencies.dependency.version' for org.jboss.arquillian.junit:arquillian-junit-container:jar is missing. @ 
      [ERROR] 'dependencies.dependency.version' for org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven:jar is missing. @ 
      [ERROR] 'dependencies.dependency.version' for org.jboss.arquillian.extension:arquillian-drone-impl:jar is missing. @ 
      [ERROR] 'dependencies.dependency.version' for org.jboss.arquillian.extension:arquillian-drone-selenium:jar is missing. @ 
      [ERROR] 'dependencies.dependency.version' for org.jboss.arquillian.extension:arquillian-drone-selenium-server:jar is missing. @ 
      [ERROR] 'dependencies.dependency.version' for org.seleniumhq.selenium:selenium-java:jar is missing. @ 
      [ERROR] 'dependencies.dependency.version' for org.seleniumhq.selenium:selenium-server:jar is missing. @ 
      [ERROR] 'dependencies.dependency.version' for org.slf4j:slf4j-simple:jar is missing. @ 
      
      	at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:422)
      	at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:374)
      	at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:365)
      	at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:232)
      	at org.jboss.shrinkwrap.resolver.impl.maven.MavenRepositorySystem.loadPom(MavenRepositorySystem.java:140)
      	... 62 more
      
      
      java.lang.NullPointerException
      	at org.jboss.arquillian.drone.impl.DroneDestructor.destroyClassScopedDrone(DroneDestructor.java:82)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
      	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
      	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
      	at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:68)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
      	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
      	at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:54)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
      	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
      	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
      	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
      	at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.afterClass(EventTestRunnerAdaptor.java:87)
      	at org.jboss.arquillian.junit.Arquillian$3$1.evaluate(Arquillian.java:180)
      	at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:290)
      	at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:45)
      	at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:175)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      	at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:123)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
      	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:71)
      	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:199)
      	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
      

      Other, better way to test it probably:

      • Run tests once => succeed.
      • Unplug network cable
      • Run tests again => fails.

      Everything should be in the local repository after the first test run.
      In this case there are no snapshots involved, but even snapshots don't get updates if the network is down.

              kpiwko Karel Piwko
              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: