Using Bintray maven repository with Ivy
Asked Answered
L

1

7

I'm considering using using bintray to host some project dependencies in a maven repository. My problem is I'm using Ivy and I can't seem to figure out how to take this maven configuration (supplied by bintray):

<?xml version="1.0" encoding="UTF-8" ?>
<settings xsi:schemaLocation='http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd'
xmlns='http://maven.apache.org/SETTINGS/1.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
  <profiles>
    <profile>
      <repositories>
        <repository>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>central</id>
          <name>bintray</name>
          <url>http://dl.bintray.com/content/example/external-deps</url>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>central</id>
          <name>bintray-plugins</name>
          <url>http://dl.bintray.com/content/example/external-deps</url>
        </pluginRepository>
      </pluginRepositories>
      <id>bintray</id>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>bintray</activeProfile>
  </activeProfiles>
</settings>

and turn it into something that Ivy can use. Can anyone help me with this?

Lecithinase answered 15/4, 2013 at 22:5 Comment(0)
G
6

You can just add the repository like this:

<ivysettings>
    <resolvers>
        <ibiblio name="bintray"
                 m2compatible="true"
                 root="http://dl.bintray.com/content/example/external-deps"/>
    </resolvers>
</ivysettings>
Galloromance answered 16/4, 2013 at 1:8 Comment(2)
Is it just a coincidence that the id of the profile is the name of the ibiblio resolver (=bintray)? AFAIK ivy does not parse/support maven profiles.Crossarm
Nah... It's just a coincidence.Galloromance

© 2022 - 2024 — McMap. All rights reserved.