You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "David Pead (Jira)" <ji...@apache.org> on 2020/07/12 09:56:00 UTC

[jira] [Created] (MNGSITE-416) Exercising "Getting Started" gives BUILD FAILURE plus example output issues

David Pead created MNGSITE-416:
----------------------------------

             Summary: Exercising "Getting Started" gives BUILD FAILURE plus example output issues
                 Key: MNGSITE-416
                 URL: https://issues.apache.org/jira/browse/MNGSITE-416
             Project: Maven Project Web Site
          Issue Type: Bug
            Reporter: David Pead
         Attachments: mvnTest.png

When following the steps in the Getting Started section, if one uses the example archetype as suggested, then tries to compile, in the subsequent step you'll be faced with:
{code:java}
$ mvn compile
[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------------< com.company.app:my-app >-----------------------
[INFO] Building my-app 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ my-app ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/davidpead/dev/mavenGettingStarted/my-app/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ my-app ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /Users/davidpead/dev/mavenGettingStarted/my-app/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[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.
[INFO] 2 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.686 s
[INFO] Finished at: 2020-07-11T17:32:22+01:00
[INFO] ------------------------------------------------------------------------
{code}
As the version of the archetype is not set it defaults to 1.0. The resulting pom doesn't set the source or target properties so I assume maven defaults to 5 / 1.5. The above will happen for any quickstart archetype < 1.3

Suggest the example is changed to match that of the Maven in 5 mins guide: [https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html#creating-a-project |https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html#creating-a-project]and the pom example too: [https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html#the-pom]

Additionally the subsequent steps for test & install show output examples that are escaping from the code blocks:

!mvnTest.png|width=416,height=367!

This is due the the TEST section output having the closing block hyphens. This could be overcome by using more up-to-date output. What's currently there reflects an old version.

PR cometh...



--
This message was sent by Atlassian Jira
(v8.3.4#803005)