Use of maven with artifactory and jenkins - maven

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!

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

Create maven repository on server

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.

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.

maven m2e proxy connection issues with PAC, in Eclipse; How to Debug?

I got the Eclipse EE and realized it did not have maven/m2e, so I got m2e installed.
Then I am setting up projects and using pom.xml I start getting all the fun errors like:
Could not calculate build plan: Plugin....,
__ or one of it's dependencies could not be resolved: Failed to read artifact descriptor for ....,
Failure to transfer .....
Since I'm in a corporate environment, I find the IE setting and go find the PAC ( proxy auto-configuration ) script.
Then I enter those values into a in my settings.xml area.
I even tried some of the ideas shared by developers, such as deleting .lastupdated files and deleting directories.
Even though it totally defeats the whole idea of maven, I'm considering transfering all my .jar & .pom files from another machine's repository.
No joy yet. Something is still wrong, I just don't know what yet.
I seriously need some debugging or logging or a ping test, if there is anything available to discover what the problem is.
I found some great posts on Maven and Proxy. keywords: maven, m2e, 'failed to transfer', pom.xml, settings, proxy, etc.
also
Cannot download maven dependencies through proxy
http://jira.codehaus.org/browse/MNG-5237
after reading this, and not knowing if my company was using NTLM, I put in the wagon lightweight jar and referred to it with in pom.xml
How will I know, If I do end up needing this ?? and
where should I put the .jar file ? in the user repository area, or deep in the maven runtime \jars\ directory ?
Along the way, some questions also came up.
( for reference, I am on WinXP )
With an m2e only, do I need a $M2_HOME defined ? I'm thinking not, since I don't know where that would be.
related: With m2e, will I ever have a global settings.xml ?
Should the ${user.home}.m2/repository be referenced (and uncommented) in the local settings.xml ?
As a substitute for the command line maven, can Eclise 'Run Configurations' really be a full replacement ?
I know the dialog box you use, has the empty list of goals, when it should be populated, but you can always type in
What about using 'mvn -X'
Or any of the other cool maven commands, like the one that shows you all the transitive dependencies.
Still searching, but Thanks In Advance for anyone who can assist in resolving these Proxy issues.

Resources