Skip to content

gradlecm does not work with maven-publish #28

Description

@tschulte

The gradlecm plugin does not work smoothly with maven-publish(http://www.gradle.org/docs/current/userguide/publishing_maven.html).

If the uploadArchives configuration is replaced with

publishing {
    publications {
        plugin(MavenPublication) {
            from components.java
        }
    }
    repositories {
        maven {
            name 'snapshots'
            url "file://${rootDir}/../mvn-repo/snapshots"
        }
        maven {
            name 'releases'
            url "file://${rootDir}/../mvn-repo/releases"
        }
    }

}

and

apply plugin: 'maven'

replaced with

apply plugin: 'maven-publish'

I get the error

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\projekte\gradle\GradleCMPlugin\build.gradle' line: 92

* What went wrong:
A problem occurred evaluating root project 'GradleCMPlugin'.
> Cannot configure the 'publishing' extension after it has been accessed.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions