Eclipse & Containers (Ivy)


(Alaa Murad) #1

I have a framework (MOE) that use gradle, while we are using Ivy (Sorry, but ivy has this neat feature when working inside Eclipse that allows us to switch between source and binary without editing the dependencies configuration , it’s called “Resolve dependencies in workspace” )

Now, I’m trying to make MOE’s gradle use the Ivy container in its classpath without any luck ! I opened Eclipse .classpath file and copied the container path like this:

eclipse {
	classpath{
		containers "org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?project=ios-moe&ivyXmlPath=ivy.xml&confs=*&ivySettingsPath=ivysettings.xml&loadSettingsOnDemand=false&ivyUserDir=&propertyFiles=settings.properties&acceptedTypes=jar%2Cbundle%2Cejb%2Cmaven-plugin&alphaOrder=false&resolveInWorkspace=true&transitiveResolve=true&readOSGiMetadata=false&retrievedClasspath=false"
	}
    // Set MOE nature
    project {
        natures 'org.multi-os-engine.project'
    }
}   

The Ivy Container “org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER” will contain jars and it may also contain sources (if avaliable in workspace) . Gradle fails to use this container.

Please note that I’m not trying to make gradle fix/update eclipse path, I need the other way around, making eclipse fix/update gradle path !

Thanks in advance


(Stefan Oehme) #2

That’s not possible. Gradle doesn’t know anything about what’s happening inside the IDE and making the result of the build depend on a running IDE would make no sense anyway.

You can use Buildship 2.0 and composite builds.


(Alaa Murad) #3

So what is the role of ?

eclipse {
	classpath{
		containers ....
	}
}

(Stefan Oehme) #4

It’s to generate the correct eclipse classpath file from a Gradle project.