4.0 Build Tools & Package Managers
What configuration language does Gradle use?
Groovy
4.0 Build Tools & Package Managers
What configuration language does Maven use?
XML
4.0 Build Tools & Package Managers
Where in the app directory structure does Gradle generate the JAR?
~/java-app/build/libs/
May look something like java-app-1.0-SNAPSHOT.jar
4.0 Build Tools & Package Managers
Where in the app directory structure does Maven generate the JAR?
~/java-maven-app/target/maven-status/
May look something like java-manen-app-1.1.0-SNAPSHOT.jar
4.0 Build Tools & Package Managers
What is an artifact?
A single packaged file containing application code and all its dependencies.
Artifacts are essential for deployment across different environments.
4.0 Build Tools & Package Managers
What does building the code mean?
Compiling, compressing, and packaging many files into a single artifact.
This process prepares the application for deployment.
4.0 Build Tools & Package Managers
What is an artifact repository?
A storage system for artifacts, used for backups and redeployments (e.g., Nexus, JFrog Artifactory).
It helps manage versioned artifacts efficiently.
4.0 Build Tools & Package Managers
Why do we need artifacts?
To deploy applications to different environments (dev, test, prod) as a consistent, versioned file.
Artifacts ensure that the same version of the application is used across environments.
4.0 Build Tools & Package Managers
What do Java artifacts typically look like?
These formats are used for packaging Java applications.
4.0 Build Tools & Package Managers
What do JavaScript artifacts typically look like?
JavaScript does not have a special artifact type like Java.
4.0 Build Tools & Package Managers
What are the Java build tools?
These tools help automate the build process in Java projects.
4.0 Build Tools & Package Managers
What is the JavaScript package manager?
npm (and yarn)
These tools manage JavaScript libraries and dependencies.
4.0 Build Tools & Package Managers
Where do Java developers find dependencies?
Maven Central Repository
This repository hosts a wide range of Java libraries.
4.0 Build Tools & Package Managers
What file stores Maven project dependencies?
pom.xml
This file defines the project structure and dependencies for Maven.
4.0 Build Tools & Package Managers
What file stores Gradle project dependencies?
build.gradle
This file is used to configure Gradle builds.
4.0 Build Tools & Package Managers
What happens when you add a dependency to Maven/Gradle?
The dependency is downloaded to the local repository.
This allows for offline builds and faster access to dependencies.
4.0 Build Tools & Package Managers
Where does Gradle put the built artifact?
In the build folder.
This is the default output directory for Gradle builds.
4.0 Build Tools & Package Managers
Where does Maven put the built artifact?
In the target folder.
This is the standard output directory for Maven builds.
4.0 Build Tools & Package Managers
How do you run a Java application locally?
java -jar <name-of-jar>
This command executes the JAR file containing the application.
4.0 Build Tools & Package Managers
How do you run a Java application on a server?
Copy the JAR to the server → run java -jar.
This process is common for deploying Java applications.
4.0 Build Tools & Package Managers
Does JavaScript use build tools?
JS primarily uses package managers (npm, yarn) instead of build tools.
This reflects the different needs of JavaScript applications.
4.0 Build Tools & Package Managers
Where are JS dependencies defined?
package.json
This file lists all dependencies and scripts for a JavaScript project.
4.0 Build Tools & Package Managers
What commands does npm provide?
npm installnpm startnpm stopnpm testnpm publishThese commands facilitate various tasks in JavaScript development.
4.0 Build Tools & Package Managers
What does a JS artifact (zip/tar) contain?
Application code without dependencies.
This is important for deploying JavaScript applications.