remote repository deployments - maven-2

When I was deploying local repository files to nexus repository wso2-carbon files did not deployed on nexus repository though there wasn't any error.I want to why that happens and how can I solve that issue .

Related

Change artifact Storage on Apache archiva repository

I have installed an local copy of archiva in my local machine. When i upload artifact or "mvn deploy" artifact to store artifacts - it uses my local system to store files. I want to store artifacts with my dreamObjects cloud account with amazon s3 filesystem. And when ever needed the artifact should download from there. I need some Idea how i can implement that. I already have tested filesystem using s3 into dreamobject. Need the clue where i should work on archiva.

Setup a shared ivy repository

I am setting up an ant build system on a project with dependency resolution being managed by ivy. I have it up and running with the file system being used for the local and shared repository currently. My ultimate goal would be that when developers are fixing bugs or creating new functionality, they would only be able to put artifacts into their local repository. When they belive their code is ready to be used by the rest of the team, it would be promoted to the proper branch in SVN and the group in charge of doing official builds would compile and publish the new artifacts.
So I guess my questions are how can you control who can publish to a repository? Does ivy just rely on filesystem permissions?
Also, I would eventually like to make my shared repository available via http. I think I could point apache to the file system repository directories for retrieving artifacts, but how do you setup publishing to an http repository?
I would suggest that you setup a repository manager to manage your project's build artifacts.
The best choices are one of the following:
nexus
artifactory
archiva
Publishing to a Maven repository means that your artifacts can be consumed by projects using other build technologies. All modern build systems support Maven (Including ivy, see the ibiblio resolver).
You could specify three resolvers in your ivy settings file. First would be a chain resolver which include remote and local ivy repositories. Second would be a local resolver for local ivy repository. Third a resolver to remote ivy repository only.
Every developer retrieves artifacts using first chain resolver.
Usual developer publish artifacts using second local resolver.
Your special team could use third remote resolver to publish in remoter ivy repository.
To protect remote repository from usual developers place it on (S)FTP server with write protection by password.
The only problem in this case is how to set versions on artifacts so that artifacts published in remote repository in some cases override locally published in some not.
Our team used such scheme few years ago. But now we use only local ivy repositories and CI server to build and run tests from various branches. We came up to this after switching to git.
for existing ivy repo easy to setup this: rest-ivy

SVN Backed Maven Repo

We are using SVN as a Maven Repositary. We knew that it isn't advisable to have SVN backed maven repository, but still we have to go with it due to limitation within our organization. SVN backed repository used currently is partially implemented.We have developers working from two different geographical location. Problem we face now is whenever a developer adds a artifact to maven repo(svn repository) all other developers have to update the local svn view manually to get the newly added artifact before we do mvn clean package.
IS there a way to automatically download the artifact from svn maven repository to local repo if the artifact doesn't exists locally?
SVN is hosted with a webserver so maven repositary is accessed using HTTPS protocol only. We use maven 2.2 version.
I tried with wagon plugin which would deploy the build output(jar\war) to scm directly. We are not interested in deploying the build outputs. We need a solution to download artifacts automatically from svn maven repo if it isn't exists locally?
You make no mention of how your SVN repository exposes it's artifacts to the development teams. If it truly a Maven repository (conforming to the standard Maven repository layout) then you could just specify it's URL in the "repositories" section of your POM. Updating the local repo would then no longer be necessary.
I suspect that what you have checked into subversion is not a Maven repository layout? You'd lose one of the key benefits of using subversion if each new version of an artifact was being checked in as a new file....
You are describing the functionality offered by any Maven repository manager, for example: Nexus.
I understand your reluctance to embrace a new repository technology, but SCM systems like subversion are primarily designed for tracking changes to textual files.
In conclusion, if you truly wish to keep subversion in the loop I'd suggest one of two options:
Use subversion to control the contents of the local repository. (3rd party dependencies and the artifacts generated by the developers)
Use a repository manager like Nexus. Let Nexus manage cached content from external repositories, but commit the contents of locally hosted repositories into Subversion.

Create a war file from a mercurial repository with maven

I have a mercurial repository on my server.
I want to create a script to deploy the project as a war file to a tomcat server.
Is it possible to tell maven to get the latest revision of my project from the repository
and create a war file.
Thanks
You can use Maven SCM plugin, which has suport for multiple version control systems including Mercurial.

Automating upload of artifacts in Nexus using Maven

Am trying to automate the process of uploading an artifact generated by Maven into a Nexus hosted repository (like a maven goal, which will upload the generated jar into a specified repository in Nexus). Is this possible? In the Nexus docs they have talked only about manual uploading.
I also looked at the nexus maven plugins and nothing like this is specified.
Thanks in advance
You have to use mvn deploy to deploy your artifacts via WebDAV (declare the Nexus DAV URL in the distributionManagement section).
See also
Getting started with Nexus Maven Repo Manager
13.3. Configuring Maven for Site Deployment (this link if for site deployment but it's similar)