Modern “Servlet” Development by Steven Gantz
Manual process One time - Create war structure (WEB-INF, web.xml, etc.) Write code Javac all .java files, move them to WEB-INF folder Jar –cvf <project>.war <all files to add> Copy .war into tomcat folder
Automation Makefiles Ant Manually create a makefile No flexibility Javac all .java files, move them to WEB-INF folder Jar –cvf <project>.war <all files to add> Copy .war into tomcat folder No flexibility Ant Java makefile Different syntax, same idea
Project Size Individual files -> Makefile/Ant Larger projects Ex. 100 files 1000 files 7000 files Dependencies Single Many Hundreds
Important to have experience w/ build tools before entering working world
Maven Overwhelming majority of Java dev groups use Maven Universal build tool Simple commands to execute, minimal configuration Handles dependencies elegantly Lends itself to Gradle and other newer build tools Works on command line, most IDEs, most CI applications
Continuous Integration/Deployment Along with using build tools, most devs use continuous int/dep tools Jenkins CI is popular Can be hosted locally, automatically runs commands
How I did Project 1 using Jenkins Setup project w/ Eclipse and Maven Write code, test on local machine When confident with build, commit code to github Open Jenkins CI, run build/auto-deployment job Runs code analytics with SonarQube Jenkins auto-deploys the .jar file to /home/students/me Auto-deploys Javadoc to /var/www Auto-deploys src and readme.txt to /home/students/me Automatically zips src, readme.txt, and .jar into zip to submit (Decided not to auto-submit, but is perfectly possible to do)
Jenkins Demo SonarQube demo: http://66.228.43.127:9000/dashboard/index/stevengantz.csc521:proj ect1 SonarQube Static code analysis becoming more popular No logic, just security issues, bugs, code smells
The point Investigate using Gradle or Maven for project 2/3 Use IDE if unfamiliar (Dev shops don’t use terminal 24/7) Look into Version Control if Unfamiliar (Extremely important) Try out Continuous Deployment/Integration services
Forum Post High overview of following topics Jenkins SonarQube Maven Eclipse Github Gitlab