ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhatia <Bha...@OFAC.CH>
Subject compiling a web project in eclipse after IvyDE resolve
Date Thu, 23 Aug 2007 09:17:20 GMT

Thanks for your inputs, now when I do a resolve in IvyDE/Eclipse I get only
the dependencies for the configuration selected. Then I do a Project->Build
in Eclipse from menu options but dont find any classes folder created under
/WEB-INF of my war project. Is this normal ? If it is, then how can a
developer be sure the web project compiles ?
thanks




Xavier Hanin wrote:
> 
> Seems pretty good to me, just one quick thought: I don't think specifying
> the transitive attribute on the dependencies is a good idea, since you
> already set it for your runtime configuration.
> 
> Xavier
> 
> On 8/22/07, bhatia <Bhatia@ofac.ch> wrote:
>>
>>
>> Hello,
>>
>> I make an ivy file from .project and .websettings files in Eclipse where
>> .project is for compile-time dependencies and .websettings for run-time
>> dependencies. I am trying to specify these configurations in my
>> ivy.xmlfile
>> and the logic I am using is as follows.
>>
>> If a dependency is coming from a .project file, I specify conf="compile"
>> in
>> my <dependency> attribute and if it is coming from a .websettings file, I
>> specify conf="run". If a particular dependency exists in both Eclipse
>> files,
>> I specify it as conf="compile,run". Is this the right way ?
>>
>> Since our projects have circular dependencies at compile-time, I also
>> specify the attribute transitive="true" for compile-time deps just for
>> clarity although I know its not really needed since by default its "true"
>> anyway. For run-time dependencies, I specify the attribute
>> transitive="false". If a particular dependency exists in both "compile"
>> and
>> "run" configs, I specify transitive="false".
>>
>> The following is what I am trying to achieve:
>> 1) Resolving on a compile time config must get me compile time artifacts
>> transitively
>> 2) Resolving on a run time config must get me run time artifacts only
>> non-transitively
>> 3) I want the flexibility to chose which configuration I want to publish
>> to
>> the repository. If its run-time, then I should be able to fetch run-time
>> artifacts into my web project's /WEB-INF/lib, package them into a war and
>> publish. Is it possible to specify this in a <publish> tag  ?
>>
>> This is how I started doing all this. I dont know if its the right way to
>> go
>> about it though and I am seeking your inputs on this. All that I know is
>> that our projects our heavily circularly dependant at compile-time.
>>
>> Here it goes. To specify that web project "nr" has 2 configurations and
>> that
>> all its dependencies participate in these configurations:
>>
>> ******************************************************************
>> <ivy-module version="1.0">
>> <info organisation="ofac" module="nr" revision="prod"/>
>> <configurations>
>>         <conf name="compile" description="compile-time deps only"
>> transitive="true"
>> visibility="public"/>
>>         <conf name="run" description="run-time deps only, also used for
>> creating
>> and publishing an artifact" transitive="false" visibility="public"/>
>> </configurations>
>> <publications>
>>         <artifact name="nr" type="war"/>
>>         <artifact name="nr" type="source" ext="src.jar"/>
>> </publications>
>> <dependencies>
>>     <dependency org="ofac" name="OFACDI" rev="prod" conf="compile"
>> transitive="true"/>
>>     <dependency org="ofac" name="OFACNR" rev="prod" conf="compile,run"
>> transitive="false"/>
>>     <dependency org="ofac" name="fa" rev="prod" conf="compile"
>> transitive="true">
>>         <artifact name="fa" type="war"/>
>>     </dependency>
>>     <dependency org="ofac" name="ph" rev="prod" conf="compile"
>> transitive="true">
>>         <artifact name="ph" type="war"/>
>>     </dependency>
>>     <dependency org="ofac" name="OFACFC" rev="prod" conf="compile"
>> transitive="true"/>
>>     <dependency org="ofac" name="OFACPool" rev="prod" conf="compile"
>> transitive="true"/>
>>     <dependency org="ofac" name="OFACTO" rev="prod" conf="compile"
>> transitive="true"/>
>>     <dependency org="ofac" name="OFACRM" rev="prod" conf="compile,run"
>> transitive="false"/>
>>     <dependency org="ofac" name="OFACFA" rev="prod" conf="compile"
>> transitive="true"/>
>>     <dependency org="ofac" name="OFACNF" rev="prod" conf="compile"
>> transitive="true"/>
>>     <dependency org="ofac" name="OFACXEDO" rev="prod" conf="compile,run"
>> transitive="false"/>
>>     <dependency org="ofac" name="OFACCZ" rev="prod" conf="compile"
>> transitive="true"/>
>>     <dependency org="ofac" name="OFACCS" rev="prod" conf="compile"
>> transitive="true"/>
>>     <dependency org="ofac" name="OFACPage" rev="prod" conf="compile"
>> transitive="true"/>
>>     <dependency org="ofac" name="ad" rev="prod" conf="compile"
>> transitive="true">
>>         <artifact name="ad" type="war"/>
>>     </dependency>
>>     <dependency org="ofac" name="OFACCL" rev="prod" conf="compile"
>> transitive="true"/>
>>     <dependency org="ofac" name="OFACIM" rev="prod" conf="compile"
>> transitive="true"/>
>>     <dependency org="ofac" name="OFACAD" rev="prod" conf="compile"
>> transitive="true"/>
>>     <dependency org="ofac" name="OFACWeb" rev="prod" conf="compile"
>> transitive="true"/>
>>     <dependency org="ofac" name="OFACMN" rev="prod" conf="compile"
>> transitive="true"/>
>>     <dependency org="ofac" name="OFACWW" rev="prod" conf="compile"
>> transitive="true"/>
>>     <dependency org="ofac" name="OFACCA" rev="prod" conf="compile"
>> transitive="true"/>
>>     <dependency org="ofac" name="OFACGD" rev="prod" conf="compile"
>> transitive="true"/>
>>     <dependency org="ofac" name="OFACStandard" rev="prod" conf="compile"
>> transitive="true"/>
>>     <dependency org="ofac" name="OFACOF" rev="prod" conf="compile"
>> transitive="true"/>
>>     <dependency org="ofac" name="OFACFramework" rev="prod" conf="compile"
>> transitive="true"/>
>>     <dependency org="ofac" name="OFACCommon" rev="prod" conf="compile"
>> transitive="true"/>
>>     <dependency org="ofac" name="OFACDO" rev="prod" conf="compile"
>> transitive="true"/>
>>     <dependency org="ofac" name="OFACDL" rev="prod" conf="compile,run"
>> transitive="false"/>
>> </dependencies>
>> <conflicts>
>>     <manager name="ofac-cm" org="ofac"/>
>>     <manager name="latest-revision" org="(?!ofac).*"/>
>> </conflicts>
>> </ivy-module>
>>
>> **************************************************************************3
>>
>> I am using the same logic for each artifact's ivy file in the repository
>> too. Is this the right way to specify my configs ?
>>
>> thanks
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/resolve-errors-related-to-configuration-tf4311679.html#a12274854
>> Sent from the ivy-user mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Xavier Hanin - Independent Java Consultant
> http://xhab.blogspot.com/
> http://incubator.apache.org/ivy/
> http://www.xoocode.org/
> 
> 

-- 
View this message in context: http://www.nabble.com/resolve-errors-related-to-configuration-tf4311679.html#a12290102
Sent from the ivy-user mailing list archive at Nabble.com.


Mime
View raw message