simple local repository manager tool for maven - maven

I am using maven to build java projects. I find difficulty in managing artifacts of maven local repository. so, i need a simple tool for managing local repositories of maven.
I seen the apache-archiva and nexus , but those and big tools.
I also searched the internet but i seen only central repository manager tool. I can't find a tool for managing local repository.
I need to know about the artifacts in my local maven reporitory. I don't want to check each folder of my local repository to see what artifacts are installed.
so, please someone tell me about the tools to manage maven local repository.

As far as I know, there are no tools to manage the local repository.
The local repository is more or less just a cache.
Inside a company, you usually set up a Nexus or Artifactory server to manage external and internal artifacts.

Related

what is the difference maven generating artifacts from cache and updates

I would like to know the difference between generating artifacts from and cache and updates.
Does generating artifacts get from remote repository if it is not available in local repository?
I did not find any relevant posts regarding the same.
I do not know if I understand correctly your question, tell me if I have to delete the answer.
In Maven, there are the remote repositories and the local repository (under .m2 folder the local one).
In the moment you build a project, the dependencies to build that project are downloaded from the remote repositories and saved into the local repository. So the next time you build a project with that dependency there should be no need to download because there is in your local repository.
There are people who say that the cache and the local repository are the same. But for example, if you use Eclipse and if you go into .m2 folder, you can see a .cache folder. There should be a m2e folder. Here Eclipse save indexes to manage the dependencies.

Gradle compatible Maven repository or alternative for local usage

The situation:
We have several apps, which use a library developed by ourselves. All app projects as well as the library are under constant development.
Our goal is to have a local maven repository, which allows us to always build the apps with the latest library version, like all those dependencies listet in the Android-Studio dependency chooser here
We donĀ“t want to use the central maven repository, as it makes our code public.
Is there any chance to have a lokal maven repository which is going to be fully compatible with Android Studio and Gradle or is there any other (easy) alternative?
Yes, you can use a local Maven repository manager, which will let you maintain a set of private artifacts for your organization. There's some documentation here: http://maven.apache.org/repository-management.html but the brief explanation is that you can set up a repository that's similar to Maven Central except it's private. There are various repository manager software packages, including Apache Archiva, Artifactory, and Sonatype Nexus.

How to move artifacts from a repository to another repository?

My project now getting artifacts from the Central Repository. Now I created new Artifact repository and want my project getting artifacts from that. How can I download all artifacts from previous central repository to new created repository?
Maven repository managers Nexus, Artfactory, Archiva are not designed to mirror the content of remote repositories. They cache any files retrieved by users, and this improves build efficiency and insulates you against network outages.
Like any cache the challenge is keeping up to date. What all the Maven repository managers do is download an incremental index of the remote content, enabling users to search for files and see new releases, without downloading everything. (In 2011 Maven Central was estimated at 350GB, source)
So in conclusion, just setup you Maven repository, point your build at it and the artifacts from Maven Central will be downloaded automatically.
Additional note:
It's worth looking at the capabilities of your repository manager. They may have additional non-standard features. For example Nexus Professional has a smart proxy feature for keeping hosted repositories synced, although I don't know if this will work with Maven Central

github and maven for java collaboration

New maven and relatively new to java...
I would like to collaborate on a project in java with fellow classmates. I would like to manage the build with maven and software configuration with github. After reading a bit about it I have the following impression:
Using the two together is simply a matter of pointing a github repository at my local maven project folder. All builds and dependencies will be handled locally with source changes being committed per the strictures of github. The situation becomes more complicated if I wish for github to do something other than configuration, such as hosting the project as a maven repository.
Is my understanding of the situation correct?
You are best advised to only use github for managing source code. Consider installing a dedicated repository manager like one of the following for sharing binaries:
Nexus
Aritfactory
Archiva
A repository manager is also useful for caching artifacts downloaded from 3rd party repositories like Maven Central. I find it an essential component of my ALM infrastructure.
Update
There was a recent Sonatype blog posting called "Wait... You don't have a repository manager?" which gives some explanation as to why people won't use a repository manager.

How to enable inside glassfish access to maven repository?

I have a following problem. We have a central maven repository hosted on our company server. Our team is working on a project. Everyone here uses that repository to get the required artifacts. If something is missing at the moment and is required for the task that the developer is currently dealing with, he installs this artifact manually to the central repository, so that his commits don't break the automated builds.
Now, each developer also has Glassfish v2 installed on his machine. That is for testing and debugging purposes. Before committing the changes, developer makes the .ear for the project with Maven help. However, after the developer deploys the ear to it's local glassfish, frequent errors arise, because the set of glassfish libraries may not contain all the latest dependencies of the central company repository.
Right now in case of the error the developer simply reads the log and looks what exactly is missing. After that he manually copies the required jar inside his local $GLASSFISH_HOME$/lib dir. But that seems a little bit frustrating. How can this be done automatically?
Right now we are trying to implement the following solution. The developer has to synchronize his local maven repository gathering all the artifacts from the central one that are required by the project. This local repository has to be placed on the java classpath, so that glassfish would also see it. Is that a correct approach? Maybe there is a way to install directly all the required artifacts from the central repository inside $GLASSFISH_HOME$/dir and this can be done automatically during deploy?
About having to install dependencies. If the developers need to install dependencies missing from public maven repositories, take into account that usually maven proxies have the ability to cache public repos. For instance, archiva has a proxying cache. If the dependencies are your own project deliverables you should consider releasing and deploying with maven to your company repo.
About latest versions. You need to specify maven what version of dependencies should use. I would prefer editing my poms manually, anyway there's a variety of ways to achieve that.
The libraries should be part of the project, I think. If not standard libraries of glassfish, they should be included, for instance, in your war file as part of your project. If not standard but not part of your project (not the regular approach) consider managing this glassfish as a project on its own (own git/svn repo, own pom, own versions, own everything).
Good luck.

Resources