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 Cecile <ru...@gmail.com> on 2007/03/28 06:27:10 UTC

(ivy 1.4) compiling fails while resolution is fine

Hi,

I have an app.api project that depends on general.api.

My "app.api" ivy.xml file looks like this:

    <configurations>
        <conf name="bundle" />
        <conf name="compile" />
        <conf name="localdir" />
        <conf name="private_compile" visibility="private" />
        <conf name="runtime" visibility="private" />
        <conf name="test" visibility="private" />
    </configurations>

    <publications>
        <artifact name="app.api" type="jar" conf="bundle,compile" />
    </publications>

    <dependencies defaultconf="private_compile->compile">
        <dependency name="general.api" rev="latest.integration" />
        ... other dependencies ...
    </dependencies>

Note that if I type "ant resolve", everything is fine.
In my provide_compile directory, I do see general.api.jar being downloaded.

But when I run "ant compile" on "app.api", I get errors like:

    [javac] C:\_programs\workspace\app.api\src\java\app\api\Foo.java:39:
cannot find symbol
    [javac] symbol  : constructor DbStuff( int )
    [javac] location: general.api.DbStuff
    [javac]         return new DbStuff( int );

Note that general.api.jar exports DbStuff.

Any tips on how to debug this classpath issue ?

Merci à tous.

Re: (ivy 1.4) compiling fails while resolution is fine

Posted by Xavier Hanin <xa...@gmail.com>.
On 3/28/07, Cecile <ru...@gmail.com> wrote:
>
> Hi,
>
> I have an app.api project that depends on general.api.
>
> My "app.api" ivy.xml file looks like this:
>
>     <configurations>
>         <conf name="bundle" />
>         <conf name="compile" />
>         <conf name="localdir" />
>         <conf name="private_compile" visibility="private" />
>         <conf name="runtime" visibility="private" />
>         <conf name="test" visibility="private" />
>     </configurations>
>
>     <publications>
>         <artifact name="app.api" type="jar" conf="bundle,compile" />
>     </publications>
>
>     <dependencies defaultconf="private_compile->compile">
>         <dependency name="general.api" rev="latest.integration" />
>         ... other dependencies ...
>     </dependencies>
>
> Note that if I type "ant resolve", everything is fine.
> In my provide_compile directory, I do see general.api.jar being
> downloaded.
>
> But when I run "ant compile" on "app.api", I get errors like:
>
>     [javac] C:\_programs\workspace\app.api\src\java\app\api\Foo.java:39:
> cannot find symbol
>     [javac] symbol  : constructor DbStuff( int )
>     [javac] location: general.api.DbStuff
>     [javac]         return new DbStuff( int );
>
> Note that general.api.jar exports DbStuff.
>
> Any tips on how to debug this classpath issue ?


To help we'd need to see how your ant build file looks like.

As general tip for debugging classpath issues, the first step is to use ant
verbose mode (-verbose), and you should see the command invoked by ant (and
thus their classpath). Double checking your jar as Hervé suggest is also a
good practice, you can use tool like any zip utility to check you can at
least unzip your jar, then using javap may also help to check a class API
corresponds to what you expect.

- Xavier



Merci à tous.
>

RE: (ivy 1.4) compiling fails while resolution is fine

Posted by Bourzeix, Hervé <He...@Genesys.com>.
Hello Cecile, 

as I am pretty sure you double check the javac source/classpath used, have you double check the general.api jar is correct? (contains what it should contains). Last word, successful resolution do not means it will compile...

regards,


-----Original Message-----
From: Cecile [mailto:rubycoder@gmail.com]
Sent: mercredi 28 mars 2007 06:27
To: ivy-user@incubator.apache.org
Subject: (ivy 1.4) compiling fails while resolution is fine


Hi,

I have an app.api project that depends on general.api.

My "app.api" ivy.xml file looks like this:

    <configurations>
        <conf name="bundle" />
        <conf name="compile" />
        <conf name="localdir" />
        <conf name="private_compile" visibility="private" />
        <conf name="runtime" visibility="private" />
        <conf name="test" visibility="private" />
    </configurations>

    <publications>
        <artifact name="app.api" type="jar" conf="bundle,compile" />
    </publications>

    <dependencies defaultconf="private_compile->compile">
        <dependency name="general.api" rev="latest.integration" />
        ... other dependencies ...
    </dependencies>

Note that if I type "ant resolve", everything is fine.
In my provide_compile directory, I do see general.api.jar being downloaded.

But when I run "ant compile" on "app.api", I get errors like:

    [javac] C:\_programs\workspace\app.api\src\java\app\api\Foo.java:39:
cannot find symbol
    [javac] symbol  : constructor DbStuff( int )
    [javac] location: general.api.DbStuff
    [javac]         return new DbStuff( int );

Note that general.api.jar exports DbStuff.

Any tips on how to debug this classpath issue ?

Merci à tous.