Results 1 to 4 of 4

Thread: STS, maven, and using bundled artifacts

  1. #1
    Join Date
    Apr 2012
    Posts
    2

    Default STS, maven, and using bundled artifacts

    Hi everyone,

    I have looked all over the net and these forums for an answer to this, but I will admit I am relatively new to STS and maven, so please forgive me if this is a dumb question.

    I am trying to use jackson (JSON Mapper from fasterxml.com) and simply cannot get STS to include the databind module in the Maven Dependencies. Adding the databind package in the POM dependencies causes the jackson core and annotations to be added to the dependencies, but databind does not. When I try to use databind in code, it cannot resolve the import. I have used maven to manage my dependencies in various other projects and while sometimes I had to rebuild dependencies / clean projects to get things to show up, I cannot seem to get this package to load. The one thing I see different is that this project is packaged as a BUNDLE, not a jar or war, so it shows BUNDLE in STS and not snapshot or release.

    I have tried removing and re-adding the dependencies, cleaning the project in STS and a maven clean target, closing and re-opening the project and STS, rebooting the laptop, deleting the jackson tree from my local repo (~.m2/repository), deleting the ENTIRE repository to force it to rebuild, pretty much everything I can think of.

    Am I missing some simple thing here? Any help is appreciated.

    I have included screen shots of me trying to add the module as well so you can see what is happening.

    Thanks,

    Rich

    Screen Shot 2012-04-09 at 12.09.00 PM.jpgScreen Shot 2012-04-09 at 12.09.41 PM.jpgScreen Shot 2012-04-09 at 12.10.19 PM.jpgScreen Shot 2012-04-09 at 12.10.50 PM.jpgScreen Shot 2012-04-09 at 12.11.07 PM.jpg

  2. #2
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    768

    Default

    I am not familiar with Jackson, and so I don't have an immediate answer. But, there are some things that you can try.

    First, can you paste the relevant parts of your pom.xml here? My guess is that the dependencies are being added incorrectly.

    What happens if you change the packaging type of your project to jar or war?

    Also, try compiling on the command line (use 'mvn compile'), this will let you know if the problem is with m2eclipse or maven. (m2eclipse is STS's support for maven, it is a separate project, but one that we have some experience with).
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

  3. #3
    Join Date
    Apr 2012
    Posts
    2

    Default

    I was able to resolve the problem. The solution was to simply go into the POM.xml file and remove the type bundle attribute from the dependency so that it looked like the others. After doing so and rebuilding the workspace, all was well.

  4. #4
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,650

    Default

    Hey!

    Thanks for letting us know and good to hear you got it working!!!

    -Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •