You can add the properties tag directly under the root element (<project>)
of your POM[1] file.


   1. <properties>
   2. <maven.compiler.source>1.8</maven.compiler.source>
   3. <maven.compiler.target>1.8</maven.compiler.target>
   4. </properties>


[1] Project Object Model

The default source level is still at 1.5, due to backward compatibility
issues.

Hth,

Nick Stolwijk

~~~ Try to leave this world a little better than you found it and, when
your turn comes to die, you can die happy in feeling that at any rate you
have not wasted your time but have done your best ~~~

Lord Baden-Powell


On Thu, Jul 26, 2018 at 10:09 PM Scott Miller <sc...@geekslv.com> wrote:

> Hi,
>
> I am trying to use Maven for the first time.  I have it installed and  was
> working on this tutorial:
>
> https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
>
> I got to this step:
>
>
>    1. mvn package
>
> Where I got the following error:
>
> BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 3.123 s
> [INFO] Finished at: 2018-07-26T08:30:10-07:00
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
> (default-compile) on project my-app: Compilation failure: Compilation
> failure:
> [ERROR] Source option 5 is no longer supported. Use 6 or later.
> [ERROR] Target option 1.5 is no longer supported. Use 1.6 or later.
> [ERROR] -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
> please read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
>
> My research about this error led me to this page:
>
>
> https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html
>
> Now I am stuck. Where do I find these files?  Is there any more information
> to be gleaned of exactly what my edits should be?
>
> I am assuming I am doing something wrong because I would expect the Maven
> tutorial has been tested.
>
> TIA
>
> Scott
>

Reply via email to