Home computickets Maven in Intellij Idea

Maven in Intellij Idea




Let’s say created I created a project in the Intellij idea environment. After some time I decided that I want to use Maven OM through the development environment so, as if I did creating a Maven project. Are there any ways to connect to the Maven

Answer 1, Authority 100%

To collect the Maven ‘Ohm, you need to add the necessary pom.xml files, well, and the project structure, it is desirable to bring to Maven ‘ .

For example, let your code lies in the My-Project folder. Create POM.XML At the root of this folder:

& lt; project xmlns = "http://maven.apache.org/pom/4.0.0" XMLNS: xsi = "http://www.w3.org/2001/xmlschema-instance" xsi: schemalocation = "http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd /Maven-4.0.0.xsd"&gT;
 & lt; Modelversion & GT; 4.0.0 & lt; / Modelversion & GT;
 & lt; groupid & gt; foo.bar & lt; / groupid & gt;
 & lt; artifactid & gt; my-project & lt; / artifactid & gt;
 & lt; Name & gt; My Fancy Project & Lt; / Name & GT;
 & lt; version & gt; 0.0.1 & lt; / version & gt;
 & lt; Dependencies & gt;
  & lt;! - Here you specify all the necessary dependencies - & gt;
 & lt; / dependencies & gt;
& lt; / Project & gt;

Edit the project structure:

  • java code throw in my-project / src / main / java
  • Resources in My-Project / SRC / MAIN / Resources
  • test code in My-Project / src / test / java

If Maven-plugin is already standing, open the Maven Projects tab and add a project by specifying the path.

Answer 2, Authority 50%

To add a dependency from Maven Repository, you need:

  1. Go to Settings - & GT; Plugins and install everything related to Maven
  2. ctrl + shift + alt + s find modules left and Click on the dependencies tab Library ... - & gt; from maven

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions