aboutsummaryrefslogblamecommitdiff
path: root/test/java/install_gradle_and_maven.sh
blob: c6aa3e521b5c37a1b85b0c5025ddb047ac35e721 (plain) (tree)
1
2
3
4
5
6
7
8
9






                                      

                                       
                           
                               



                                                                                 
                           

                                                                                                                                                                                 


               
#!/bin/bash

set -e

# Optional: Import test library
source dev-container-features-test-lib

check "user is root" whoami | grep root

check "java" java --version
check "gradle" gradle --version

cd /tmp && gradle init --type basic --dsl groovy --incubating --project-name test
check "GRADLE_USER_HOME exists" ls -la /root | grep ".gradle"

check "maven" mvn --version
cd /tmp && mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4 -DinteractiveMode=false
check "m2 exists" ls -la /root | grep ".m2"

# Report result
reportResults