maven-centralmaven-publish

Publishing on Maven Central failed with file path validation


I am new to Maven Central and publishing my very first Android Library by uploading manually with bundle zip file on new version of Maven Central portal. But it’s failed at Component Validation stage with error message File path '0.0.1' is not valid for file 'artifactId-0.0.1-javadoc.jar'.

What is the correct folder structure for upload bundle?


Solution

  • You are probably zipping your files in the wrong directory.

    Let say you have the following Gradle library build output directory:

    lib/build/repos/releases/com/example/lib/0.0.1/
    

    You need to be at

    lib/build/repos/releases/
    

    and run

    zip release.zip com/example/lib/0.0.1/*
    

    Now try upload release.zip again, your error should be gone.