5 Replies Latest reply on Nov 9, 2007 8:45 AM by porcherg

    Ivy and clover tasks

    porcherg

      Since the migration from ant to ivy, the test.coverage target is broken. If the clover jar is not added to the test.classpath, all the tests fail.

      - I don't know if we can change the test classpath easily so that the clover.jar is included only when we are running coverage tests.

      - There are currently no ivy file for clover, so we can't download it automatically.
      To fix this, we can create an ivy file for clover and add this to the dependencies of the pvm or maybe we can add the clover jar and license file to the svn repository ?

      regards,
      Guillaume

        • 1. Re: Ivy and clover tasks
          tom.baeyens

          good point. i'll do this later.

          can you ping our helpdesk to request the status of your access to the repository so that you can fix these kinds of issues yourself ? put me in cc.

          • 2. Re: Ivy and clover tasks
            porcherg

            There is still an issue with clover:
            - if the license is in the ivy dependencies, an exception is raised when running coverage.test

            [taskdef] java.util.zip.ZipException: error in opening zip file
             [taskdef] at java.util.zip.ZipFile.open(Native Method)
             [taskdef] at java.util.zip.ZipFile.<init>(ZipFile.java:203)
             [taskdef] at java.util.zip.ZipFile.<init>(ZipFile.java:234)
            ...


            - the license search by clover is clover.license, but the ivy downloaded file is clover-1.0.license. As a result, the license file is not found.

            Renaming this file to clover.license make the first step succeed (clover-setup), but then compilation fails (test target calls compile, and clover is not a dependency of compile).

            If we copy clover.jar and clover.license to ~/.ant/lib , the coverage test succeeds.
            (This can however be an issue if we need to work with more than one license file.)

            Guillaume

            • 3. Re: Ivy and clover tasks
              tom.baeyens

              i would like to stay away from putting things in the ant classpath. otherwise, we need to automate that copy in the build and that will require an ant.home property to be set up. so i would like to solve it the following way:

              use ivy's retrieve to put the libs in target/clover. there you can give them the proper names. then you can add the clover lib in the target/clover dir to the classpath.

              is that ok ?
              could you do it ?

              • 4. Re: Ivy and clover tasks
                porcherg

                 

                "tom.baeyens@jboss.com" wrote:
                i would like to stay away from putting things in the ant classpath.

                I agree with you.
                "tom.baeyens@jboss.com" wrote:
                otherwise, we need to automate that copy in the build and that will require an ant.home property to be set up. so i would like to solve it the following way:

                use ivy's retrieve to put the libs in target/clover. there you can give them the proper names. then you can add the clover lib in the target/clover dir to the classpath.

                is that ok ?
                could you do it ?

                This is a good solution (even if this duplicates the clover jar).

                I'll try to do it.

                Guillaume

                • 5. Re: Ivy and clover tasks
                  porcherg

                  I think this works now.

                  I added cenquatasks.jar to the ivy repository, it is needed to extend dynamically the ant classpath (as explained in http://www.cenqua.com/clover/doc/ant/installopts.html#Ant+1.6.x )

                  Guillaume