|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Question on semantics of <module> rules in Ivy 2.1.0Greetings all,
I have a resolution chain containing Maven central, but my company's modules are published internally only, hence I wish to avoid searching Maven central for artifacts in the 'mycompany' organization, and vice versa. The first case is easy... I just define <module organisation="mycompany" name=".*" resolver="integration"/> And everything is good. The problem is when I wish to have Ivy use a subset of 2 resolvers for non-'mycompany' artifacts. For just one resolve, a zero-width negative lookahead seems sufficient: <module organisation="^(?!mycompany).*" name=".*" resolver="thirdparty"/> But it seems that I can't apply more this regex to more than one resolver. If I use multiple rules, only the first rule is observed: <module organisation="^(?!mycompany).*" name=".*" resolver="thirdparty"/> <module organisation="^(?!mycompany).*" name=".*" resolver="public"/> The result is that Ivy matches artifacts in 'thirdparty' but not in 'public'. What is the correct semantics to use in this case? Thanks, Carlton ***CONFIDENTIALITY NOTICE and DISCLAIMER*** This message and any attachment are confidential and may be privileged or otherwise protected from disclosure and solely for the use of the person(s) or entity to whom it is intended. If you have received this message in error and are not the intended recipient, please notify the sender immediately and delete this message and any attachment from your system. If you are not the intended recipient, be advised that any use of this message is prohibited and may be unlawful, and you must not copy this message or attachment or disclose the contents to any other person. |
|
|
Re: Question on semantics of <module> rules in Ivy 2.1.0Carlton Brown wrote:
> Greetings all, > > > > I have a resolution chain containing Maven central, but my company's > modules are published internally only, hence I wish to avoid searching > Maven central for artifacts in the 'mycompany' organization, and vice > versa. > > > > The first case is easy... I just define > > <module organisation="mycompany" name=".*" resolver="integration"/> > > > > And everything is good. > > > > The problem is when I wish to have Ivy use a subset of 2 resolvers for > non-'mycompany' artifacts. > > > > For just one resolve, a zero-width negative lookahead seems sufficient: > > <module organisation="^(?!mycompany).*" name=".*" > resolver="thirdparty"/> > > > > But it seems that I can't apply more this regex to more than one > resolver. If I use multiple rules, only the first rule is observed: > > <module organisation="^(?!mycompany).*" name=".*" > resolver="thirdparty"/> > > <module organisation="^(?!mycompany).*" name=".*" resolver="public"/> > > > > The result is that Ivy matches artifacts in 'thirdparty' but not in > 'public'. > > > > What is the correct semantics to use in this case? Set up a chain resolver containing thirdparty and public, and reference that in your module element. e.g. <module organisation="^(?!mycompany).*" name=".*" resolver="non-mycompany"/> <chain name="non-mycompany" returnFirst="true"> <resolver ref="thirdparty"/> <resolver ref="public"/> </chain> Tom |
|
|
RE: Re: Question on semantics of <module> rules in Ivy 2.1.0> -----Original Message-----
> From: news [mailto:news@...] On Behalf Of Tom Widmer > Sent: Monday, November 02, 2009 8:38 AM > To: ivy-user@... > Subject: Re: Question on semantics of <module> rules in Ivy 2.1.0 > > > But it seems that I can't apply more this regex to more than one > > resolver. If I use multiple rules, only the first rule is observed: > > > > <module organisation="^(?!mycompany).*" name=".*" > > resolver="thirdparty"/> > > > > <module organisation="^(?!mycompany).*" name=".*" resolver="public"/> > > > > > > > > The result is that Ivy matches artifacts in 'thirdparty' but not in > > 'public'. > > > > > > > > What is the correct semantics to use in this case? > > Set up a chain resolver containing thirdparty and public, and > that in your module element. e.g. > > <module organisation="^(?!mycompany).*" name=".*" > resolver="non-mycompany"/> > > <chain name="non-mycompany" returnFirst="true"> > <resolver ref="thirdparty"/> > <resolver ref="public"/> > </chain> Clever idea.. I'll give it a try. ***CONFIDENTIALITY NOTICE and DISCLAIMER*** This message and any attachment are confidential and may be privileged or otherwise protected from disclosure and solely for the use of the person(s) or entity to whom it is intended. If you have received this message in error and are not the intended recipient, please notify the sender immediately and delete this message and any attachment from your system. If you are not the intended recipient, be advised that any use of this message is prohibited and may be unlawful, and you must not copy this message or attachment or disclose the contents to any other person. |
| Free embeddable forum powered by Nabble | Forum Help |