You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Justin Vallon <ju...@gmail.com> on 2018/05/25 06:06:03 UTC

Difference in resolve classpath from 2.4.0 to 2.5.0-rc1 for jmock

Goal: Try to build a simple X.java with dependency on org.jmock/jmock
and org.jmock/jmock-junit4.

Trouble with ivy 2.5.0-rc1, but ok with 2.4.0:

ivy.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<ivy-module version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
  <info organisation="qq" module="zz" />
  <dependencies>
    <!-- https://mvnrepository.com/artifact/org.jmock/jmock -->
    <dependency org="org.jmock" name="jmock" rev="2.8.4" />
    <dependency org="org.jmock" name="jmock-junit4" rev="2.8.4" />
  </dependencies>
</ivy-module>

build.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="qq" default="default">
  <target name="default">
    <delete dir="obj" />
    <mkdir dir="obj" />
    <mkdir dir="obj/classes" />
   
    <property name="ivy.default.ivy.user.dir" location="obj/user-dir" />

    <ivy:retrieve pathid="compile.classpath" />

    <pathconvert property="clspth" pathsep="${line.separator}">
      <path refid="compile.classpath" />
      <globmapper from="${ivy.lib.dir}/*" to="LIB/*" />
    </pathconvert>
    <echo
message="classpath:${line.separator}${clspth}${line.separator}${line.separator}"
/>
   
    <javac destdir="obj/classes" includeantruntime="false" >
      <src path="src" />
      <classpath refid="compile.classpath" />
    </javac>
  </target>

</project>

src/X.java:

import org.jmock.Expectations;
import org.jmock.integration.junit4.JUnitRuleMockery;

class X {
}

With ivy 2.4.0, this works.  With 2.5.0-rc1, the compile fails with
missing package org.jmock for "org.jmock.Expectations".

Difference between classpaths:

2.4.0     LIB/jmock-2.8.4-sources.jar
2.4.0     LIB/jmock-2.8.4.jar
2.4.0     LIB/jmock-2.8.4-javadoc.jar
2.5.0-rc1 LIB/jmock-2.8.4-tests.jar

org.jmock.Expectations is in jmock-2.8.4.jar.

Comparing cache/org.jmock/jmock-junit4/ivy-2.8.4.xml:

Old conf "test" private
New conf "test" public (many of the ivy.xmls have this change)

Old dependencies of org="org.jmock" name="jmock":

               <dependency org="org.jmock" name="jmock" rev="2.8.4"
force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
               <dependency org="org.jmock" name="jmock" rev="2.8.4"
force="true" conf="test->runtime(*),master(*)">
                       <artifact name="jmock" type="test-jar" ext="jar"
conf="" m:classifier="tests"/>
               </dependency>

New dependencies of org="org.jmock" name="jmock":

               <dependency org="org.jmock" name="jmock" rev="2.8.4"
force="true"
conf="compile->compile(*),master(*);runtime->runtime(*);test->runtime(*),master(*)">
                       <artifact name="jmock" type="test-jar" ext="jar"
conf="" m:classifier="tests"/>
               </dependency>

