ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maarten Coene (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (IVY-1225) Ivy won't import atomikos-util claiming cycling dependency -parent inheritance problem?
Date Thu, 16 Sep 2010 22:17:32 GMT

     [ https://issues.apache.org/jira/browse/IVY-1225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Maarten Coene resolved IVY-1225.
--------------------------------

         Assignee: Maarten Coene
    Fix Version/s: 2.2.0
       Resolution: Fixed

Excellent analysis Steve: the problem was indeed that the parent pom was referencing back
to the child.
I've committed a patch in trunk and the 2.2.x branch that should fix the problem.


> Ivy won't import atomikos-util claiming cycling dependency -parent inheritance problem?
> ---------------------------------------------------------------------------------------
>
>                 Key: IVY-1225
>                 URL: https://issues.apache.org/jira/browse/IVY-1225
>             Project: Ivy
>          Issue Type: Bug
>          Components: Maven Compatibility
>            Reporter: Steve Loughran
>            Assignee: Maarten Coene
>             Fix For: 2.2.0
>
>
> I have a bit of ivy.xml which goes
> {noformat} 
>     <dependency org="com.atomikos"
>       name="atomikos-util"
>       rev="3.6.4"
>       conf="redist->default"/>
> {noformat} 
> This is being rejected due to cyclic dependencies:
> {noformat} 
> impossible to resolve dependencies:
> 	java.lang.IllegalArgumentException: a module is not authorized to depend on itself:
com.atomikos#atomikos-util;3.6.4
> 	at org.apache.ivy.core.resolve.IvyNodeCallers.addCaller(IvyNodeCallers.java:169)
> 	at org.apache.ivy.core.resolve.IvyNode.addCaller(IvyNode.java:1026)
> 	at org.apache.ivy.core.resolve.IvyNode.getDependencies(IvyNode.java:352)
> 	at org.apache.ivy.core.resolve.VisitNode.getDependencies(VisitNode.java:301)
> 	at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:750)
> 	at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:679)
> 	at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:744)
> 	at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:679)
> 	at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:744)
> 	at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:679)
> 	at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:757)
> 	at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:679)
> 	at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:744)
> 	at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:679)
> 	at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:744)
> 	at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:679)
> 	at org.apache.ivy.core.resolve.ResolveEngine.getDependencies(ResolveEngine.java:551)
> 	at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:235)
> 	at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:193)
> 	at org.apache.ivy.Ivy.resolve(Ivy.java:502)
> 	at org.apache.ivy.ant.IvyResolve.doExecute(IvyResolve.java:244)
> 	at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
> 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
> 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
> 	at org.apache.tools.ant.Task.perform(Task.java:348)
> 	at org.apache.tools.ant.Target.execute(Target.java:390)
> 	at org.apache.tools.ant.Target.performTasks(Target.java:411)
> 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
> 	at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
> 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
> 	at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
> 	at org.apache.tools.ant.Main.runBuild(Main.java:809)
> 	at org.apache.tools.ant.Main.startAnt(Main.java:218)
> 	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
> 	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
> {noformat} 
> Only here is the problem: atomikos doesn't depend on itself. It has a parent group which
then refers down -that could be the dependency.
> {noformat}
> <?xml version="1.0" encoding="UTF-8"?> 
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

> 	<modelVersion>4.0.0</modelVersion> 
> 	<parent> 
> 		<groupId>com.atomikos</groupId> 
> 		    <artifactId>transactions-essentials-all</artifactId> 
> 		<version>3.6.4</version> 
> 	</parent> 
> 	<groupId>com.atomikos</groupId> 
> 	<artifactId>atomikos-util</artifactId> 
> 	<version>3.6.4</version> 
> 	<name>Atomikos Util</name> 
>  
> 	<dependencies> 
> 		<groupId>javax.servlet</groupId> 
> 		<artifactId>servlet-api</artifactId> 
> 		<version>2.3</version> 
> 		<scope>provided</scope> 
> 	</dependencies> 
> </project> 
> {noformat}
> Does having a parent template which declares a dependency create a cycle? If so, how
to workaround this?

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


Mime
View raw message