0

The exact maven error message when deploying to heroku is:

No versions available for org.codehaus.jackson:jackson-mapper-asl:jar:[1.9,1.9.9] within specified range

I believe the issue is related to this answer and this Jackson repository maven-metadata.xml bug.

The following entry in the maven deploy log indicates that jackson-mapper-asl 1.9.9 is being downloaded from a heroku maven repository:

Downloaded: http://s3pository.heroku.com/jvm/org/codehaus/jackson/jackson-mapper-asl/1.9.9/jackson-mapper-asl-1.9.9.pom (2 KB at 12.3 KB/sec)

The heroku versions of the jackson maven-metadata.xml files are using incorrect version numbers - causing the maven error when using version ranges.

Is there a way, at deployment, to tell heroku to use a different maven repository for this dependency? Better yet, is there a way to get the heroku jackson-mapper-asl maven-metadata.xml file fixed?

Community
  • 1
  • 1
  • 2
    Can you contact Heroku support about this? – James Ward Oct 05 '12 at 04:55
  • James, I'm using the free version of heroku at the moment and their support center [link](https://devcenter.heroku.com/articles/support-channels) brings me to stackoverflow. – JasonD5150 Oct 05 '12 at 12:47
  • Just an update that I sent an e-mail to Heroku support regarding this issue. I'm a little slow, I couldn't find the right support link on their site until now! – JasonD5150 Oct 05 '12 at 14:27

2 Answers2

0

Could this suffice as a workaround? You could just take the repository configuration section and point to somewhere else or supplying the file yourself as you would do with custom items.

Anyway, you can do it. Defining a regular repository in pom.xml, here the central one:

<repositories>
  <repository>
    <id>central</id>
    <name>Maven Repository Switchboard</name>
    <layout>default</layout>
    <url>http://repo1.maven.org/maven2</url>
    <snapshots>
      <enabled>false</enabled>
    </snapshots>
  </repository>
</repositories>

Defining a repository in pom.xml that is pointing to a local "repo" item, which exists only within the application deployment:

<repositories>
    <!--other repositories if any-->
    <repository>
        <id>project.local</id>
        <name>project</name>
        <url>file:${project.basedir}/repo</url>
    </repository>
</repositories>

You should contact Heroku support about this in any case.

eis
  • 51,991
  • 13
  • 150
  • 199
  • Thanks for the suggestion. I tried to add the central repo to my pom but it still resolves to heroku's repo. I'm new to maven but I think this is because Jackson is a transitive dependency in my build. – JasonD5150 Oct 05 '12 at 14:27
  • @JasonD5150 for the time being, pointing to the local file like in my second example (+ the link) should be ok as a workaround. I think in the long term they'll need to fix the heroku repository, anyway. – eis Oct 10 '12 at 14:25
0

Follow Up I contacted Heroku support (super helpful, BTW) and they discovered the Heroku Maven cache was invalid for more than just Jackson. Heroku support kicked off an update process that helped resolve the problem but did not fix it completely. To get this issue completely resolved I had to add an explicit dependency to jackson-mapper-asl 1.9.9 in my pom.xml before I could deploy my app to Heroku.