In our project we are using ant for building the system and now we want to add dependency management to our system. I already learn that we can use ivy for this. But in future, we want to change the system into maven. But for now, we just want to handle the dependency problem. Is it possible to use maven just for dependency management and build for ant?
Related
Here I read about how to make a Groovy library .jar ... i.e. pretty much the same as making a Groovy (standalone) project. But I'm not clear what you do then with the resultant .jar...
Say I have two Eclipse "proper"/"standalone" projects (I'm using Groovy for everything) and I want them to share a third Gradle library project of mine as a dependency, which is merely a library of classes... how are my standalone projects expected to find the latest .jar version of the library which they're both using...?
My expectation would be that somehow these versions of the library .jar would have to under GRADLE_USER_HOME (i.e. same location as all other dependency .jars).
Then I would assume that in the build.gradle of both standalone projects you'd have a line like
compile 'mylibrary:mylibrarymodule:3.+'
... of course the first part of these compile directives normally involves a "domain name in reverse" ... and this is normally used by a repository like Maven. How does it work with something which doesn't need to be published?
NB at the time of writing I don't have a Maven account as such and have no idea whether "publication" for re-use of a local common library project like this is essential or not.
Naturally, when I distribute versions of my standalone projects they will need to be packaged up with the library .jar in question.
A link to a how-to for a case like this would be more than welcome: I haven't found it under gradle.org.
If you are developing by yourself, you can use maven-publish plugin to publish your artifacts to local maven repository(you don't have to install maven for this) and on your dependent project you can simply say use mavenLocal repository for dependencies.
If you are on a company, I suggest installing a repository manager and deploy your artifacts to this repository so others can use. You can use their respective plugins to deploy easily. (Gradle Artifactory Plugin, Gradle Nexus Plugin, these are just deployment plugins, you have to setup respository manager to. There are other repository management tools also.) Doing the above process from CI server is the preferred way.
To use latest version of a dependency, you can use Gradle Versions Plugin. If the versioning happen often, using snapshot versions also a possibility.
I have a legacy JAVA project and we use Ant to build it. We are planning to keep using ant for building the project but delegate the dependency management to maven/gradle without affecting the existing build process.
What might be the best way to move forward - with Maven or with gradle?
Since existing project has it's own structure(which may not conform to standard Maven archtypes), I know might have to make a custom archtype if using maven.
https://stackoverflow.com/a/48791837/2458858 provides one way to solve it but I am trying to find a standard solution in which I am able to delegate dependency management within the same project rather than a separate project.
Currently we are using Maven for build purpose. For dependency management, I know Apache Ivy is best (correct me if I am wrong). But it is completly dependent on Ant.But we are not using Ant in my application. Can I use IVY without Ant? Please provide the best approach in this scenario for dependency management?
I am using the hector & astyanax projects. These projects used to require maven, and now astyanax requires gradle.
I would like to statically link one of these projects to my java project (which is not built using maven/gradle). I am not interested in updating the version of astyanax every time they make a new release. I am not interested in mavenizing/gradelizing my own project.
So, two problems arise: 1. Getting the astyanax jars. 2. Getting the depenedency Jars.
At first, not having time to thoroughly understand maven (get off my lawn!), I copied all of the jar files in my global .maven directory into my project, and linked to them. Problem is, it's a pretty messy solution.
Is there an easier way to get all jars needed to use a gradle/maven library? (While I don't mind using gradle to build astyanax, I don't want to use it to build my own project).
Getting jars for distribution, seems like a very basic use case, am I missing a simple way here?
astyanax is published to maven central as com.netflix.astyanax:astyanax:1.56.42. Any build tool (Grails, Maven, Gradle, Buildr, SBT) that resolves from Maven can make a dependency on Astyanax and have its dependencies transitively downloaded. That fact that it's built with Gradle doesn't change how it's consumed.
From your question, it's unclear how you want to resolve these libraries. If you don't want to use a tool (Grails, Maven, Gradle, Buildr, SBT), then you'll have to manually navigate every dependencies and its dependencies from Maven Central. It's quite uncommon for a modern java project to manually download dependencies anymore, the practicalness given the complex dependencies graph make it prohibitive.
I am trying to build multiple Maven libraries out of the same source control. I do not have a strong business need for versioning as the only requirement I have is simply that when a library or application is built, all the in-house Maven libraries it relies on are using the same source version.
I am using buildnumber-maven-plugin to obtain the source version as ${buildNumber} in Maven. However it is illegal to append this to the Maven version coordinate (which would have solved my problem). I am wondering if there is another way to expose this in a Maven project then check it in a client (i.e. dependee) project.