Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
422 views
in Technique[技术] by (71.8m points)

java - The POM for <name> is invalid, transitive dependencies (if any) will not be available

This question is outdated and no longer relevant. I have since moved to Gradle for my project build and can no longer verify that answers do or do not work.

I've run into a few issues with Maven. Let me first describe my project setup:

Framework
|  -- Apache Commons Math 3.0
|  -- Bouncy Castle 1.5
|  -- etc.. (lots more)
|________
|        Client
|        | -- GUI libraries
|        | -- etc.
|
|________
         Server
         | -- Server Libraries
         | -- etc.

So essentially I have a framework that contains most dependancies and then two projects, "Server" and "Client" that contain their own BUT also the framework as a dependancy (being a module of Framework.). I installed the Framework project into my local repository and both my projects can see the Framework-Native code (aka my own logic). HOWEVER they don't seem to be able to use any of the dependancies of the Framework Project. When trying to build either of the "child"-projects I get this:

Invalid POM for de.r2soft.empires.framework:Framework:jar:Alpha-1.2, 
transitive dependencies (if any) will not be available, 
enable debug logging for more details 

I've tried to find the reason behind this (or better yet a solution) but haven't found anything that fixed my issues. Hope someone here can help. My maven version seems to be 3.2.1 (that's what -version tells me anyways)

Here are my framework-pom.xml and the client-pom.xml on pastebin:

Framework: http://pastebin.com/cceZECaT

Client: http://pastebin.com/1Cuxve5F

Help is appreciated.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

One reason for this is when you rely on a project for which the parent pom is outdated. This often happens if you are updating the parent pom without installing/deploying it.

To see if this is the case, just run with mvn dependency:tree -X and search for the exact error. It will mention it misses things you know are in the parent pom, not in the artifact you depend on (e.g. a jar version).

The fix is pretty simple: install the parent pom using mvn install -N and re-try


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...