0

I am trying to setup jenkins and run build using maven, but I am getting an error, because maven is executing build with java source 1.5. I have mentioned the source and target in pom.xml as 1.7 still it is executing with source 1.5.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.1</version>
    <configuration>
        <source>1.7</source>
        <target>1.7</target>
    </configuration>
</plugin>

I have java 1.8 installed on my machine, please let me know how can I resolve this issue

closed as off-topic by dzieciou, Bharat Mane, IAmMilinPatel, Paul Muir, Jeevan Bhushetty Jul 20 '16 at 19:33

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about software development unrelated to testing are off-topic here, but can be asked on Stack Overflow." – dzieciou, Bharat Mane, IAmMilinPatel, Paul Muir, Jeevan Bhushetty
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Issue has solved I was looking in different folder which had different pom.xml, :p :) – Jeevan Bhushetty Feb 8 '16 at 11:24
0

Great that you resolve on your own. Similar issue I faced. Below solution works for me -

  • Open project in Eclipse
  • Right click on "JRE System Library"
  • Click on Properties
  • Select "JAVASE - 1.7"

In your case, java version might be different. But this works perfectly!

  • A bit presumptuous to say that this works perfectly. This sounds like it wouldn't help OP because his problem was with his jenkins build of his maven project. Which is separate from the eclipse's project or IDE specific properties. – Julian Jul 19 '16 at 22:27
0

Issue has solved I was looking in different folder which had different pom.xml, :p :)

Not the answer you're looking for? Browse other questions tagged or ask your own question.