reset password
Author Message
lmann2
Posts: 156
Posted 22:15 Jan 29, 2015 |

I can't seem to run mvn package.  Sometime maven builds and sometimes it produces this error(I read everything and checked my enviroment variables and my jdk....I cannot figure it out):

[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ gefp ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ gefp ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 17 source files to C:\Users\lmann\cs520workspace\gefp\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.485 s
[INFO] Finished at: 2015-01-29T22:10:07-08:00
[INFO] Final Memory: 8M/105M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project gefp: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]
[ERROR] 

toramoss
Posts: 13
Posted 22:28 Jan 29, 2015 |

I've had a similar issue like that in the past. I found that this link helped me fix the problem:

http://stackoverflow.com/questions/19655184/no-compiler-is-provided-in-this-environment-perhaps-you-are-running-on-a-jre-ra

plakhan
Posts: 37
Posted 22:36 Jan 29, 2015 |

Make sure to use jdk instead of jre ....Follow this Windows -> Preferences - > Java - > Installed JRE's -> Add new standard vm and point it to jdk instead of jre....

May be this will help

lmann2
Posts: 156
Posted 22:46 Jan 29, 2015 |
plakhan wrote:

Make sure to use jdk instead of jre ....Follow this Windows -> Preferences - > Java - > Installed JRE's -> Add new standard vm and point it to jdk instead of jre....

May be this will help

That worked, I read something like that earlier on stackoverflow, but it didn't make sense to change the JRE to a JDK path.  Why does this work?

plakhan
Posts: 37
Posted 22:47 Jan 29, 2015 |
lmann2 wrote:
plakhan wrote:

Make sure to use jdk instead of jre ....Follow this Windows -> Preferences - > Java - > Installed JRE's -> Add new standard vm and point it to jdk instead of jre....

May be this will help

That worked, I read something like that earlier on stackoverflow, but it didn't make sense to change the JRE to a JDK path.  Why does this work?

It works because maven uses jdk instead of jre for package build.Thats my guess

lmann2
Posts: 156
Posted 22:55 Jan 29, 2015 |
plakhan wrote:
lmann2 wrote:
plakhan wrote:

Make sure to use jdk instead of jre ....Follow this Windows -> Preferences - > Java - > Installed JRE's -> Add new standard vm and point it to jdk instead of jre....

May be this will help

That worked, I read something like that earlier on stackoverflow, but it didn't make sense to change the JRE to a JDK path.  Why does this work?

It works because maven uses jdk instead of jre for package build.Thats my guess

Lol, fair enough,.