Search code examples
javamaveniotkaa

Can't build KAA on OS X


After running mvn -f kaa/pom.xml clean install -DskipTests

i got: Full log

My environment:

kaa git:(master) mvn -v Picked up JAVA_TOOL_OPTIONS: -Xmx4096m -XX:MaxPermSize=2048m -Xms4096m Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=2048m; support was removed in 8.0 Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T18:41:47+02:00) Maven home: /usr/local/Cellar/maven/3.3.9/libexec Java version: 1.8.0_101, vendor: Oracle Corporation Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "10.12.1", arch: "x86_64", family: "mac"

Full log


Solution

  • Actually, it does not depend on OS. If your look at the section above the final build status of each module, you will see error message which will give you complete understanding of what is going wrong:

    [ERROR] Picked up JAVA_TOOL_OPTIONS: -Xmx4096m -XX:MaxPermSize=2048m -Xms4096m
    [ERROR] Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=2048m; support was removed in 8.0
    [INFO] Error occurred during initialization of VM
    [INFO] Initial heap size set to a larger value than the maximum heap size
    

    So, one of the way to fix this problem is to run next command in your terminal:

    $ unset JAVA_TOOL_OPTIONS
    

    But note that in such case you will remove JAVA_TOOL_OPTIONS only from current shell session. To completely remove it try to find this variable in .bashrc or .profile files in your home directory and remove it from there.