问题
I'm trying to create a build.gradle file like the complete pom.xml for AEM Maven Archetype or Lazybones Template to build and deploy the code to AEM.
I tried to use TWCCable's CQ Plugin but wasn't sure how to use it.
Also tried to run gradle init on the main pom.xml but obviously it was incomplete (below) and i think i'll have to add all dependencies manually.
allprojects { apply plugin: 'maven' group = 'com.project2' version = '1.0-SNAPSHOT' } subprojects { apply plugin: 'java' sourceCompatibility = 1.6 targetCompatibility = 1.6 repositories { mavenLocal() maven { url "https://repo.adobe.com/nexus/content/groups/public" } maven { url "http://repo.maven.apache.org/maven2" } } configurations.all { } }
Is there any example file that i could use? My goal is to use gradle build instead of using mvn clean install -PautoInstallPackage , not sure if i can even do it?
Appreciate your thoughts.
回答1:
As an author of new tool I'd like to encourage AEM devs for using:
https://github.com/Cognifide/gradle-aem-plugin (brand new, feature rich Gradle plugin) https://github.com/Cognifide/gradle-aem-example (example project, just clone and test)
Enjoy!
来源:https://stackoverflow.com/questions/41234132/how-can-we-create-a-build-gradle-equivalent-file-for-pom-xml-to-build-and-deploy