0

I am trying to use the ivy:publish task to publish my jars using the public ibiblio resolver which I understand corresponds to the Maven central repository.

It seems to sort of work, but I am eventually getting an HTTP 405: Method Not Allowed.

The relevant sections from my ivysettings.xml, ivy.xml and build.xml files are:

ivysettings.xml

This is actually the entire file:

<ivysettings>
    <settings defaultResolver="public"/>
        <resolvers>
            <ibiblio name="public" m2compatible="true" />
        </resolvers>
</ivysettings>

ivy.xml

...
<publications>
    <artifact type="pom" ext="pom" conf="default"/>
    <artifact type="jar" ext="jar" conf="default"/>
</publications>
...

build.xml

...
<target name="gen-pom" depends="ivy-resolve">
    <ivy:makepom ivyfile="ivy.xml" pomfile="${dist.dir}/${ant.project.name}.pom">
        <mapping conf="default" scope="compile"/>
    </ivy:makepom>
</target>

<target name="ivy-publish" depends="jar, gen-pom" description="publish jar/source to maven repo">
    <ivy:publish resolver="public" forcedeliver="true" overwrite="true" publishivy="false">
        <artifacts pattern="${dist.dir}/[artifact].[ext]" />
    </ivy:publish>
</target>
...

When I invoke ant ivy-publish I get:

impossible to publish artifacts for mant-tasks#mant-tasks;1.0: java.io.IOException: PUT operation to URL https://repo1.maven.org/maven2/mant-tasks/mant-tasks/1.0/mant-tasks-1.0.pom failed with status code 405: Method Not Allowed

I guess this makes sense otherwise anybody would be able to pollute the namespace. So my questions are:

  1. is this due to my lack of credentials? I.e. would I need to add a credentials element in my ivysettings.xml as shown in this answer?
  2. can I obtain credentials for ibiblio for my insignificant module and if not what other freely available public repositories are available to a Java developer who doesn't want to build and maintain their own maven repository? I need to be able to pull-in my module (as an IVY dependency of other projects) from a globally available repository.
Community
  • 1
  • 1
Marcus Junius Brutus
  • 26,087
  • 41
  • 189
  • 331

1 Answers1

0

Maven central is operated by Sonatype, the creators of Maven:

JFrog operate a competing service called bintray:

I suggest reading the documentation and obtain a credential that will allow to publish your module's file(s)

Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185