You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "David Savage (JIRA)" <ji...@apache.org> on 2009/07/13 20:13:15 UTC

[jira] Created: (FELIX-1342) Injected Ivy dependency configurations must be configurable

Injected Ivy dependency configurations must be configurable
-----------------------------------------------------------

                 Key: FELIX-1342
                 URL: https://issues.apache.org/jira/browse/FELIX-1342
             Project: Felix
          Issue Type: Improvement
          Components: Sigil
            Reporter: David Savage


Currently, Ivy dependencies injected by Sigil, have a hard-coded rule, resulting in dependencies like this:

 <dependency org="sigil" name="log4j-log4j" rev="1.2.15"
        conf="compile->compile(default);runtime->runtime(default);default->default"/>


The rule below drops configurations with no artifacts, and then add the configuration X->X(default) for all other configurations, except default.
This needs to be configurable via parameters to SigilParser in ivysettings.xml.


int nDeps = 0;
boolean foundDefault = false;

for (String conf : md.getConfigurationsNames()) {
if (conf.equals("default")) {
foundDefault = true;
} else if (md.getArtifacts(conf).length == 0) {
dd.addDependencyConfiguration(conf, conf + "(default)");
nDeps++;
}
}

if (nDeps > 0) {
if (foundDefault)
dd.addDependencyConfiguration("default", "default");
} else {
dd.addDependencyConfiguration("*", "*"); // all
// configurations
}


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.