Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error compiling: invalid target release: 1.8 #817

Open
zygimantus opened this issue Feb 3, 2016 · 8 comments
Open

Fatal error compiling: invalid target release: 1.8 #817

zygimantus opened this issue Feb 3, 2016 · 8 comments
Assignees
Labels

Comments

@zygimantus
Copy link

I got this error when building this project:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21:10 min
[INFO] Finished at: 2016-02-03T11:59:04+00:00
[INFO] Final Memory: 39M/448M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project org.wso2.carbon.launcher: Fatal error compiling: invalid target release: 1.8 -> [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/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :org.wso2.carbon.launcher

How to fix this?

@thusithathilina
Copy link
Contributor

what is the jdk version that you are using? It should be 1.8

@zygimantus
Copy link
Author

Ok. I specified oracle-jdk8 but now it have another error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (default) on project carbon-kernel-osgi-tests: An Ant BuildException has occured: Unable to read execution data file /home/travis/build/zygimantus/carbon-kernel/tests/osgi-tests/target/jacoco.exec
[ERROR] around Ant part ...jacoco:report... @ 7:18 in /home/travis/build/zygimantus/carbon-kernel/tests/osgi-tests/target/antrun/build-main.xml: /home/travis/build/zygimantus/carbon-kernel/tests/osgi-tests/target/jacoco.exec (No such file or directory)
[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/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :carbon-kernel-osgi-tests

@sameerajayasoma
Copy link
Member

What is your OS? We have tested this build in Linux, OSX and Windows.

@sameerajayasoma sameerajayasoma self-assigned this Mar 10, 2016
@Kishanthan
Copy link
Contributor

Kishanthan commented Sep 21, 2016

@zygimantus can you try building the latest master branch?

So far we haven't seen this issue, but from the trace it looks like /home/travis/build/zygimantus/carbon-kernel/tests/osgi-tests/target/jacoco.exec was not generated properly during the build.

@zygimantus
Copy link
Author

Yes, I am using master branch. I wonder if it is even possible to build this project using travis?

@Kishanthan
Copy link
Contributor

We haven't used travis to build our code. but we are using jenkins for continuous build and you can check the build status from the dashboard at - https://wso2.org/jenkins/job/carbon-kernel/

It will not have any difference using jenkins or travis as they provide the build environment (maven, java, etc) which may not have any significant difference between the two IMO.

@zygimantus
Copy link
Author

Probably I need to set some variables correctly.

@Manuri
Copy link
Member

Manuri commented Apr 30, 2017

@zygimantus Did you skip tests with -DskipTests when building the project? In that case build fails since jacoco.exec is not generated.
However if you skipped tests with -Dmaven.test.skip then the build should pass since the profile which generates reports is activated depending on that property.

@jsdjayanga jsdjayanga added the C5 label Jul 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants