jersey
  1. jersey
  2. JERSEY-712

-Pcobertura profile option for JAXB sample not documented (or working)

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.7
    • Component/s: examples
    • Labels:
      None
    • Environment:

      Maven 3.0.3, ubuntu linux, JDK 6.

      Description

      Unsure what the -Pcobertura option on the Jersey JAXB sample does, what it's trying to show. If you wish to retain this option, good to document it a bit in the README.html for this sample, otherwise best to just remove the profile from the POM to avoid confusion.

      Note it presently doesn't work: mvn clean test -Pcobertura returns this error:

      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Failed to resolve artifact.

      Missing:
      ----------
      1) com.sun.jersey:jersey-grizzly:jar:cobertura:1.6

      Try downloading the file manually from the project website.

      Then, install it using the command:
      mvn install:install-file -DgroupId=com.sun.jersey -DartifactId=jersey-grizzly -Dversion=1.6 -Dclassifier=cobertura -Dpackaging=jar -Dfile=/path/to/file

      Alternatively, if you host your own repository you can deploy the file there:
      mvn deploy:deploy-file -DgroupId=com.sun.jersey -DartifactId=jersey-grizzly -Dversion=1.6 -Dclassifier=cobertura -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

      Path to dependency:
      1) com.sun.jersey.samples:jaxb:jar:1.6
      2) com.sun.jersey:jersey-grizzly:jar:cobertura:1.6

      ----------
      1 required artifact is missing.

      for artifact:
      com.sun.jersey.samples:jaxb:jar:1.6

      from the specified remote repositories:
      central (http://repo1.maven.org/maven2),
      glassfish-repository.dev.java.net (http://download.java.net/maven/glassfish/),
      maven2-repository.dev.java.net (http://download.java.net/maven/2/)

        Activity

        Hide
        jbenoit added a comment -

        Support for Cobertura based code coverage measurement was previously add for Jersey.
        i.e. Use following maven targets to compile, instrument, test and generate reports:
        mvn clean install -Pcobertura -Dmaven.test.skip=true
        mvn cobertura:cobertura -Pcobertura

        Revision 4601 was for excluding samples from coverage report
        Revision 4604 excluded helloworld-osgi-webapp/war-bundle from coverage report

        Will confirm with Pavel samples/* status, regarding their inclusion/exclusion in Cobertura reports, and update pom/README appropriately.

        Show
        jbenoit added a comment - Support for Cobertura based code coverage measurement was previously add for Jersey. i.e. Use following maven targets to compile, instrument, test and generate reports: mvn clean install -Pcobertura -Dmaven.test.skip=true mvn cobertura:cobertura -Pcobertura Revision 4601 was for excluding samples from coverage report Revision 4604 excluded helloworld-osgi-webapp/war-bundle from coverage report Will confirm with Pavel samples/* status, regarding their inclusion/exclusion in Cobertura reports, and update pom/README appropriately.
        Hide
        Pavel Bucek added a comment -

        interesting.. it is not supposed to be documented (or I didn't think so). We use cobertura only for internal code coverage tests.. (it is not covered in readme file, thus "unsupported")

        and to answer.. it is working. Only problem here is that you don't have instrumented version of jersey jars in your local repository - we don't publish them, so you need to build it by yourself. If you really want to do it, execute following command in jersey project root dir:

        mvn clean install -Dcobertura

        Show
        Pavel Bucek added a comment - interesting.. it is not supposed to be documented (or I didn't think so). We use cobertura only for internal code coverage tests.. (it is not covered in readme file, thus "unsupported") and to answer.. it is working. Only problem here is that you don't have instrumented version of jersey jars in your local repository - we don't publish them, so you need to build it by yourself. If you really want to do it, execute following command in jersey project root dir: mvn clean install -Dcobertura
        Hide
        gmazza added a comment -

        I guess nothing needs to be done, but if you get many similar bug reports or mailing list questions by other confused newbies, you might wish to include something like this in the pom.xml under the Cobertura profile:
        <-- Internal Jersey team use only, profile requires additional configuration to work -->

        Alternatively, what you guys have cooked up is something other Jersey-using projects might wish to take advantage of, and you can give directions like this:
        <-- To use this profile, must first build Jersey source with "mvn clean install -Dcobertura" -->

        Show
        gmazza added a comment - I guess nothing needs to be done, but if you get many similar bug reports or mailing list questions by other confused newbies, you might wish to include something like this in the pom.xml under the Cobertura profile: <-- Internal Jersey team use only, profile requires additional configuration to work --> Alternatively, what you guys have cooked up is something other Jersey-using projects might wish to take advantage of, and you can give directions like this: <-- To use this profile, must first build Jersey source with "mvn clean install -Dcobertura" -->
        Hide
        jbenoit added a comment -

        fixed by adding suggested text to samples pom.xml files describing user of cobertura profile.
        Here is list of samples files committed:
        Sending atompub-contacts\atompub-contacts-client\pom.xml
        Sending atompub-contacts\atompub-contacts-server\pom.xml
        Sending entity-provider\pom.xml
        Sending exceptions\pom.xml
        Sending extended-wadl-webapp\pom.xml
        Sending generate-wadl\pom.xml
        Sending groovy\pom.xml
        Sending helloworld\pom.xml
        Sending helloworld-osgi-webapp\functional-test\pom.xml
        Sending helloworld-osgi-webapp\war-bundle\pom.xml
        Sending helloworld-webapp\pom.xml
        Sending https-clientserver-grizzly\pom.xml
        Sending https-server-glassfish\pom.xml
        Sending jacksonjsonprovider\pom.xml
        Sending jaxb\pom.xml
        Sending jersey-guice-filter\pom.xml
        Sending jersey-server-linking-sample\pom.xml
        Sending jmaki-backend\pom.xml
        Sending json-from-jaxb\pom.xml
        Sending jsonp\pom.xml
        Sending mandel\pom.xml
        Sending moxy\pom.xml
        Sending multipart-webapp\pom.xml
        Sending optimistic-concurrency\pom.xml
        Sending osgi-http-service\bundle\pom.xml
        Sending osgi-http-service\functional-test\pom.xml
        Sending pom.xml
        Sending scala-helloworld-webapp\pom.xml
        Sending simple-atom-server\pom.xml
        Sending simple-console\pom.xml
        Sending simple-servlet\pom.xml
        Sending sparklines\pom.xml
        Sending spring-annotations\pom.xml
        Sending storage-service\pom.xml
        Transmitting file data ..................................
        Committed revision 4902.

        Show
        jbenoit added a comment - fixed by adding suggested text to samples pom.xml files describing user of cobertura profile. Here is list of samples files committed: Sending atompub-contacts\atompub-contacts-client\pom.xml Sending atompub-contacts\atompub-contacts-server\pom.xml Sending entity-provider\pom.xml Sending exceptions\pom.xml Sending extended-wadl-webapp\pom.xml Sending generate-wadl\pom.xml Sending groovy\pom.xml Sending helloworld\pom.xml Sending helloworld-osgi-webapp\functional-test\pom.xml Sending helloworld-osgi-webapp\war-bundle\pom.xml Sending helloworld-webapp\pom.xml Sending https-clientserver-grizzly\pom.xml Sending https-server-glassfish\pom.xml Sending jacksonjsonprovider\pom.xml Sending jaxb\pom.xml Sending jersey-guice-filter\pom.xml Sending jersey-server-linking-sample\pom.xml Sending jmaki-backend\pom.xml Sending json-from-jaxb\pom.xml Sending jsonp\pom.xml Sending mandel\pom.xml Sending moxy\pom.xml Sending multipart-webapp\pom.xml Sending optimistic-concurrency\pom.xml Sending osgi-http-service\bundle\pom.xml Sending osgi-http-service\functional-test\pom.xml Sending pom.xml Sending scala-helloworld-webapp\pom.xml Sending simple-atom-server\pom.xml Sending simple-console\pom.xml Sending simple-servlet\pom.xml Sending sparklines\pom.xml Sending spring-annotations\pom.xml Sending storage-service\pom.xml Transmitting file data .................................. Committed revision 4902.

          People

          • Assignee:
            jbenoit
            Reporter:
            gmazza
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: