I have a project with a pom.xml
that has the following <build>
declaration:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
When I run mvn install
on this project, it compiles the project, runs unit tests and publishes it to my local repo. I am trying to learn a little more about Maven here, and am having a tough time finding documentation/explanations on the following:
- How am I able to run
mvn install
, if the POM doesn't declare it underbuild/plugins
? Doesmaven-compiler-plugin
includemaven-install-plugin
, if so, how could I have figured that out? - Most importantly: the value of
build/plugins/plugin/configuration/source
and.../target
are both set to1.8
. If my machine has Java 8 on it, and I runmvn install
on this project without any errors, does that guarantee that the project builds with Java 8? I'm looking at the docs for the Compiler Plugin and don't see thosesource
/target
configs listed anywhere.