Skip to content

NullPointerException during :generatePomFileForMavenJavaPublication #163

@illingtonFlex

Description

@illingtonFlex

My Gradle project is giving a NullPointerException during the artifactoryDeploy task. I have the same exact Gradle file working on several other projects, so I'm confused as to what could be wrong.

The error indicates that it can't access pom-default.xml under /build/publications. That file is there, though it's empty.

The stacktrace output is below with all the noise stripped out:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':AuthenticationService:generatePomFileForMavenJavaPublication'.

[stack removed for brevity]

Caused by: org.gradle.api.UncheckedIOException: Could not write to file 'C:\Users\JCN\IdeaProjects\MyProject\AuthenticationService\build\publications\mavenJava\pom-default.xm l'.

[stack removed for brevity]

Caused by: org.gradle.api.InvalidUserCodeException: Could not apply withXml() to generated POM

[stack removed for brevity]

Caused by: java.lang.NullPointerException

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions