Jenkins 9
Jenkins 9
md
Build Tools
Make:
This is a first generation build tool which has automated building of c and c++ projects.
The build steps are configured in a file which is called as Makefile
Apache Ant:
This is a build tool majorly used in Java Projects for building packages
The build steps are configure in a file called as build.xml
Apache Maven
Maven is a build tool used for java and java based languages (Groovy and Scala).
Maven belives in convention over configuration
Maven helps in
building
testing
packaging
managing dependencies.
Maven has a standard directory layout Refer Here
Maven has archetypes using which we can generate folder structures with sample code.
Setup Maven
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>blog.directdevops</groupId>
<artifactId>hello-maven</artifactId>
<version>0.0.1-SNAPSHOT</version>
</project>
Maven lifecycle
1/3
jenkins9.md
validate
compile
test
package
install
deploy
Maven will create a folder called as target and add all artifacts into it.
clean step removes the target folder
When we install maven in the home directory (C:\Users<username>\ or /home/) a .m2 folder will be
created.
This .m2 folder will have all the dependencies downloaded over here and is also referred as local
repostiory
In maven we deal with 3 repositories
local
remote
central
2/3
jenkins9.md
mvn test
mvn package
Multi-project model:
Try building game-of-life Refer Here
References
3/3