ops4j / org.ops4j.pax.web

OSGi R7 Http Service, Whiteboard and Web Applications (OSGi CMPN Release chapters 102, 140 and 128) implementation using Jetty 9, Tomcat 9 or Undertow 2.
https://ops4j1.jira.com/wiki/display/paxweb/Pax+Web
Other
144 stars 183 forks source link

Some tests reference SNAPSHOT artifacts and fail on a clean repository [PAXWEB-383] #716

Closed ops4j-issues closed 12 years ago

ops4j-issues commented 12 years ago

Harald Wellmann created PAXWEB-383

I checked out the current master HEAD (2.0.1-SNAPSHOT) and ran mvn install. Some integration tests are failing, they seem to be referencing 2.0.0-SNAPSHOT artifacts which do not exist in my repository.

Results :

Failed tests:   testSlash:WarJSFIntegrationTest.testSlash:NativeContainer:org.apache.felix.framework.FrameworkFactory@516b9e1(org.ops4j.pax.web.itest.WarJSFIntegrationTest)

Tests in error: 
  testWC:Servlet3WarIntegrationTest.testWC:NativeContainer:org.apache.felix.framework.FrameworkFactory@6b4c9c62(org.ops4j.pax.web.itest.Servlet3WarIntegrationTest): Could not find artifact org.ops4j.pax.web.samples:helloworld-servlet3:war:2.0.0-SNAPSHOT in central (http://repo1.maven.org/maven2/)
  testMimeStyle:Servlet3WarIntegrationTest.testMimeStyle:NativeContainer:org.apache.felix.framework.FrameworkFactory@6b4c9c62(org.ops4j.pax.web.itest.Servlet3WarIntegrationTest): Could not find artifact org.ops4j.pax.web.samples:helloworld-servlet3:war:2.0.0-SNAPSHOT in central (http://repo1.maven.org/maven2/)
  listBundles:Servlet3WarIntegrationTest.listBundles:NativeContainer:org.apache.felix.framework.FrameworkFactory@6b4c9c62(org.ops4j.pax.web.itest.Servlet3WarIntegrationTest): Could not find artifact org.ops4j.pax.web.samples:helloworld-servlet3:war:2.0.0-SNAPSHOT in central (http://repo1.maven.org/maven2/)
  testMimeImage:Servlet3WarIntegrationTest.testMimeImage:NativeContainer:org.apache.felix.framework.FrameworkFactory@6b4c9c62(org.ops4j.pax.web.itest.Servlet3WarIntegrationTest): Could not find artifact org.ops4j.pax.web.samples:helloworld-servlet3:war:2.0.0-SNAPSHOT in central (http://repo1.maven.org/maven2/)

Affects: 2.0.0 Fixed in: 2.0.1 Votes: 0, Watches: 0

ops4j-issues commented 12 years ago

Achim Nierbeck commented

This is rather strange cause the tests shouldn't contain a dependency to the current version, and if only through a property
which is bound to the right version through maven:

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.12</version>
                <configuration>
                    <includes>
                        <include>**/*IntegrationTest.java</include>
                    </includes>
                    <!-- This test will work if PAXWEB-154 and PAXWEB-123 are fixed -->
                    <excludes>
                        <exclude>**/JspFilterIntegrationTest.java</exclude>
                        <exclude>**/JettyWebIntegrationTest.java</exclude>
                    </excludes>
                    <systemPropertyVariables>
                        <ProjectVersion>${project.version}</ProjectVersion>
                        <MyFacesVersion>${jsf-myfaces.version}</MyFacesVersion>
                    </systemPropertyVariables>
                    <forkMode>pertest</forkMode>
                </configuration>
                <executions>
                    <execution>
                        <id>integration-test</id>
                        <goals>
                            <goal>integration-test</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>verify</id>
                        <goals>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
ops4j-issues commented 12 years ago

Harald Wellmann commented

Yes, but look at this snippet from Servlet3WarIntegrationTest:

        String bundlePath = WEB_BUNDLE
                + "mvn:org.ops4j.pax.web.samples/helloworld-servlet3/2.0.0-SNAPSHOT/war?"
                + WEB_CONTEXT_PATH + "=/war3";
ops4j-issues commented 12 years ago

Achim Nierbeck commented

oops, got distracted by the first failed test, yep that one is not correct :smile:

ops4j-issues commented 12 years ago

Achim Nierbeck commented

Branch: refs/heads/master
Home: https://github.com/ops4j/org.ops4j.pax.web
Commit: fa3e044a2a99e52896d26ccc4ae2b2f67640e068
https://github.com/ops4j/org.ops4j.pax.web/commit/fa3e044a2a99e52896d26ccc4ae2b2f67640e068
Date: 2012-06-12 (Tue, 12 Jun 2012)