Ivy: allow using explicit recognizer

I have two tuned converters. One of them is a repo company, and the other is a local developer repository. I want to:

<ivy:resolve  />
<ivy:install from="company" to="local" ... />

It is important that the first solution is sent directly to the company's repo and collects all the necessary modules.

Problem: I cannot force to allow the use of an explicitly defined recognizer. I tried to use “modules” in my “File” settings, but then I get only some modules from the company, the rest is still read from the local one (at that time it is empty, so I get permission errors).

I can use 2 settings files, one for preparation and one for local development, but there should be a better way. Why can a “publication” be installed, but a “permission” cannot?

+3
source share
1 answer

Why can “publication” be installed, but “Allow” cannot?

Allow absolutely. This is usually done using several settings files, as you mentioned, you did not want to do this. In practice, I consider it very common (if not standard) to have more than one settings file used in conjunction with settingsRefthe permission invocation property .

In our project, we are doing something like:

...
<target name="init-ivy" depends="">
    <ivy:settings id="install.settings"
                  file="${project.ivy.config.dir}/ivysettings-install.xml"/>
    <ivy:settings id="internet.settings"
                  file="${project.ivy.config.dir}/ivysettings-internet.xml"/>
    ...
</target>
...
<!-- note init-ivy has already been called before this target runs -->
<target name="resolve-internet" if="internet.connected" >
        <echo>"internet connected! Resolving dependencies via internet..."<echo/>
        <ivy:resolve settingsRef="internet.settings"
                     haltonfailure="false" failureproperty="resolve.failed"/>
</target>
...

Of course, in a simpler project, you can always automatically call the “main” settings file (either by placing it in the root directory or by editing the ivy property $ivy.settings.file) to use only “install” when launching the installation target.

+5
source

All Articles