How to migrate an old JCR file system repository to mongodb repository? - jcr

How have a very old JCR (Jackrabbit) local file system repository, but the repository does not have a repository.xml (I do not know why). For this reason I cannot use the official command line tool, what can I do? Can I build the repository.xml manually? If yes, how?

Related

how to upload multiple artifacts in nexus2 using script

Can someone provide an example on how to upload multiple artifacts (3rd party JARs) to a Nexus 2 repository? I understand that we can use Maven cmd line to upload using the
mvn deploy:deploy-file goal. But I did not understand it. Please explain with an example or with sample script on how it actually works. Thanks.
This script was written for Nexus Repository 3 but can likely be altered easily for Nexus Repository 2.
https://github.com/DarthHater/nexus-repository-import-scripts/blob/master/mavenimport.sh
This uses curl to do so with a bunch of Maven artifacts. Might be a bit simpler for you.

How to copy/clone a maven2 repository server

I want to create a local maven2 repository so we can download dependencies faster.
we use sbt
what is the simplest way to take all or some depedencies from http://oss.sonatype.org/content/repositories/releases and put it in our server
I was thinking of a script to download some jars and put it in a sftp server and use sftp resolver with sbt
https://github.com/harrah/xsbt/wiki/Resolvers
A pretty simple way would be to install a repository manager. A popular one is Sonatype Nexus (the application that serves http://oss.sonatype.org). The repository manager is installed on your server, and set up to proxy online Maven repositories. Then you download your dependencies from the repository manager as though it was the actual server. The first time you download a dependency, it'll be as slow as before (the proxy will download it from the internet), but after that, it'll serve its cached copy. There are some details on this question.

Is there any free online maven repository?

Is there any free online private maven2 or maven3 repository? So that team can access the repository from various region.
If you use github, you could use a private github project as your maven repository. There are instruction on how to publish your maven artifacts to github here: https://stackoverflow.com/a/14013645/82156
we can use dropbox for online maven repository. But it is not completely private. you can use it if it gives you enough privacy.
This is the instruction to create free maven online maven repository on dropbox
Create an account on dropbox
Download and install dropbox client
After you install dropbox client, A folder called "Dropbox" will create in Users folder. There is a public folder in it. Create a sub folder in public folder and copy the url of that sub folder(ex: C:\Users\Lakshman\Dropbox\Public\repository)
Execute the following command to deploy the project artifacts to this path
mvn deploy -DskipTests=true -DaltDeploymentRepository=dropbox::default::file:///C:/Users/Lakshman/Dropbox/Public/repository
you can use this in your pom file to the above task
<distributionManagement>
<repository>
<id>dropbox.repo</id>
<url>file:///C:/Users/Lakshman/Dropbox/Public/repository</url>
</repository>
</distributionManagement>
if you have sync your local folder with dropbox it will automatically upload artifacts to online repository. you can get the link by login to Dropbox and go to public folder and click copy public link.
This solution got from here and referenced this also.
I just found a free repo for personal projects. Might not be suitable for team work and/or professional use though. Note that it seems to be from Russia. I am not connected in any kind to that project so I have no idea about the privacy of the data posted there. But it seems to work ok.
https://mymavenrepo.com
I have not tried but there is also
https://bintray.com/
This one might have a better reputation :)
We use https://repsy.io in one of our project. It's straight simple and convenient with 1GB free limit.
Update: GitHub launches the Package feature in Beta which supports the Maven: https://github.com/features/package-registry
Update: the Deveo has been acquired by Perforce, see this link
As of September 12, Deveo is now Helix TeamHub. The new name and branding represent our new, integrated solution from Deveo and Perforce.
Helix TeamHub can be hosted in our cloud or on your own servers with Helix TeamHub Enterprise, powered by Helix4Git.
Have you tried Deveo, I am using this cloud service and has 1G storage for free. You can deploy the Maven repository on it.
New features in Deveo 3.17
Pull requests between repositories
Maven and Ivy repositories
Deadlines for issues
Emojis
I recently wrote a lightweight Google App-Engine application to host my private repositories, backed by Google Cloud Storage (which is multi-regional per default):
https://github.com/renaudcerrato/appengine-maven-repository
Thanks to Google App-Engine free quotas, and depending on the scale needed, you won't have to pay anything.
For this purpose you could use a SVN repository. Some of them are available for private usage for free. Take a look on Maven: Commit single artifact to svn repository

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.

maven build with remote pom.xml

I would like to know weather there is a way/plugin to build a project with maven using a remote pom.xml(http://host:port/pom.xml) with out a pom.xml file in the directory where I run "mvn install".
I need this as I want to effect maven dependencies of multiple clients by making changes to one remote file hosted at (http://host:port/pom.xml).
I am not aware of a way to do this. Generally, if you are doing development with multiple developers, you should be using source control. For example, if you are using subversion, you would just make changes to the pom, commit, and the other developers can update.
Of course using a version control is absolutely necessary...It would quite helpfull to use a Maven Repository Manager to interchange the artifacts with each other simply by deploying the artifacts to a central Repository Manager in your company and furthermore it will increase the build time.
If you are on Windows, you can try mapping the remote location (possibly a network share or an FTP location) to a local drive, and then executing the maven command in your console for the mapped location. It should work.
Else, you can distribute the pom.xml file via an email and ask the users to use it as their project file.
The other option is to use a Version Control System (VCS) such as Mercurial and keeping your pom.xml stored in the repository and make it accessible for the users to checkout. So far, this is the best way to make sure everyone is using the same file.