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

  • 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!

|improve this answer|||||
  • 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 :)

|improve this answer|||||

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