Highlighted

Maven Build Broken on Linux but not on Mac OSX

Avatar

Avatar

benb9073991

Avatar

benb9073991

benb9073991

06-02-2018

We have an AEM 6.3 project. Most of our devs are on windows and mac. We are trying to replicate the building of the package on ubuntu 16.04 but the build is getting an error.

On an example linuxmachine where the package builds successfully:

Maven config of our Ubuntu machine

JDK is installed on this machine:

Our error:

Replies

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

06-02-2018

We noticed:  JAVA_HOME should be pointed to JDK and not to JRE; Java home: /usr/lib/jvm/java-8-oracle/jre?

Highlighted

Avatar

Avatar

benb9073991

Avatar

benb9073991

benb9073991

06-02-2018

That's a great point, however, I am not finding any specific documentation for where that should point to.

which javac returns

which cannot be set as $JAVA_HOME

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

06-02-2018

Most ppl point to the installed JAVA JDK - my JAVA_HOME --

C:\Program Files\Java\jdk1.8.0_111

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

06-02-2018

For those reading this thread - here is a great overview of setting up an AEM DEV environment:

Getting Started with AEM Sites Part 1 - Project Setup

Highlighted

Avatar

Avatar

benb9073991

Avatar

benb9073991

benb9073991

06-02-2018

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

06-02-2018

It says: "There is another default Java installation called the JDK (Java Development Kit). The JDK is usually only needed if you are going to compile Java programs or if the software that will use Java specifically requires it."

Set your Java HOME to Java JDK - make sure you install version 8 from Java download page.

Highlighted

Avatar

Avatar

benb9073991

Avatar

benb9073991

benb9073991

06-02-2018

Thanks for the help so far.

I went to the Oracle site, downloaded java 8 and installed it. My new Maven Output

$mvn -version

I deleted my .M2 folder and tried again to build the package

Unfortunatly I get the same error

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

06-02-2018

Set the Java HOME to: /opt/jdk/jdk1.8.0_162

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

06-02-2018