I have install maven and JDK and tried to create maven project and add some dependencies, as you can see in the screenshot but the dependency is not downloading so I can not import. can you help.
That's because you are using dependencyManagement, where you only specify dependency meta-information, but not the actual dependencies.
More details about managing dependencies via Maven you can find here:
maven dependency mechanism
maven dependency management
Change the version of guice to 4.1.0
What it seems like there is no 4.1
https://mvnrepository.com/artifact/com.google.inject/guice
Related
To resolve issue of dependencies, maven is one of the solution. But maven does not include latest version.
Question:
1) Is there any solution for solving dependency issue other than maven?
2) How can i get latest version in maven?
Thanks to all
I guess you want to include a latest version of a dependency, If that is the case you can use,
Maven tag
<version>LATEST</version>
or
<version>[1.0.0,)</version>
this will get the highest dependency version available grater than 1.0.0.
And note <version>LATEST</version> does not work for maven versions 3.x.
If we are talking about transitive dependencies maven uses dependency which is placed nearest to root.
For example:
A depends on B, B depends on C(v 1.1)
A directly depends on C(1.0).
In that situation, C(1.0) will be included in the application classpath.
More info here and here.
Hope, it will help.
I have created a library and exported it as a jar. The library has a couple of dependencies as AspectJ and springfox. Every time an application adds this as a dependency in pom.xml, it has to add dependencies as SpringFox and Aspectj as well into its pom.xml.
Is there an option in Maven through which we can avoid this step of adding these dependencies?
No need for any option. If the pom.xml of your library references AspectJ and springfox, then these are inherited by all projects that use your library.
I have a bit of a thorny maven dependency problem. A plugin in a parent pom.xml requires guava v10 and a dependency in the module I'm trying to build requires guava v18. Not exactly sure how to proceed as both are needed but maven resolves in favor of v10, which crashes the dependency at runtime. I tried skipping the plugin as outlined here (although I'm not sure if it's a good idea), but that didn't help. How do I dig my way out of this?
Please reference to this post and try to use exclusion to exclude the guava version you don't want to use
I have a standard spring-boot project with org.springframework.boot:spring-boot-gradle-plugin. i know i can override dependency version with e.g.
ext['slf4j.version'] = '1.7.5'
but how can i get the version currently imported by spring-boot plugin so i can use it later in the script? for example:
currentSlf4jVersion = xxx('slf4j.version')
The dependency management plugin that Spring Boot's plugin applies for you provides programmatic access to the properties in imported boms.
You can get the value of the slf4j.version property like this:
dependencyManagement.importedProperties['slf4j.version']
You can find your gradle project dependencies using command
gradle dependencies
For All:
gradle listAllDependencies
For sub-project:
gradle :<subproject>:dependencies
This will output dependencies
Hi I am following the directions in https://github.com/socrata/soda-android-sdk to include the android-soda-client as a gradle/maven dependency in my build.gradle, but the dependency is not resolved. I looked in the Maven Repository for com.socrata and didnt see the dependency in there either. Does this mean that the library has to be built from source for each Android app?