1 Reply Latest reply: Nov 29, 2012 5:10 PM by Michal Matloka RSS

    SHRINKRES: Why does ClasspathWorkspaceReaderTestCase pass?

    Andrew Rubinger Master

      In trimming out some dependencies for SHRINKRES, I've broken locally the ClasspathWorkspaceReaderTestCase tests:

       

        shouldBeAbleToLoadArtifactDirectlyFromClassPath

        shouldBeAbleToLoadArtifactDirectlyFromClassPathAsFiles

       

      The nature of the failure is:

       

      WARNING: Failed downloading org/jboss/jboss-parent/8/jboss-parent-8.pom from http://repo1.maven.org/maven2/, reason: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact org.jboss:jboss-parent:pom:8 from/to central (http://repo1.maven.org/maven2): NullPointerException
      

       

      Now, I expect this, because at the beginning of the test we manually set the local repo to one that doesn't exist.  So it wouldn't find jboss-parent, ever (as it's not in Central).  So why does this work?

       

      S,

      ALR

        • 1. Re: SHRINKRES: Why does ClasspathWorkspaceReaderTestCase pass?
          Michal Matloka Newbie

          True is it fails Magic... I've tried to build today resolvers from both linux and windows.

           

          On Linux build successfully! On Eclipse on windows all tests passes! but, when building on windows from maven  (cmd/cygwin) some tests fails - e.g. this one!

           

          Tests in error:

            shouldBeAbleToLoadArtifactDirectlyFromClassPath(org.jboss.shrinkwrap.resolver.impl.maven.integration.ClasspathWorkspaceReaderTestCase): Found 1 problems while building POM model from I:\Dev\JBoss\shrinkwrap resolver\impl-maven\pom.xml

            shouldFailWhileNotReadingReactor(org.jboss.shrinkwrap.resolver.impl.maven.integration.ClasspathWorkspaceReaderTestCase): Unexpected exception, expected<org.jboss.shrinkwrap.resolver.api.NoResolvedResultException> but was<org.jboss.shrinkwrap.resolver.api.InvalidConfigurationFileException>

            shouldHaveCentralMavenRepositoryDisabled(org.jboss.shrinkwrap.resolver.impl.maven.integration.DisabledCentralRepositoryTestCase): Unexpected exception, expected<org.jboss.shrinkwrap.resolver.api.NoResolvedResultException> but was<org.jboss.shrinkwrap.resolver.api.InvalidConfigurationFileException>

            control(org.jboss.shrinkwrap.resolver.impl.maven.integration.DisabledCentralRepositoryTestCase): Found 1 problems while building POM model from I:\Dev\JBoss\shrinkwrap resolver\impl-maven\pom.xml

            offlineProgramatically(org.jboss.shrinkwrap.resolver.impl.maven.integration.OfflineRepositoryTestCase): Unable to collect dependency tree for given dependencies, reason: Failed to collect dependencies for [junit:junit:jar:3.8.2 (compile)]

           

          shouldBeAbleToLoadArtifactDirectlyFromClassPath(org.jboss.shrinkwrap.resolver.impl.maven.integration.ClasspathWorkspaceReaderTestCase)  Time elapsed: 0.696 sec  <<< ERROR!

          org.jboss.shrinkwrap.resolver.api.InvalidConfigurationFileException: Found 1 problems while building POM model from I:\Dev\JBoss\shrinkwrap resolver\impl-maven\pom.xml

          1/ [FATAL] Non-resolvable parent POM for org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-parent:2.0.0-alpha-6-SNAPSHOT: Failed to resolve POM for org.jboss:jboss-parent:8 due to Could not find artifact org.jboss:jboss-parent:pom:8 in central (http://repo1.maven.org/maven2) and 'parent.relativePath' points at wrong local POM @ org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-parent:2.0.0-alpha-6-SNAPSHOT, I:\Dev\JBoss\shrinkwrap resolver\pom.xml