I discovered the Spring 4 used for latest versions of Apache Archiva is not compatible with Java 10 and Java 11. So I downgraded my version of Java 11 to Java 8 and I was able to use Apache Archiva. See steps and more information below:
DOWNGRADING FROM JAVA 11 TO JAVA 8 STEPS:
I believe the problem is navigating to the correct directory... Once you are where you are supposed to be you can run the sudo commands to remove whichever versions of java you want to remove.
First, run the command in the terminal to determine which version of Java you are running,
java -version
then you can navigate to pesky version of java that you intend to delete by using the following command:
cd /Library/Java/JavaVirtualMachines
then once you see are in the JavaVirtualMachines path, type in ls to see what versions of Java you have installed,
ls
and finally when you know which version or versions of Java you want to uninstall:
sudo rm -rf jdk-10.0.1.jdk #or whichever version you want to delete
INFORMATION ABOUT APACHE ARCHIVA AND INCOMPATIBILITY WITH SPRING 4
Just in case someone facing this issue. It seems Spring 4 which is used by Archiva 2.2.3 (2017) does not support being running on Java 11 VM and I can't get it to. Thanks to @M. Deinum in comments providing the info
Spring 4.3 works on Java 8, anything above it will probably fail (also due to other libraries like cglib and asm not supporting anything higher in that version). Unless there is another version of Archiva that is specially for Java11 you should stick with Java8
In short, stick with Java8 for Archiva as runtime. Also same in documentation about Nexus.