How can we create a build.gradle equivalent file for pom.xml to build and deploy AEM code?

。_饼干妹妹 提交于 2019-12-11 06:17:08

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!