我们如何为pom.xml创建build.gradle等效文件来构建和部署AEM代码? [英] How can we create a build.gradle equivalent file for pom.xml to build and deploy AEM code?

查看:273
本文介绍了我们如何为pom.xml创建build.gradle等效文件来构建和部署AEM代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为 build.gradle 文件,如完整的pom.xml文件-archetyperel =nofollow noreferrer> AEM Maven Archetype Lazybones模板来构建代码并将其部署到AEM。


  • 我试着用 TWCCable的CQ插件,但不知道如何使用
    它。还尝试在主pom.xml上运行 gradle init ,但显然它是不完整的(下面),我想我'

      allprojects {
    apply plugin:'maven'
    group = 'com.project2'
    version ='1.0-SNAPSHOT'
    }
    subprojects {
    apply plugin:'java'
    sourceCompatibility = 1.6
    targetCompatibility = 1.6

    知识库{
    mavenLocal()
    maven {urlhttps://repo.adobe.com/nexus/content/groups/public}
    maven {urlhttp://repo.maven.apache.org/maven2}
    }
    configurations.all {
    }
    }




是否有我可以使用的示例文件?我的目标是使用 gradle build 而不是使用 mvn clean install -PautoInstallPackage ,不知道我是否可以做到这一点?
$ b $作为新工具的作者,我希望鼓励AEM开发人员使用以下内容:



https://github.com / Cognifide / gradle-aem-plugin (全新的功能丰富的Gradle插件)
https://github.com/Cognifide/gradle-aem-example (示例项目,只是克隆和测试)



享受! p>

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.

解决方案

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!

这篇关于我们如何为pom.xml创建build.gradle等效文件来构建和部署AEM代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