Make a directory for you project
mkdir YOU_PROJECT_NAME
cd YOU_PROJECT_NAME
Install "install-less" jabbaw (java version manger) https://github.com/Jabba-Team/jabba/blob/main/jabbaw.md
curl -sLO https://raw.githubusercontent.com/Jabba-Team/jabba/main/jabbaw
chmod +x jabbaw
curl -sLO https://raw.githubusercontent.com/Jabba-Team/jabba/main/jabbaw.ps1
echo "temurin@21" > .jabbarc
install mvnw from bash (this installs the most recent non alpha/beta version of maven)
#!/bin/bash
# Step 1: Download the Maven Wrapper scripts
curl -o mvnw https://raw.githubusercontent.com/apache/maven-wrapper/master/maven-wrapper-distribution/src/resources/mvnw
curl -o mvnw.cmd https://raw.githubusercontent.com/apache/maven-wrapper/master/maven-wrapper-distribution/src/resources/mvnw.cmd
# Step 2: Download the Maven Wrapper JAR
mkdir -p .mvn/wrapper/
LATEST_VERSION_MVNW=$(curl -s https://repo1.maven.org/maven2/org/apache/maven/wrapper/maven-wrapper/maven-metadata.xml \
| grep -oP "(?<=<version>)[^<]+" \
| grep -vE 'alpha|beta|rc' \
| tail -1)
curl -o .mvn/wrapper/maven-wrapper.jar https://repo1.maven.org/maven2/org/apache/maven/wrapper/maven-wrapper/$LATEST_VERSION_MVNW/maven-wrapper-$LATEST_VERSION_MVNW.jar
# Step 3: Query the latest stable Maven version
LATEST_VERSION_MVN=$(curl -s https://repo1.maven.org/maven2/org/apache/maven/apache-maven/maven-metadata.xml \
| grep -oP "(?<=<version>)[^<]+" \
| grep -vE 'alpha|beta|rc' \
| tail -1)
# Step 4: Create the maven-wrapper.properties file with the latest version
cat > .mvn/wrapper/maven-wrapper.properties <<EOL
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/$LATEST_VERSION_MVN/apache-maven-$LATEST_VERSION_MVN-bin.zip
EOL
# Step 5: Make the mvnw script executable
chmod +x mvnw
# Step 6: enhance mvnw experience with jabba by adding to mvnw script (before: # OS specific support ...):
sed -i.bak '/^# OS specific support/i \
[ -f ./.jabbarc ] && [ -f ./jabbaw ] && export $(./jabbaw env | grep JAVA_HOME)\
' mvnw
echo "Maven Wrapper installed successfully!"
echo "Maven version $LATEST_VERSION will be used."
echo "You can now use './mvnw' to run Maven commands."
Now check the versions (if they are correct):
./jabbaw ./mvnw -v
Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Maven home: /home/stephan/.m2/wrapper/dists/apache-maven-3.9.9-bin/33b4b2b4/apache-maven-3.9.9
Java version: 21.0.4, vendor: Eclipse Adoptium, runtime: /home/stephan/.jabba/jdk/temurin@21.0.4
Create quarkus project with jabbaw & mvnw (quakuse plugin need current version of java & maven)
./jabbaw ./mvnw io.quarkus.platform:quarkus-maven-plugin:3.13.2:create \
-DprojectGroupId=org.acme \
-DprojectArtifactId=getting-started \
-Dextensions='rest'
Now the files are in getting-started, you have to move them to the parent dir, so that your mvnw & jabbaw work correcly
cd CREATED_DIR_; cp -R pom.xml README.md src/ ..
cd ..; rm -r CREATED_DIR_
Start quakus dev mode
./jabbaw ./mvnw quarkus:dev
Often a custom port is needed:
./jabbaw ./mvnw quarkus:dev -Dquarkus.http.port=9001