Create maven repository on server - maven

I created maven repository as described here, but I need to set up maven repository on our companie's server. I am stuck at step 7 of the tutorial. I do not have a .m2 folder on server. Where do I create this server? Do I have to make maven project for the directory to appear?
P.S. It is my first day with maven, so be gentle. Any help would be appreciated :)

Artifactory come with all the setup you need to use it as Maven repository.
You just install it, run it, and you're done. Take a look at one minute setup screencast.

Related

GeoServer Maven Build Plugin AuthKey Authentication

Key Authentication plugin is not available for GeoServer 2.15.2. I need to use this plugin and I would like to get an insight on how to use Maven to do so.
I wonder if I should download the GeoServer#2.15.2 codebase from the GitHub repository and start from that point or if I should download the war file and deploy it and start from this point. I have never used Maven before, and I would like to know if I should run the command to build the plugin authkey from a specific directory in the project directory tree.
I decided migrating geoserver to the stable version and it was the best solution.

Unable to browse artifacts on Nexus Repository ManagerOSS 3.3.0-01

I have created a maven plugin, this is dependent on a series of JARS. i have uploaded these JARs and poms to the relevant location on the server under nexus-data/blobs/maven-thirdparty/{group-id}.
when i run a task to "Rebuild Maven repository metadata" and "Rebuild repository index" these files does not appear when i try and browse the files http://{nexus-server}:port/#browse/browse/assets.
How can i have nexus server recognize the files in the repository?
i will look to that in future. I posted this same question to Sonatype forum and they assisted me with a utility that assists with this and it worked perfectly.
https://github.com/simpligility/maven-repository-tools/tree/master/maven-repository-provisioner
Thanks to Peter Lynch - https://support.sonatype.com/hc/en-us/articles/236210187-How-do-I-export-import-a-Maven-2-format-repository-over-HTTP-
What you are trying to do will not work, although it did in Nexus Repo 2. There currently is no mechanism for adding jars in to the blobstore in this way. We've intentionally added the blobstore and all that goes along with it so that we can do more fun things with searching, metadata, etc... that were much more difficult with a system that just has files on a path. What I might suggest instead is using something like this:
Nexus Exchange - Nexus Repository Import Scripts
GitHub Repo for Scripts
That should help you get the JARs into Nexus Repository 3, into a repo of your choice. I maintain that repo, so if you run into issues, create an issue and I'll see what I can do to help you out! ~Sonatype Community Nerd

Use of maven with artifactory and jenkins

I am very new to maven, artifactory and jenkins as well. I made a directory 'repository' under path /home/apache-maven-3.2.1/.m2/repository. I am trying to deploy a jar through artifactory UI into this directory. Please suggest some configuration so that i can do this. Jars which i deployed already were deployed successfully but when I see inside repository, there is nothing in it.
One other question is how to set dependencies while deploying any artifacts?
These questions may be silly because i don't know anything about the above three tools and i am unable to set relation between them also.
Thanks in advance.
I'm also quite new to maven and still struggling with it, but the thing to do is try to configure a pom.xml file with your settings. Since you didn't give any indication on how the jar file has to be build, you got to find a guide in order to do it.
Useful links:
https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
https://www.tutorialspoint.com/maven/maven_pom.htm
Hope this can help!

Maven - Download Files/Folders

I am searching for a Maven plug-in that would help me download project artifacts. For example, I've a remote location, with the following directory structure:
Directory-A
Directory-B
artifact1.jar
artifact2.jar
Directory-C
artifact3.jar
artifact4.jar
All I want to do is when I specify Directory-A/Directory-B, it creates the structure locally and downloads all the artifacts from the remote location to the local structure.
Is that possible in Maven? The closest that I got is via maven-download-plugin, as suggested in this SO answer. However, this plugin lets me download individual artifacts (or as far as I understood from the usage documentation).
Thoughts, ideas? Any help would be really appreciated.

How to extract all the dependencies from a Maven project for standalone offline building?

I know that I am not the only person that might need to send a Maven project to someone that doesn't have access to my private remote repository and only needs to build the project in a stand alone fashion.
In my case I need to send my Mavenized project to a customer that doesn't have access to our internal Archiva instance where we host all of our dependencies.
How can I create a stand alone Maven project with all the dependencies to build the project in a stand alone fashion?
NOTE: I don't want to just export the dependencies, I need an automated way to add them to the stand alone local repository as well.
You should be able to configure settings to use
< localRepository >${some.location.in.your project}< /localRepository >
This describes how to configure settings. After that you run online build and package your project with repository. Unpack and you should be able to build in offline mode.
see dependency plugin.
http://maven.apache.org/plugins/maven-dependency-plugin/go-offline-mojo.html
This can help you to download all internet :-)
run this goal with -Dmaven.repo.local=path to where you want everything.

Resources