Jar discovery with IntelliJ - intellij-idea

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.

Related

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.

JetBrains IDEA download sources for ivy project

i have project with ivy (Apache Nutch), can i automatically download sources code for it's dependencies with Jetbrains IDEA?

Local repository use

While building Maven projects (Spring and jbpm 4.4 to be specific),
I see that the libraries that I already have in Maven local repository, gets downloaded again or the console log suggests so.
Say my local repo already have the commons-collection3.1 in my library, is it necessary to download from the maven repository?
Is there a setting that can let maven know to look in the local repo first?
Thanks,
Ayusman
You might have the updatePolicy for SNAPSHOT repository set to always in your settings.xml. See this guide to settings.xml.
Maven will look in the local repository first by default.
Downloading in Maven is triggered by a project declaring a dependency that is not present in the local repository.
http://maven.apache.org/guides/introduction/introduction-to-repositories.html

How to deploy or package a maven plugin after building a maven-plugin project?

I have done an mvn install for a custom plugin and it gave me a bunch of directories in my target directory along with a jar. I'm stuck with the next step.
How do I bundle it?
Where do I place this?
What about the pom of this plugin?
What configuration changes do I have to make and where?
You can always test it on your local machine. Just run mvn clean install and it will be installed in your local repository. Then in the project you'd like to use it from, just add the plugin to the plugins section and set it up like any other plugin. This should be enough.
If you'll be using it in your company, you'll need to be able to deploy it to a Maven repository such as Nexus or Artifactory in order for other people to be able to download it.
Deploying it is the same as for regular artifacts:
mvn clean deploy

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.