devbas.blogg.se

Difference between maven install and package
Difference between maven install and package






difference between maven install and package difference between maven install and package

For some reason, it was set to the language level of Java 5. I solved it by right-clicking the directory src - main - java and choosing the option Open Module Settings. But the option module-info.java did not show up in my context menu. Right-click the directory src - main - java and select New - module-info.java. At least, that is what the help pages of JetBrains say. So, we will create the Java module inside this directory. But with Maven, the convention is to place the sources in the directory src - main - java. Remember, in Part 1, we added the Java module right below the src directory. Now it is time to add the Java module to the example. The following directory structure is automatically created. The basic example can be found in the GitHub repository in branch feature/basic-example.įirst, we create a new Maven project in IntelliJ.

difference between maven install and package

I am using IntelliJ IDEA Community Edition 2017.3. In the examples below, we will use it to organize our Maven modules. To make it even more confusing, IntelliJ also uses the term module. But as long as we know the difference, this should not be a problem. The confusing part is that the same term module is used while they represent something different. So, Maven modules and Java modules serve a different purpose. It does not provide any means to control the version of an artifact you are using. Java modules are a way to strongly encapsulate your classes. With Maven, you can control the versions of these modules and the dependencies between these modules. Maven modules are a way to organize your project into several subprojects (modules). Maven Modules, Java Modules, and IntelliJ Modulesīefore we start, it is a good idea to take a look at the difference between Maven modules, Java modules, and IntelliJ modules. The examples used can be found on GitHub. We will use the same example, starting with a single module application and, afterward, converting it into a multi-module application. It is advised to read the post Java 9 Modules (Part 1): Introduction. The focus lies on how modules affect us when using an IDE like IntelliJ and using a build tool like Maven. In this post, we will take a closer look at Java 9 modules.








Difference between maven install and package