I am using artifactory, Eclipse and IvyDE to pull in jar files. I have the following dependency in my ivy.xml
<dependency org="org.apache.activemq" name="activemq-camel" rev="5.9.0.redhat-610379"/>
but I am getting the following IvyDE error
unresolved dependency: org.apache.activemq#activemq-camel;5.9.0.redhat-610379: not found
I can go to artifactory and find the jar file. It gives me the ivy.xml entry needed to pull it but I am getting this error. I was thinking maybe the rev is invalid?
Thanks!
Related
while i am trying to download depedency androidx.test.uiautomator using maven i am seeing a missing artifact error in my pom xml.
anyone faced such issue , can someone enlight me on this issue
dependency in maven https://mvnrepository.com/artifact/androidx.test.uiautomator/uiautomator/2.2.0
Pom XML error
I'm trying to build my project using IntelliJ and gradle. I have a dependency on oozie-client jar.
I defined the dependency in gradle as follows:
dependencies {
compile 'com.yahoo.oozie:oozie-core:3.0.0'
}
when I run buildDependency I get the following error:
* What went wrong:
Could not resolve all dependencies for configuration ':compile'.
Could not resolve com.yahoo.oozie:oozie-core:3.0.0.
Required by:
:TestRunnerFramework:1.0
Could not resolve com.yahoo.oozie:oozie-core:3.0.0.
Could not parse POM http://repo1.maven.org/maven2/com/yahoo/oozie/oozie-core/3.0.0/oozie-core-3.0.0.pom
Could not find any version that matches com.yahoo.oozie:oozie-main:3.0.0.
please advice,
This is either an incorrect POM (or incorrect parent POM), or a POM that Gradle fails to interpret correctly (there are a few known limitations around this). Often, the only solution is to edit the POM, for example in your binary artifact repository. If you think the problem is on Gradle's side, you can file an issue over at http://forums.gradle.org.
After reading this question, I don't understand how we can find the configuration of the dependencies.
More precisely, in the example below, how retrieve the configurations (proxool,oscache) of hibernate ?
<dependency org="hibernate" name="hibernate" rev="2.1.8" conf="default->proxool,oscache"/>
You have to look into hibernate's ivy.xml to see the list of all published configurations. Either you resolve the dependency and take a look into your local cache, or you can view the ivy.xml directly in the repository you are using.
Note: When you resolve from a maven repo there will be some translation/mapping from the POM to the ivy.xml.
I'm trying to go through the examples in Maven: The Definitive Guide. In chapter '4.3. Creating the Simple Weather Project' it has me run the following command.
mvn archetype:create -DgroupId=org.sonatype.mavenbook.ch04 -DartifactId=simple-weather -DpackageName=org.sonatype.mavenbook -Dversion=1.0
I think these errors are a problem.
[WARNING] POM for 'asm:asm-commons:pom:3.2:runtime' is invalid. It will be ignored for artifact resolution. Reason: Failed to validate POM for project asm:asm-commons at Artifact [asm:asm-commons:pom:3.2:runtime]
[WARNING] POM for 'asm:asm-util:pom:3.2:runtime' is invalid. It will be ignored for artifact resolution. Reason: Failed to validate POM for project asm:asm-util at Artifact [asm:asm-util:pom:3.2:runtime]
[WARNING] POM for 'asm:asm-analysis:pom:3.2:runtime' is invalid. It will be ignored for artifact resolution. Reason: Failed to validate POM for project asm:asm-analysis at Artifact [asm:asm-analysis:pom:3.2:runtime]
[WARNING] POM for 'asm:asm-tree:pom:3.2:runtime' is invalid. It will be ignored for artifact resolution. Reason: Failed to validate POM for project asm:asm-tree at Artifact [asm:asm-tree:pom:3.2:runtime]
because later I on get the message this
[INFO] Failed to resolve artifact.
Missing
--------
org.apache.maven.archetype:archetype-catalog:jar:1.0
org.apache.maven.archetype:archetype-common:jar:1.0
org.apache.maven.archetype:archetype-registry:jar:1.0
org.apache.maven.archetype:archetype-descriptor:jar:1.0
I ran the command again with debug on and I've included the output in a pastebin link
mvn archetype:create -DgroupId=org.sonatype.mavenbook.ch04 -DartifactId=simple-weather -DpackageName=org.sonatype.mavenbook -Dversion=1.0 --debug > mvnoutput.txt
http://pastebin.me/e50a3e5fa84cd8e8ff9336b3c3062d7f
I really have no idea why this is failing. I tried to navigate to the POMs manually using the
http://search.maven.org/remotecontent?filepath=asm/asm-commons/3.2/asm-commons-3.2.pom along with the other POMs and they look fine to me (but I'm trying to learn Maven.)
Here is my mvn effective settings. I left out the schema stuff at the very beginning. I am behind a proxy, but everything else seems to download fine. Any help would be much appreciated. I'll answer questions or post more information if you leave them as comments.
<localRepository>C:\Documents and Settings\~removed~\.m2\repository</localRepository>
<proxies>
<proxy>
<active>true</active>
<username>~removed~</username>
<password>~removed~</password>
<host>~removed~</host>
<nonProxyHosts>~removed~</nonProxyHosts>
<id>optional</id>
</proxy>
The most important thing is to start with Maven 3.0.4 instead of Maven 2.0.8. Furthermore you need to use:
mvn archetype:generate
instead of
mvn archetype:create
Take a look into the docs of the archetype plugin.
And one thing i recognized is that you are using an old book: Take a look into "Maven by Example" book and "Maven: The Complete Reference".
Is there a CLI tool I can use to quickly view the transitive dependencies of a Maven pom.xml file?
On the CLI, use mvn dependency:tree
(Here are some additional Usage notes)
When running dependency:tree on multi-module maven project, use mvn compile dependency:tree instead1.
Otherwise, the POM Editor in M2Eclipse (Maven integration for Eclipse) is very good, and it includes a hierarchical dependency view.
1If you don't compile, you might get error Failed to execute goal on project baseproject: Could not resolve dependencies for project com.company:childproject:jar:1.0.0: Could not find artifact. This might happen because dependency:tree command doesn't build projects and doesn't resolve dependencies, and your projects are not installed in maven repository.