Maven Contd..
- Maven Remote Repositories can be hosted using Many tools
- Jfrog Artifactory
- Nexus
- Github Pacakges
- Azure Artifacts
Lets redefine CI
- CI = build + test + package + archiveArtifact
- Sample Projects
Activity: Build a Java Project
- This project requires jdk 17 and maven 3.9.9
- This requires downloading and setting up maven, refer classroom video for steps
Activity: Build a Java Project which has maven wrapper
- This project requires jdk 17 and maven 3.9.9
./mvnw package
Gradle
- This was introduced by google for building andriod projects
- Gradle has features for both ant and maven
- Gradle has a feature of incremental build
Compare Maven and Gradle
Here’s how some common tasks compare between Maven and Gradle:
| Task | Maven Command | Gradle Command |
|---|---|---|
| Clean | mvn clean |
gradlew clean |
| Compile | mvn compile |
gradlew build |
| Run Tests | mvn test |
gradlew test |
| Package JAR | mvn package |
gradlew jar |
| Add Dependencies | ` in POM| Add independencies {}` |
Building .net core projects
- Install .net sdk 9 Refer Here for steps
- Projects:
Building reactjs projects using npm
- Lets try build,test, package of a react js aplication
- todoMvc is sample repo
- To install node and npm i prefer nvm
- Basic steps: Navigate to package.json to find out scripts
- Generally
npm install
npm run build
npm run test
- There are other alternatives like npx, yarn etc…
