# Java SE 9 - JPMS modules are not artifacts

DevFeed: [Java SE 9 - JPMS modules are not artifacts](<https://devfeed.tech/articles/java-se-9-jpms-modules-are-not-artifacts-21996.md>)

Original publisher: [Read original article](<http://blog.joda.org/2017/04/java-se-9-jpms-modules-are-not-artifacts.html>)

Author: Stephen Colebourne (noreply@blogger.com)

Published: 2017-04-24T08:12:00Z

Content type: article

Language: en

Sources: [Stephen Colebourne](<https://devfeed.tech/sources/stephen-colebourne.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [modules](<https://devfeed.tech/topics/modules.md>), [Maven](<https://devfeed.tech/topics/maven.md>), [Maven Central](<https://devfeed.tech/topics/maven-central.md>)

Tags: [bug](<https://devfeed.tech/tags/bug.md>), [build-tool](<https://devfeed.tech/tags/build-tool.md>), [java](<https://devfeed.tech/tags/java.md>), [java9](<https://devfeed.tech/tags/java9.md>), [maven-central](<https://devfeed.tech/tags/maven-central.md>), [modules](<https://devfeed.tech/tags/modules.md>)

## AI overview

This article explains that Java Platform Module System modules in Java SE 9 are distinct from build artifacts such as JAR files. Each project version can produce a different artifact while retaining the same module name. Build tools such as Maven select the artifact version, while JPMS assembles the runtime module graph and rejects duplicate packages on the module path.

## Source excerpt

This is the next article in a series I'm writing to help make sense of the Java Platform Module System (JPMS) in Java SE 9. JPMS was developed as Project Jigsaw. Other articles in the series are Module basics and Module naming. Module != Artifact If you want to grasp what JPMS modules are all about, it turns out that it is critical to understand what they are not. In particular, they are not artifacts. Firstly, lets define an artifact. An artifact is a file produced when developing software. For a project on Maven Central, this includes jar files of bytecode, jar files of sources and jar files of Javadoc. We are interested primarily in the bytecode for this discussion. Secondly, lets assume that a project is going to have the same module name over time. This is just like package names - projects don't change package name with every release. Given this, what is the mapping between an artifact and a module? Versions Each version of a project will consist of a different artifact (jar file), perhaps released on Maven Central. Each version will have the same module name. But, we also know that the Java platform (JPMS) does not know about versions or version-selection. Therefore, when assembling a modulepath for Java SE 9, something else is going to have to choose the correct version of the module. This will typically be the build tool, eg. Maven. But while the classpath will tolerate having two versions of the artifact (typically with bad consequences at runtime), the JPMS modulepath will refuse to start if there two modules contain the same package, as would happen if two versions of the same module are found. Maven already manages versions of course, picking one version from a set of versions, where all with the same groupId:artifactId. With Java SE 9 we can say that Maven is picking one artifact from a set of artifacts to use in the runtime JPMS module graph. Artifacts JPMS runtime module org.joda : joda-convert : 1.2 Build tool must pick one of these artifacts for th