You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Erwan de FERRIERES (Created) (JIRA)" <ji...@apache.org> on 2012/04/04 13:38:23 UTC

[jira] [Created] (OFBIZ-4783) ./ant can't find the cobertura class

./ant can't find the cobertura class
------------------------------------

                 Key: OFBIZ-4783
                 URL: https://issues.apache.org/jira/browse/OFBIZ-4783
             Project: OFBiz
          Issue Type: Bug
          Components: framework
    Affects Versions: SVN trunk
            Reporter: Erwan de FERRIERES
             Fix For: SVN trunk


./ant can't find the cobertura class, and deactivate the code coverage function.
in framework/base/build.xml:
{code}
        <condition property="exclude.cobertura" value="org/ofbiz/base/config/Cobertura*.java">
            <not>
                <available classname="net.sourceforge.cobertura.instrument.ClassInstrumenter" classpathref="local.class.path"/>
            </not>
        </condition>
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] [Commented] (OFBIZ-4783) ./ant can't find the cobertura class

Posted by Jacques Le Roux <ja...@les7arts.com>.
Please follow the best practices: keep your comments related to a Jira in the Jira.

Thanks

Jacques

From: "Pierre Smits" <pi...@gmail.com>
> Hi Adrian,
>
> Please see inline comments
>
> Op 12 april 2012 14:21 schreef Adrian Crum (Commented) (JIRA) <
> jira@apache.org> het volgende:
>
>>
>>    [
>> https://issues.apache.org/jira/browse/OFBIZ-4783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13252375#comment-13252375]
>>
>> Adrian Crum commented on OFBIZ-4783:
>> ------------------------------------
>>
>> It might help to learn the differences between the ant version bundled
>> with your OS and the ant version bundled with OFBiz. In particular, see
>> what changed in the <available> element between those versions.
>>
>
> Possible incompatibilities between my OS native ant version and the version
> bundled with OFBiz is the reas0n why I have my CI environment (Jenkins) to
> build the OFBiz project with the (OFBiz) bundled version. As I do locally.
> And I can't imagine that triggering ./ant <target> in the root directory of
> OFBiz would use the OS native ant, as otherwise many more would have issues.
>
>
>>
>> Pierre - Framework code MUST have good unit tests and those tests MUST
>> have good code coverage. Before Adam made these test improvements, OFBiz
>> was very buggy and the bugs were difficult to track down.
>>
>
> I agree, It must be good for the framework and at least adequate for the
> applications (incl specialpurpose). I can't judge on the unit tests
> provided. However, I did see that unit tests for various special purpose
> apps unit tests are missing. I guess it is like having help screens. Always
> the last items on the list to be resolved. I am not passing judgements
> here, as I am as good or as bad as the next guy. ;-)
>
>
>
>>
>> Cobertura has an incompatible license, so we can not include it in OFBiz.
>>
>>
> I guess that why we have the target 'download-cobertura' since Dec 19, 2010
> and provided by Erwan as an OFBiz enhancement. My point is that the
> cobertura java code isn't intended for production purposes, but only for
> testing and analysis. And as such it shouldn't be part of the framework by
> default.
>
> But that is another issue regarding improving OFBiz.
>
> The issue exists, because currently the implemented solution doesn't work
> (and I can't oversee since when). And I am not the only one who experienced
> it. I am just contributing to improve OFBiz. I am not doing this to satisfy
> my ego. If the PMC believes that my contributions are not adding any value
> and are disruptive to the harmony and the status-quo of the project I
> welcome their feedback.
>
>
>
>>  > ./ant can't find the cobertura class
>> > ------------------------------------
>> >
>> >                 Key: OFBIZ-4783
>> >                 URL: https://issues.apache.org/jira/browse/OFBIZ-4783
>> >             Project: OFBiz
>> >          Issue Type: Bug
>> >          Components: framework
>> >    Affects Versions: SVN trunk
>> >            Reporter: Erwan de FERRIERES
>> >              Labels: qa
>> >             Fix For: SVN trunk
>> >
>> >
>> > ./ant can't find the cobertura class, and deactivate the code coverage
>> function.
>> > in framework/base/build.xml:
>> > {code}
>> >         <condition property="exclude.cobertura"
>> value="org/ofbiz/base/config/Cobertura*.java">
>> >             <not>
>> >                 <available
>> classname="net.sourceforge.cobertura.instrument.ClassInstrumenter"
>> classpathref="local.class.path"/>
>> >             </not>
>> >         </condition>
>> > {code}
>>
>> --
>> This message is automatically generated by JIRA.
>> If you think it was sent incorrectly, please contact your JIRA
>> administrators:
>> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
>> For more information on JIRA, see: http://www.atlassian.com/software/jira
>>
>>
>>
> Regards,
>
> Pierre
> 

Re: [jira] [Commented] (OFBIZ-4783) ./ant can't find the cobertura class

Posted by Pierre Smits <pi...@gmail.com>.
Hi Adrian,

Please see inline comments

Op 12 april 2012 14:21 schreef Adrian Crum (Commented) (JIRA) <
jira@apache.org> het volgende:

>
>    [
> https://issues.apache.org/jira/browse/OFBIZ-4783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13252375#comment-13252375]
>
> Adrian Crum commented on OFBIZ-4783:
> ------------------------------------
>
> It might help to learn the differences between the ant version bundled
> with your OS and the ant version bundled with OFBiz. In particular, see
> what changed in the <available> element between those versions.
>

Possible incompatibilities between my OS native ant version and the version
bundled with OFBiz is the reas0n why I have my CI environment (Jenkins) to
build the OFBiz project with the (OFBiz) bundled version. As I do locally.
And I can't imagine that triggering ./ant <target> in the root directory of
OFBiz would use the OS native ant, as otherwise many more would have issues.


>
> Pierre - Framework code MUST have good unit tests and those tests MUST
> have good code coverage. Before Adam made these test improvements, OFBiz
> was very buggy and the bugs were difficult to track down.
>

I agree, It must be good for the framework and at least adequate for the
applications (incl specialpurpose). I can't judge on the unit tests
provided. However, I did see that unit tests for various special purpose
apps unit tests are missing. I guess it is like having help screens. Always
the last items on the list to be resolved. I am not passing judgements
here, as I am as good or as bad as the next guy. ;-)



>
> Cobertura has an incompatible license, so we can not include it in OFBiz.
>
>
I guess that why we have the target 'download-cobertura' since Dec 19, 2010
and provided by Erwan as an OFBiz enhancement. My point is that the
cobertura java code isn't intended for production purposes, but only for
testing and analysis. And as such it shouldn't be part of the framework by
default.

But that is another issue regarding improving OFBiz.

The issue exists, because currently the implemented solution doesn't work
(and I can't oversee since when). And I am not the only one who experienced
it. I am just contributing to improve OFBiz. I am not doing this to satisfy
my ego. If the PMC believes that my contributions are not adding any value
and are disruptive to the harmony and the status-quo of the project I
welcome their feedback.



>  > ./ant can't find the cobertura class
> > ------------------------------------
> >
> >                 Key: OFBIZ-4783
> >                 URL: https://issues.apache.org/jira/browse/OFBIZ-4783
> >             Project: OFBiz
> >          Issue Type: Bug
> >          Components: framework
> >    Affects Versions: SVN trunk
> >            Reporter: Erwan de FERRIERES
> >              Labels: qa
> >             Fix For: SVN trunk
> >
> >
> > ./ant can't find the cobertura class, and deactivate the code coverage
> function.
> > in framework/base/build.xml:
> > {code}
> >         <condition property="exclude.cobertura"
> value="org/ofbiz/base/config/Cobertura*.java">
> >             <not>
> >                 <available
> classname="net.sourceforge.cobertura.instrument.ClassInstrumenter"
> classpathref="local.class.path"/>
> >             </not>
> >         </condition>
> > {code}
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators:
> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>
Regards,

Pierre

[jira] [Commented] (OFBIZ-4783) ./ant can't find the cobertura class

Posted by "Pierre Smits (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-4783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13251404#comment-13251404 ] 

Pierre Smits commented on OFBIZ-4783:
-------------------------------------

We should ask ourselves why we do want the java code related to cobertura in our codebase.

And whether incorporating the jar would not be enough...
                
> ./ant can't find the cobertura class
> ------------------------------------
>
>                 Key: OFBIZ-4783
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4783
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Erwan de FERRIERES
>              Labels: qa
>             Fix For: SVN trunk
>
>
> ./ant can't find the cobertura class, and deactivate the code coverage function.
> in framework/base/build.xml:
> {code}
>         <condition property="exclude.cobertura" value="org/ofbiz/base/config/Cobertura*.java">
>             <not>
>                 <available classname="net.sourceforge.cobertura.instrument.ClassInstrumenter" classpathref="local.class.path"/>
>             </not>
>         </condition>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OFBIZ-4783) ./ant can't find the cobertura class

Posted by "Erwan de FERRIERES (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-4783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13251042#comment-13251042 ] 

Erwan de FERRIERES commented on OFBIZ-4783:
-------------------------------------------

for testing:
{code}
    <path id="test.class.path">
        <fileset dir="framework/base/lib" includes="*.jar"/>
    </path>

    <target name="test-cob" depends="ofbiz-init">
        <condition property="exclude.cobertura" value="org/ofbiz/base/config/Cobertura*.java">
            <not>
                <available classname="net.sourceforge.cobertura.instrument.ClassInstrumenter"
                           property="exclude.cobertura"
                           classpathref="test.class.path"/>
            </not>
        </condition>
        <condition property="exclude.cobertura2" value="org/ofbiz/base/config/Cobertura*.java">
            <not>
                <available file="cobertura-1.9.4.1.jar" classpathref="test.class.path"/>
            </not>
        </condition>
        <echo message="${exclude.cobertura}"/>
        <echo message="${exclude.cobertura2}"/>
    </target>
{code}
                
> ./ant can't find the cobertura class
> ------------------------------------
>
>                 Key: OFBIZ-4783
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4783
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Erwan de FERRIERES
>              Labels: qa
>             Fix For: SVN trunk
>
>
> ./ant can't find the cobertura class, and deactivate the code coverage function.
> in framework/base/build.xml:
> {code}
>         <condition property="exclude.cobertura" value="org/ofbiz/base/config/Cobertura*.java">
>             <not>
>                 <available classname="net.sourceforge.cobertura.instrument.ClassInstrumenter" classpathref="local.class.path"/>
>             </not>
>         </condition>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OFBIZ-4783) ./ant can't find the cobertura class

Posted by "Erwan de FERRIERES (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-4783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13252643#comment-13252643 ] 

Erwan de FERRIERES commented on OFBIZ-4783:
-------------------------------------------

using revision 889900 (just after cobertura integration), the problem is already present. In fact, it seems it never works...

clean-svninfo:
     [echo] Resetting svninfo...
     [echo] Done!
     [echo] [build] ========== Done Building (Compile) ==========

run-tests:
     [java] Set OFBIZ_HOME to - /home/erwan/workspace/ofbiz889838
     [java] java.lang.ClassNotFoundException: org.ofbiz.base.config.CoberturaInstrumenter
     [java] 	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
     [java] 	at java.security.AccessController.doPrivileged(Native Method)
     [java] 	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
     [java] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
     [java] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
     [java] 	at org.ofbiz.base.start.InstrumenterWorker.instrument(InstrumenterWorker.java:39)
     [java] 	at org.ofbiz.base.start.Classpath.instrument(Classpath.java:92)
     [java] 	at org.ofbiz.base.start.Start.initClasspath(Start.java:228)
     [java] 	at org.ofbiz.base.start.Start.init(Start.java:87)
     [java] 	at org.ofbiz.base.start.Start.main(Start.java:410)
     [java] Admin socket not configured; set to port 0
     [java] 2012-04-12 19:19:19,666 (main) [    ContainerLoader.java:50 :INFO ] [Startup] Loading containers...

                