Both of the ivy-2.8.4.xml.original files say:

        <dependency>
            <groupId>org.jmock</groupId>
            <artifactId>jmock</artifactId>
            <version>${project.version}</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.jmock</groupId>
            <artifactId>jmock</artifactId>
            <version>${project.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>

Any ideas on what the trouble is here?

-- 
-Justin
JustinVallon@gmail.com


Re: Difference in resolve classpath from 2.4.0 to 2.5.0-rc1 for jmock

Posted by Jaikiran Pai <ja...@gmail.com>.
Just an update - I have looked into this and I now understand what's going
on. I'll need a bit of time to come up with a proper fix. I'll send an
update as soon as I have it.

-Jaikiran



On Friday, May 25, 2018, Jaikiran Pai <ja...@gmail.com> wrote:
> This looks like the bug which just got reported yesterday
https://issues.apache.org/jira/browse/IVY-1580. I can reproduce this
locally too, so it's a genuine bug. I'll take a look over the weekend.
>
> -Jaikiran
>
>
> On 25/05/18 11:36 AM, Justin Vallon wrote:
>>
>> Goal: Try to build a simple X.java with dependency on org.jmock/jmock
>> and org.jmock/jmock-junit4.
>>
>> Trouble with ivy 2.5.0-rc1, but ok with 2.4.0:
>>
>> ivy.xml:
>> <?xml version="1.0" encoding="ISO-8859-1"?>
>> <ivy-module version="2.0"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd
">
>>    <info organisation="qq" module="zz" />
>>    <dependencies>
>>      <!-- https://mvnrepository.com/artifact/org.jmock/jmock -->
>>      <dependency org="org.jmock" name="jmock" rev="2.8.4" />
>>      <dependency org="org.jmock" name="jmock-junit4" rev="2.8.4" />
>>    </dependencies>
>> </ivy-module>
>>
>> build.xml:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <project xmlns:ivy="antlib:org.apache.ivy.ant" name="qq"
default="default">
>>    <target name="default">
>>      <delete dir="obj" />
>>      <mkdir dir="obj" />
>>      <mkdir dir="obj/classes" />
>>          <property name="ivy.default.ivy.user.dir"
location="obj/user-dir" />
>>
>>      <ivy:retrieve pathid="compile.classpath" />
>>
>>      <pathconvert property="clspth" pathsep="${line.separator}">
>>        <path refid="compile.classpath" />
>>        <globmapper from="${ivy.lib.dir}/*" to="LIB/*" />
>>      </pathconvert>
>>      <echo
>>
message="classpath:${line.separator}${clspth}${line.separator}${line.separator}"
>> />
>>          <javac destdir="obj/classes" includeantruntime="false" >
>>        <src path="src" />
>>        <classpath refid="compile.classpath" />
>>      </javac>
>>    </target>
>>
>> </project>
>>
>> src/X.java:
>>
>> import org.jmock.Expectations;
>> import org.jmock.integration.junit4.JUnitRuleMockery;
>>
>> class X {
>> }
>>
>> With ivy 2.4.0, this works.  With 2.5.0-rc1, the compile fails with
>> missing package org.jmock for "org.jmock.Expectations".
>>
>> Difference between classpaths:
>>
>> 2.4.0     LIB/jmock-2.8.4-sources.jar
>> 2.4.0     LIB/jmock-2.8.4.jar
>> 2.4.0     LIB/jmock-2.8.4-javadoc.jar
>> 2.5.0-rc1 LIB/jmock-2.8.4-tests.jar
>>
>> org.jmock.Expectations is in jmock-2.8.4.jar.
>>
>> Comparing cache/org.jmock/jmock-junit4/ivy-2.8.4.xml:
>>
>> Old conf "test" private
>> New conf "test" public (many of the ivy.xmls have this change)
>>
>> Old dependencies of org="org.jmock" name="jmock":
>>
>>                 <dependency org="org.jmock" name="jmock" rev="2.8.4"
>> force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
>>                 <dependency org="org.jmock" name="jmock" rev="2.8.4"
>> force="true" conf="test->runtime(*),master(*)">
>>                         <artifact name="jmock" type="test-jar" ext="jar"
>> conf="" m:classifier="tests"/>
>>                 </dependency>
>>
>> New dependencies of org="org.jmock" name="jmock":
>>
>>                 <dependency org="org.jmock" name="jmock" rev="2.8.4"
>> force="true"
>>
conf="compile->compile(*),master(*);runtime->runtime(*);test->runtime(*),master(*)">
>>                         <artifact name="jmock" type="test-jar" ext="jar"
>> conf="" m:classifier="tests"/>
>>                 </dependency>
>>
>> Both of the ivy-2.8.4.xml.original files say:
>>
>>          <dependency>
>>              <groupId>org.jmock</groupId>
>>              <artifactId>jmock</artifactId>
>>              <version>${project.version}</version>
>>              <scope>compile</scope>
>>          </dependency>
>>
>>          <dependency>
>>              <groupId>org.jmock</groupId>
>>              <artifactId>jmock</artifactId>
>>              <version>${project.version}</version>
>>              <type>test-jar</type>
>>              <scope>test</scope>
>>          </dependency>
>>
>> Any ideas on what the trouble is here?
>>
>
>

Re: Difference in resolve classpath from 2.4.0 to 2.5.0-rc1 for jmock

Posted by Jaikiran Pai <ja...@gmail.com>.
This looks like the bug which just got reported yesterday 
https://issues.apache.org/jira/browse/IVY-1580. I can reproduce this 
locally too, so it's a genuine bug. I'll take a look over the weekend.

-Jaikiran


On 25/05/18 11:36 AM, Justin Vallon wrote:
> Goal: Try to build a simple X.java with dependency on org.jmock/jmock
> and org.jmock/jmock-junit4.
>
> Trouble with ivy 2.5.0-rc1, but ok with 2.4.0:
>
> ivy.xml:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <ivy-module version="2.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
>    <info organisation="qq" module="zz" />
>    <dependencies>
>      <!-- https://mvnrepository.com/artifact/org.jmock/jmock -->
>      <dependency org="org.jmock" name="jmock" rev="2.8.4" />
>      <dependency org="org.jmock" name="jmock-junit4" rev="2.8.4" />
>    </dependencies>
> </ivy-module>
>
> build.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns:ivy="antlib:org.apache.ivy.ant" name="qq" default="default">
>    <target name="default">
>      <delete dir="obj" />
>      <mkdir dir="obj" />
>      <mkdir dir="obj/classes" />
>     
>      <property name="ivy.default.ivy.user.dir" location="obj/user-dir" />
>
>      <ivy:retrieve pathid="compile.classpath" />
>
>      <pathconvert property="clspth" pathsep="${line.separator}">
>        <path refid="compile.classpath" />
>        <globmapper from="${ivy.lib.dir}/*" to="LIB/*" />
>      </pathconvert>
>      <echo
> message="classpath:${line.separator}${clspth}${line.separator}${line.separator}"
> />
>     
>      <javac destdir="obj/classes" includeantruntime="false" >
>        <src path="src" />
>        <classpath refid="compile.classpath" />
>      </javac>
>    </target>
>
> </project>
>
> src/X.java:
>
> import org.jmock.Expectations;
> import org.jmock.integration.junit4.JUnitRuleMockery;
>
> class X {
> }
>
> With ivy 2.4.0, this works.  With 2.5.0-rc1, the compile fails with
> missing package org.jmock for "org.jmock.Expectations".
>
> Difference between classpaths:
>
> 2.4.0     LIB/jmock-2.8.4-sources.jar
> 2.4.0     LIB/jmock-2.8.4.jar
> 2.4.0     LIB/jmock-2.8.4-javadoc.jar
> 2.5.0-rc1 LIB/jmock-2.8.4-tests.jar
>
> org.jmock.Expectations is in jmock-2.8.4.jar.
>
> Comparing cache/org.jmock/jmock-junit4/ivy-2.8.4.xml:
>
> Old conf "test" private
> New conf "test" public (many of the ivy.xmls have this change)
>
> Old dependencies of org="org.jmock" name="jmock":
>
>                 <dependency org="org.jmock" name="jmock" rev="2.8.4"
> force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
>                 <dependency org="org.jmock" name="jmock" rev="2.8.4"
> force="true" conf="test->runtime(*),master(*)">
>                         <artifact name="jmock" type="test-jar" ext="jar"
> conf="" m:classifier="tests"/>
>                 </dependency>
>
> New dependencies of org="org.jmock" name="jmock":
>
>                 <dependency org="org.jmock" name="jmock" rev="2.8.4"
> force="true"
> conf="compile->compile(*),master(*);runtime->runtime(*);test->runtime(*),master(*)">
>                         <artifact name="jmock" type="test-jar" ext="jar"
> conf="" m:classifier="tests"/>
>                 </dependency>
>
> Both of the ivy-2.8.4.xml.original files say:
>
>          <dependency>
>              <groupId>org.jmock</groupId>
>              <artifactId>jmock</artifactId>
>              <version>${project.version}</version>
>              <scope>compile</scope>
>          </dependency>
>
>          <dependency>
>              <groupId>org.jmock</groupId>
>              <artifactId>jmock</artifactId>
>              <version>${project.version}</version>
>              <type>test-jar</type>
>              <scope>test</scope>
>          </dependency>
>
> Any ideas on what the trouble is here?
>