You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Christopher Frost (JIRA)" <ji...@apache.org> on 2011/08/08 17:44:27 UTC
[jira] [Created] (IVY-1309) Exclude dosn't work in a more complex
build enviroment
Exclude dosn't work in a more complex build enviroment
------------------------------------------------------
Key: IVY-1309
URL: https://issues.apache.org/jira/browse/IVY-1309
Project: Ivy
Issue Type: Bug
Components: Core
Affects Versions: 2.1.0
Reporter: Christopher Frost
We are using ant 1.8.2 and Ivy 2.1.0 for our build. When resolving an ivy file the module wide exclude fails to stop a matching transitive dependency from coming in. I have reduced the build down as much as possible to try and make it easy to diagnose but if I strip any more out then the problem goes away. I don't believe there is anything wrong with what's there, it's from a very mature system used to build all the Springsource projects internally. I will upload a zip to reproduce.
1. Unzip the zip file.
2. At the command line go in to the unzipped, 'kernel' directory.
3. run 'ant clean package'
4. in the target directory just created there will be a 'org.eclipse.osgi-3.7.0.v20110613' file, this is excluded in the ivy file.
The ivy and build files are pretty minimal but I can't see anything I've done wrong. The artifacts it's pulling in are in the ivy-cache/integration-repo directories so nothing needs to be downloaded.
Chris.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (IVY-1309) Exclude dosn't work in a more complex
build enviroment
Posted by "Luke Renn (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IVY-1309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13248552#comment-13248552 ]
Luke Renn commented on IVY-1309:
--------------------------------
I'm able to fix this issue by making IvyNodeCallers not check the full callers list if it finds the exclusions in the module descriptor. In this case, equinox get re-included when the kernel.userreqion caller is checked (since it's a dependency there). I've got a fix locally, but I'm pretty sure that will break dependency level excludes that really should get reincluded.
The relevant code is:
{code:title=IvyCallers.java|borderStyle=solid}
boolean doesCallersExclude(String rootModuleConf, Artifact artifact, Stack callersStack) {
if (callersStack.contains(node.getId())) {
return false;
}
callersStack.push(node.getId());
try {
Caller[] callers = getCallers(rootModuleConf);
if (callers.length == 0) {
return false;
}
for (int i = 0; i < callers.length; i++) {
if (!callers[i].canExclude()) {
return false;
}
if (!doesExclude(md, rootModuleConf, callers[i].getCallerConfigurations(),
callers[i].getDependencyDescriptor(), artifact, callersStack)) {
// This is what kills us...if it's the a top level exclude, this check shouldn't be happening or it's going to get unexcluded here.
return false;
}
}
return true;
} finally {
callersStack.pop();
}
}
{code}
> Exclude dosn't work in a more complex build enviroment
> ------------------------------------------------------
>
> Key: IVY-1309
> URL: https://issues.apache.org/jira/browse/IVY-1309
> Project: Ivy
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.1.0
> Reporter: Christopher Frost
> Attachments: kernel.zip
>
>
> We are using ant 1.8.2 and Ivy 2.1.0 for our build. When resolving an ivy file the module wide exclude fails to stop a matching transitive dependency from coming in. I have reduced the build down as much as possible to try and make it easy to diagnose but if I strip any more out then the problem goes away. I don't believe there is anything wrong with what's there, it's from a very mature system used to build all the Springsource projects internally. I will upload a zip to reproduce.
> 1. Unzip the zip file.
> 2. At the command line go in to the unzipped, 'kernel' directory.
> 3. run 'ant clean package'
> 4. in the target directory just created there will be a 'org.eclipse.osgi-3.7.0.v20110613' file, this is excluded in the ivy file.
> The ivy and build files are pretty minimal but I can't see anything I've done wrong. The artifacts it's pulling in are in the ivy-cache/integration-repo directories so nothing needs to be downloaded.
> Chris.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (IVY-1309) Exclude dosn't work in a more complex
build enviroment
Posted by "Nicolas Lalevée (Resolved JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IVY-1309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nicolas Lalevée resolved IVY-1309.
----------------------------------
Resolution: Fixed
Fix Version/s: trunk
Assignee: Nicolas Lalevée
Thanks for the pointer Luke and the test case Christopher. It was some circular dependency which bypassed the full check on the exclusion pattern.
> Exclude dosn't work in a more complex build enviroment
> ------------------------------------------------------
>
> Key: IVY-1309
> URL: https://issues.apache.org/jira/browse/IVY-1309
> Project: Ivy
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.1.0
> Reporter: Christopher Frost
> Assignee: Nicolas Lalevée
> Fix For: trunk
>
> Attachments: kernel.zip
>
>
> We are using ant 1.8.2 and Ivy 2.1.0 for our build. When resolving an ivy file the module wide exclude fails to stop a matching transitive dependency from coming in. I have reduced the build down as much as possible to try and make it easy to diagnose but if I strip any more out then the problem goes away. I don't believe there is anything wrong with what's there, it's from a very mature system used to build all the Springsource projects internally. I will upload a zip to reproduce.
> 1. Unzip the zip file.
> 2. At the command line go in to the unzipped, 'kernel' directory.
> 3. run 'ant clean package'
> 4. in the target directory just created there will be a 'org.eclipse.osgi-3.7.0.v20110613' file, this is excluded in the ivy file.
> The ivy and build files are pretty minimal but I can't see anything I've done wrong. The artifacts it's pulling in are in the ivy-cache/integration-repo directories so nothing needs to be downloaded.
> Chris.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (IVY-1309) Exclude dosn't work in a more complex
build enviroment
Posted by "Christopher Frost (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IVY-1309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christopher Frost updated IVY-1309:
-----------------------------------
Attachment: kernel.zip
I had to remove it's ivy cache to keep the file size down so when you run the package command it will download a load of stuff. All to a the local folder and shouldn't taker more than 3 minutes.
> Exclude dosn't work in a more complex build enviroment
> ------------------------------------------------------
>
> Key: IVY-1309
> URL: https://issues.apache.org/jira/browse/IVY-1309
> Project: Ivy
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.1.0
> Reporter: Christopher Frost
> Attachments: kernel.zip
>
>
> We are using ant 1.8.2 and Ivy 2.1.0 for our build. When resolving an ivy file the module wide exclude fails to stop a matching transitive dependency from coming in. I have reduced the build down as much as possible to try and make it easy to diagnose but if I strip any more out then the problem goes away. I don't believe there is anything wrong with what's there, it's from a very mature system used to build all the Springsource projects internally. I will upload a zip to reproduce.
> 1. Unzip the zip file.
> 2. At the command line go in to the unzipped, 'kernel' directory.
> 3. run 'ant clean package'
> 4. in the target directory just created there will be a 'org.eclipse.osgi-3.7.0.v20110613' file, this is excluded in the ivy file.
> The ivy and build files are pretty minimal but I can't see anything I've done wrong. The artifacts it's pulling in are in the ivy-cache/integration-repo directories so nothing needs to be downloaded.
> Chris.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira