Help. Can't resolve maven dependency.

Problem is that even if I put the reference into the pom, it still  doesn't resolve. Worse: It builds fine from the commandline with no  changes at all.
Sure could use a clue or at least a methodology for getting one. Environment is Windows 7 + Cygwin.

The error is:

Couldn't find a version in [1.0.0.2, 2.0.0.1, 2.0.0.3, 2.0.0.4] to match range [1,2)
  net.collings.service.schema:Currency:tar.gz:null

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  nexus (http://central),
  thirdparty (http://mvnrepo.collings.net:6666/nexus/content/repositories/thirdparty),
  snapshots (http://mvnrepo.collings.net:6666/nexus/content/repositories/snapshots)

Path to dependency:
    1) com.collings.royalty:retardsApeAbility:jar:2.0-SNAPSHOT
    2) com.collings.royalty:royaltyApeAbilityInterface:jar:2.0-SNAPSHOT
    3) net.collings.service.retards:LZRetardsService:jar:1.0.0.6
    4) net.collings.service.retards:LZRetardsServiceTypes:tar.gz:model:1.0.0.6. Couldn't find a version in [1.0.0.2, 2.0.0.1, 2.0.0.3, 2.0.0.4] to match range [1,2)
  net.collings.service.schema:Currency:tar.gz:null

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  nexus (http://central),
  thirdparty (http://mvnrepo.collings.net:6666/nexus/content/repositories/thirdparty),
  snapshots (http://mvnrepo.collings.net:6666/nexus/content/repositories/snapshots)

Path to dependency:
    1) com.collings.royalty:retardsApeAbility:jar:2.0-SNAPSHOT
    2) com.collings.royalty:royaltyApeAbilityInterface:jar:2.0-SNAPSHOT
    3) net.collings.service.retards:LZRetardsService:jar:1.0.0.6
    4) net.collings.service.retards:LZRetardsServiceTypes:tar.gz:model:1.0.0.6.

12 comments

It builds from either the dos prompt or the cygwin prompt. It even builds using the maven menu.

0

I've tried File | Clear Caches
I've tried re-importing from scratch after a complete removal of the Inteillj config dir in home.  If I use the maven dependency plugin to generate a text file with the dependencies will that help? I'll have to sanitize it of course. By help, I mean will it provide more / enough info?

0

Hi Jim,

So, the problem is that target dependency is not found. Checked that it doesn't present at maven central and, according to the info you provided, it must be at http://mvnrepo.collings.net:6666/nexus/content/repositories/thirdparty. Could you check if it's really there?

Denis

0

Well, as previously mentioned it builds from the command line, it builds from the maven menu, it should be able to find all the references and it would certainly seem that all the repo's are available. Verfied it though. They are there. On top of that, the required items (except those actually being built, of course) should all be in the local repo now since it's been built at least once.

I've been seeing references in other threads regarding maven resolution problems.  From what I've been reading, IntelliJ has trouble with nested components. In our case, it looks like the components are 3 and 4 deep in some places, so perhaps this has something to do with it?  Unfortunately it's a large project with lots of Eclipse users so I can't just re-organize the build.

I have an idea for a work-around. Use m2eclipse and then import as an Eclipse project.

0

denis.zhdanov wrote:

Hi Jim,

So, the problem is that target dependency is not found. Checked that it doesn't present at maven central and, according to the info you provided, it must be at http://mvnrepo.collings.net:6666/nexus/content/repositories/thirdparty. Could you check if it's really there?

Denis


Well my idea for a work-around, i.e. creating an Eclipse project and importing, failed. :-\  I'm going to take another look, pull the logs etc.

0

I'm seeing this in the C:\Users\[userid]\.IntelliJIdea12\system\log\idea.log

at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:374)
        at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:435)
        at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:435)
        at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:435)
        at org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(DefaultArtifactCollector.java:74)
        at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:316)
        at org.jetbrains.maven.embedder.MavenEmbedder.resolveProject(MavenEmbedder.java:210)
        at org.jetbrains.idea.maven.server.embedder.Maven2ServerEmbedderImpl$2.execute(Maven2ServerEmbedderImpl.java:135)
        at org.jetbrains.idea.maven.server.embedder.Maven2ServerEmbedderImpl$2.execute(Maven2ServerEmbedderImpl.java:132)
        at org.jetbrains.idea.maven.server.embedder.Maven2ServerEmbedderImpl$6.run(Maven2ServerEmbedderImpl.java:527)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)

I'm seeing thread dumps too.

hmm.... if recursing the maven structure is the problem, the work-around might be adding them manually which I've never tried.  Also, I note that there is an Early Release version of 13 which I could try.  Will try these and get back with you.

0

None of the above helped. I even added the dependencies manually and IntellJ still could not find them. :-(

0

What do you mean under 'IntellJ still could not find them'? Could you provide a screencast wihch illustrates what you did?

Denis

0

Try to enable File -> Settings -> Maven -> Importing -> "Use maven3 to import project"

0

denis.zhdanov wrote:

What do you mean under 'IntellJ still could not find them'? Could you provide a screencast wihch illustrates what you did?

Denis


Not so much due to draconian security policy.  My intent is to construct a project that is an analog to this one and submit it for analysys. Unfortunately that is likely to take quite awhile due to the other demands on my time.

0

sergey.evdokimov wrote:

Try to enable File -> Settings -> Maven -> Importing -> "Use maven3 to import project"


Hmm.... you would think it would defaut to this if it's set to use maven 3 in the first place but as always, I've verify this if is the case.

0

sergey.evdokimov wrote:

Try to enable File -> Settings -> Maven -> Importing -> "Use maven3 to import project"


Turns out this was indeed the problem. :-|
Can't say I'm happy about the loss of time in this regards. The setting in question is a likely tripping point for someone who has just moved from working on maven 2 projects to a maven 3 project for the first time. Especially since the rest of the team is likely composed of Eclipse users who won't have the problem or users who've been working maven 3 long enough that they've forgotten about it.  Furthermore, it's a setting they've been ignoring for quite some time, if they've been stuck on project teams that stubbornly refuse to upgrade.

Anyway, thank you so very much, to Sergey and everyone else who at least looked at the issue. :-)

Jim C.

0

Please sign in to leave a comment.