Why Nexus renames my artifacts? - maven

Hello I have module with name desc-editor, and it is contains submodules:
desc-editor-server
desc-editor-vaadin
desc-editor-local
I'm using Gradle 1.8. When I execute gradle install it makes folders with jars in local maven repository with names I provider above. But when I make upload to Nexus repo it renames artifacts to server, vaadin and local respectively.

Related

How to download selective dependencies using Maven from JFrog Artifactory?

I have a simple Maven project and its pom.xml has some dependencies to some local jar files inside the project structure. Now I want to upload those local jar files in JFrog Artifactory and change the pom in such a way so as to use selective dependencies from Artifactory and rest of the Pom files remains the same like it was(which includes some spring boot, Junit, surefire dependencies etc etc). How can I alter the pom file so that I can selectively download those jars from Artifactory rather than from my local machine.
I uploaded the local jars in a folder in Artifactory but unable to configure my pom/maven to download those during clean install. I tried as per the documentation in Jfrog to modify the settings.xml and include the server tag and aslo added distribution management in pom.xl to refer to the Jfrog Artifactory. But this is for all the dependencies no? I want selective dependencies to be downloaded from Artifactory.

Maven pom to zip config files from GitHub and jars from artifactory

Requirement:
Need to push config files and jars from artifactory to UCD for deployment.
Config files are present in GitHub repostiory.
Jars (not needed for build but needed to start application in UCD) are present in artifactory.
What would be the general process to follow, in order to copy config files from github and download/copy jars from artifactory and package everything in a zip file to push to UCD?
You might consider:
the maven download plugin to get the files you need from an URL (like a GitHub repository or an Artifactory one)
the maven assembly plugin to build your archive
configuring on UCD side the source of your Nexus package to deploy, although there is a urbancode plugin maven-ibmucd which could be handy (not tested)

What is meant by local repository and remote repository in Maven?

I am reading up Maven - The complete reference and came across this
Maven assumes that the parent POM is available from the local repository, or available in the parent directory (../pom.xml) of the current project. If neither location is valid this default behavior may be overridden via the relativePath element.
What exactly is meant by local and remote repository for a Maven installation and a project?
A local repository is a local directory structure that caches artifacts downloaded from remote repositories, or those that are manually installed (eg from the command line option).
A remote repository is a web service (defined by a URL) that contains versioned artifacts. This might be as simple as an Apache server, or a full-blown Maven repository, such as Artifactory, that allows uploading, permissions based on a user directory, etc.
http://maven.apache.org/guides/introduction/introduction-to-repositories.html
By default, Maven will source dependencies from, and install dependencies to, your local .m2 repository. This is a precedence rule, and your .m2 acts like a cache where Maven can source dependencies before downloading them remotely. You can bypass this behaviour like so: mvn -U ... (see mvn --help).
Your local .m2 can be found under C:\Users\{user}\.m2 on Windows, or /home/{user}/.m2 on Linux. If you do a mvn install, your project will be locally installed under the said .m2 repository.
A remote repository is a Maven repository, just like your local .m2 repository, hosted for you to source dependencies from, e.g. Maven Central.
Local repository is a repo. Into your local system, when you compile or install project all required dependencies downloaded into your local repo.
When you're working with your project, then Maven first tries to get dependencies from local. If it's not available, then Maven will try to download the dependency from a central repository.
central repo. is a online repo, which is provided by maven itself.

Deploy jboss client jars to local maven repository

I have a local jboss installation on my box and I would like to deploy the jars in the client directory to my local Artifactory server.
Is there are way do it in one single command, or should I deploy each single file individually?
What I don't want:
Using the JBoss nexus maven repository.
Add a proxy to JBoss nexus maven repo from my Artifactory.
Thanks.
Prepare the jar files to be uploaded in a local repository folder layout, like:
repository/org/jboss/logging/jboss-logging-spi/2.2.0-CR1/jboss-logging-spi-2.2.0.CR1.jar
repository/org/jboss/javaee/jboss-javaee/5.0.1.GA/jboss-javaee-5.0.1.GA.jar
Use the pom.xml from here to batch upload them to maven repository by a single command mvn install.
Read my blog post for detail.

Maven private internal repository

I have create a maven local depository using "Artifactory". I want to add project dependencies to this local repository(all dependencies in my local .m2 folder), can I do that with Artifactory?. If can, how can I do it?
The dependencies will be added to Artifactory on the first run of your maven project (they will be fetched from one of the remote repositories Artifactory come preconfigured with).

Resources