Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-108290

Enable OOTB publishing to maven repos from gradle workspace

    Details

      Description

      Currently in order to publish maven artifacts out of the gradle workspace quite a bit of configuration is needed, something like this:

      configure(moduleProjects()) {
              // Create a sources jar when publishing to Nexus
              task sourcesJar(type: Jar) {
                  from sourceSets.main.allJava
                  classifier = 'sources'
              }
      
              // Attach the sources artifact to the project to published to Nexus
              artifacts {
                  archives sourcesJar
              }
      
              // Add credentials to the publish
              uploadArchives {
                  repositories.mavenDeployer {
                      configuration = configurations.deployerJars
                      repository(url: rootProject.projectNexusUrl) {
                          authentication(userName: nexusUsername, password: nexusPassword)
                      }
                  }
              }
      } 

       

      It would be great if the workspace was preconfigured to only require a URL and credentials for publishing repository and sources for all types of projects were already attached for publishing (including javadoc for jar modules).

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            raymond.auge Raymond Auge
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:

                Packages

                Version Package