1
votes

I've try to create a pipeline in Azure DevOps. I'm working with Java and Maven, it's a very basic project, just one class/one method and tests.

I've used the maven pipeline template provided by Azure DevOps, but I got a compilation error :

[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] -------------------------------------------------------------

I don't know what is Source and Target. I looked at in the pom.xml file and in the azure-pipelines.yml file, but I saw nothing about Source and Target.

What is it and how/where can I change it to 6 and 1.6 ?

Furthermore, I'm new with Azure DevOps Pipeline and it's my first project with Maven.

Tell me if you need to see my pom.xml file or my azure-pipelines.yml file for additionnal information, but there are very basic, I changed nothing (the pom.xml file was auto-generated by IntelliJ)

Thanks a lot.

1
Have you referenced to this issue? Please have a try to add it to the pom <properties> <maven.compiler.source>1.6</maven.compiler.source> <maven.compiler.target>1.6</maven.compiler.target> </properties>. For more information about pom.xml please refer to this link. - Tom Sun - MSFT
Thanks, it was that! - iAmoric

1 Answers

1
votes

Please have a try to add follow script in the pom.xml file.

<properties> 
<maven.compiler.source>1.6</maven.compiler.source> 
<maven.compiler.target>1.6</maven.compiler.target> 
</properties>

For more information, please refer to this issue.