> ./ant can't find the cobertura class
> ------------------------------------
>
>                 Key: OFBIZ-4783
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4783
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Erwan de FERRIERES
>              Labels: qa
>             Fix For: SVN trunk
>
>
> ./ant can't find the cobertura class, and deactivate the code coverage function.
> in framework/base/build.xml:
> {code}
>         <condition property="exclude.cobertura" value="org/ofbiz/base/config/Cobertura*.java">
>             <not>
>                 <available classname="net.sourceforge.cobertura.instrument.ClassInstrumenter" classpathref="local.class.path"/>
>             </not>
>         </condition>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OFBIZ-4783) ./ant can't find the cobertura class

Posted by "Adrian Crum (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-4783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13252375#comment-13252375 ] 

Adrian Crum commented on OFBIZ-4783:
------------------------------------

It might help to learn the differences between the ant version bundled with your OS and the ant version bundled with OFBiz. In particular, see what changed in the <available> element between those versions.

Pierre - Framework code MUST have good unit tests and those tests MUST have good code coverage. Before Adam made these test improvements, OFBiz was very buggy and the bugs were difficult to track down.

Cobertura has an incompatible license, so we can not include it in OFBiz.
                
> ./ant can't find the cobertura class
> ------------------------------------
>
>                 Key: OFBIZ-4783
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4783
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Erwan de FERRIERES
>              Labels: qa
>             Fix For: SVN trunk
>
>
> ./ant can't find the cobertura class, and deactivate the code coverage function.
> in framework/base/build.xml:
> {code}
>         <condition property="exclude.cobertura" value="org/ofbiz/base/config/Cobertura*.java">
>             <not>
>                 <available classname="net.sourceforge.cobertura.instrument.ClassInstrumenter" classpathref="local.class.path"/>
>             </not>
>         </condition>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira