Create a war file from a mercurial repository with maven - maven-2

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.

Related

Automate importing new libraries into Artifactory Ivy repository

We are only using the basic feature of Artifactory for Ant-Ivy java projects. If we need new java libraries, we download JARs, craft ivy.xml, then "deploy" the bundle to our internal Artifactory repository. This has been working just fine. However, when we need a set of JARS that need many transitive dependencies, the tasks become very tedious. We don't use Maven and download JARS from Maven central does not provide ivy.xml file. I am wondering if there is an easy way to automate these process?
Thanks
You can try this Artifactory user plugin which generates missing ivy.xml files from .pom files.
Please note that using a user plugin will require the professional version of Artifactory.

Where is GraphDB jar file?

I am trying to use a GraphDB repository from a Maven project using Eclipse Neon with builtin Maven. Where can I find the GraphDB runtime jar file to place in local Maven repository? Why GraphDB is not available from Maven Central?
update I have created a GraphDB repository and it works fine. Now I would like to setup a Maven project in Eclipse Neon to interact with the repository programmatically. GraphDB is not available from Maven central. Developer Hub instructs users to run "MVN Install" to install GraphDB runtime jar into local Maven repository. Since I am using Eclipse Neon with integrated Maven, there is no (I cannot find) MVN executable to run "MVN Install". So my question is what file(s) should I transfer manually to my local Maven repository?
The jar files that you need are the ones that are located in the installed folder of GrpahDB "app/lib". You just add them to the Build Path in eclipse and copy the Java class EmbebbedGraphDB that is in the examples folder.

Jar discovery with IntelliJ

If I have an IntelliJ project (not maven, not gradle, not ant, there is no pom.xml, build.xml...), can I set IntelliJ to find jars in .ivy2, .gradle and .m2 repositories automatically?
It will not work from a local directory on the machine, Maven repository is required, however you can install and use a local Nexus repository. Check this blog post for more details.
You can also use the Library Finder third-party plug-in instead.

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.

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)