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.
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
As shown in the screenshot there is a dependency of the dl4j-0.4-examples project that is unable to be loaded by intellij.
Unable to get dependency information: Unable to read the metadata file
for artifact 'com.github.jai-imageio-core.jar': Invalid JDK version in
profile "java8-and-higher': Unbounded range [1.8
A similar problem resolved in this question
https://github.com/google/gson/issues/596
as quick fix open the pom file at your local repository and add ')'
and should looks like
91 [1.8,)
save and execute again
But in this case there is no jdk tag: so that approach can not be used.
Has anyone found a workaround to load this project into intellij?
The owners of the project have recognized this as an issue. If you would like to follow along here is the bug tracker:
https://github.com/deeplearning4j/dl4j-0.4-examples/issues/76
Update 2/28/16: The resolution: I needed to do
brew switch maven 3.3.9
There were multiple versions of maven installed on my machine but I did not know about brew switch. So some ways maven was working without doing the switch - but for this project a completely clean maven installation was required.
IntelliJ downloaded the dependencies listed in my build.gradle file and they show up in the External Library, but IntelliJ fails to find them during compile. It just throws a bunch of "package x does not exist" and "cannot resolve symbol". Under the Project Structure -> Modules -> Dependencies they all show up and are listed as compile.
If I try to build it with Gradle it's successful, so it's just IntelliJ. Any ideas?
If it's important, I'm using this on a Mac.
Found the answer. IntelliJ was treating Main and Test as modules with no dependency related to the project itself and all of the library dependencies were stored at the project level.
I killed off Main and Test as modules and it sorted itself out.
I am facing the following problem. I have two Gradle projects (ProjectA and ProjectB) on the same hierarchy without any root project. Since ProjectA depends on ProjectB, I tried to model this as follows:
ProjectA's settings.gradle:
includeFlat 'ProjectB'
ProjectA's build.gradle:
dependencies {
compile project(':ProjectB')
}
However, then I am getting the following error when executing 'gradle build' on ProjectA:
* What went wrong:
A problem occurred evaluating root project 'ProjectA'.
> Could not resolve all dependencies for configuration ':compile'.
> Module version group:, module:ProjectA, version:0.0.1-SNAPSHOT, configuration:compile declares a dependency on configuration 'default' which is not declared in the module descriptor for group:ProjectA, module:ProjectB, version:unspecified
Do I have to define some kind of default configuration in ProjectB?
Do I have do defined some kind of default configuration in ProjectB?
Either that, or apply the base plugin. Many other plugins (java, groovy, scala, etc.) apply the base plugin automatically, so that you don't have to.
I get a missing artifact error during Maven build because one of the dependencies declares it's parent artifact using a property for the version. Now the property itself is declared in the parent pom and my project's build fails giving this error:
[ERROR] Failed to execute goal on project abc: Unable to get dependency
information for xyz:pqr:jar:SNAPSHOT: Failed to process POM for
xyz:pqr:jar:SNAPSHOT: Non-resolvable parent POM xyz:pqr-parent:${someversion}
for xyz:pqr:${someversion}: Failed to resolve POM for
xyz:pqr-parent:${someversion} due to Missing:
----------
1) xyz:pqr-parent:pom:${someversion}
----------
1 required artifact is missing.
for artifact:
xyz:pqr-parent:pom:${someversion}
I have verified that the artifacts are present in correct location in the repository.
Is there a way to specify the value of someversion property used in the dependency pom?
If not, how should the dependency pom be changed to resolve the error?
I get a missing artifact error during Maven build because one of the dependencies declares it's parent artifact using a property for the version. Now the property itself is declared in the parent pom and my project's build fails giving this error (...)
This is a chicken and egg problem: you can't get the version of the parent to use from the parent.
Is there a way to specify the value of someversion property used in the dependency pom?
AFAIK, this is not possible, properties in project.parent.version do NOT get substituted. You might want to check MNG-624 (and vote for it) and related issues.
If not, how should the dependency pom be changed to resolve the error?
Use an "hard-coded" version in project.parent.version.