Skip to content

Instantly share code, notes, and snippets.

@sheenobu
Created March 29, 2012 16:02
Show Gist options
  • Save sheenobu/2238960 to your computer and use it in GitHub Desktop.
Save sheenobu/2238960 to your computer and use it in GitHub Desktop.
Getting a project to use your local alfresco dependency jars within eclipse, useful for the Alfresco Shaded WAR file.
apply plugin: 'eclipse'
apply plugin: 'java'
eclipse {
classpath {
file {
withXml {
/* Iterate over each share dependency file and add it to the eclipse classpath */
def node = it.asNode()
def alfresco_dir = project.property('alfresco.directory')
files(fileTree(dir: "${alfresco_dir}/tomcat/webapps/share/", include: "**/*.jar")).each { File file ->
node.appendNode('classpathentry',[ 'kind':'lib', 'path':file.path ])
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment