i'm new user of dotcms. i can't build my project because gradle tell me: could not find method from() for argument compile on root project 'name of the project'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin : 'war'
apply plugin: 'application'
configurations {
compile
antLibs
ext.dotcmsFolder = "dotCMS"
ext.libsFolder = "dotCMS/WEB-INF/lib"
ext.felixFolder = "dotCMS/WEB-INF/felix/bundle"
}
//Import and apply the dependencies from the dependencies scripts
apply from: "$rootDir/dependencies.gradle"
repositories {
}
task copyToLib {
sync {
from configurations.compile
into configurations.felixFolder
include '**/dot.org.apache.felix.bundlerepository*.jar'
include '**/dot.org.apache.felix.fileinstall*.jar'
include '**/dot.org.apache.felix.gogo.*.jar'
include '**/dot.org.apache.felix.http.bundle*.jar'
}
sync {
from configurations.compile
into configurations.libsFolder
exclude '**/dot.org.apache.felix.bundlerepository*.jar'
exclude '**/dot.org.apache.felix.fileinstall*.jar'
exclude '**/dot.org.apache.felix.gogo.*.jar'
exclude '**/*.zip'
}
copy {
from configurations.compile
into configurations.dotcmsFolder
include '**/starter*.zip'
rename ( /starter(.+)\.zip/, "starter.zip" )
}
}
copyToLib.description = 'Synchronizes the dependencies with the libs folders (dotCMS/WEB-INF/lib, dotCMS/WEB-INF/felix/bundle) and copies the starter.zip'
dependencies {
antLibs group: 'org.apache.ant', name: 'ant-junit', version: '1.9.3'
antLibs group: 'ant-contrib', name: 'ant-contrib', version: '1.0b3'
}
ClassLoader antClassLoader = org.apache.tools.ant.Project.class.classLoader
configurations.antLibs.each { File f -> antClassLoader.addURL(f.toURI().toURL()) }
//Move the dependencies to the WEB-INF/lib folder
tasks.copyToLib.execute()
ant.importBuild 'build.xml'
task wrapper(type: Wrapper) {
gradleVersion = '1.11'
}
defaultTasks 'help', 'tasks'