Yes, you can use Maven on zOS under USS, reason being maven at end of the day is Java application and require JRE which is available on USS for most installation. This took me a full week to figure it out but it worked eventually.
-
Access to OMVS shell.
-
You will need Maven binaries in zipped format and can be downloaded from here
-
Unzip the binaries to any location on your workstation and then transfer using IBM Idz or any other method available to your home direcorty of USS or any other location of your choice.
-
If you have cURL for zOS which comes packaged with Rocket Git, you can directly download on to USS.
- CD to your direcory where you kept the files on USS and run the following command
chtag -tc ibm-1047 ~/apache-maven-3.6.3/bin/m2.conf
- Now make a copy of this file, just in case.
cp ~/apache-maven-3.6.3/bin/m2.conf ~/apache-maven-3.6.3/bin/m2.conf.bkp
- Rename the m2.conf to m2.conf.old
mv m2.conf m2.conf.old
- Now using iconv to change the encoding of m2.conf to UTF-8
iconv -f ibm-1047 -t UTF-8 ~/apache-maven-3.6.3/bin/m2.conf.old > ~/apache-maven-3.6.3/bin/m2.conf
- set MAVEN_OPTS to use UTF-8 encoding, remember that is zOS so default encoding is Ebcidc.
export MAVEN_OPTS=-Dfile.encoding=UTF-8
- Set execute permission on ~/apache-maven-3.6.3/bin.mvn
chmod +x ~/apache-maven-3.6.3/bin/mvn
- Test Drive should show version instead of hieroglyph.
mvn -v
With Love, Billy 'The Cat'