====== Introductory lesson - BOZP, JBoss AS, Maven, IDE, GIT ====== ===== HTTP Protocol ===== See the introduction to the HTTP: [[http://code.tutsplus.com/tutorials/http-the-protocol-every-web-developer-must-know-part-1--net-31177| HTTP intro]] ===== Glassfish 4.1 ===== J2EE 7 certified server (reference implementation) Description: https://glassfish.java.net/ Download, installation and start: [[https://glassfish.java.net/download.html|Glassfish Installation]] In case Glassfish is not working for you, use [[http://www.payara.fish/downloads | Payara]] or WildFly. ==== Run the server ==== Check the guide: [[https://glassfish.java.net/getstarted.html|Glassfish Guide]] glassfish4/bin/asadmin start-domain Management Console: http://localhost:4848 ===== Maven ===== Software Project Management: http://maven.apache.org/ * manages dependencies * compilation * packaging (jar, war, ear) * tests * maven plugins: code coverage, WAR deployment * ... Maven lifecycle: [[http://www.avajava.com/tutorials/lessons/what-are-the-phases-of-the-maven-default-lifecycle.html|Maven Lifecycle]] POM - project object model = project definition file (root file pom.xml). Project structure: src/ main/ java/ resources/ webapp/ test/ java/ resources/ pom.xml ==== Dependencies ==== Maven uses the repository of libraries. The libraries can be searched: http://mvnrepository.com/artifact/org.apache.commons/commons-lang3/3.1 There are many Maven repositories worldwide, you can create your own org.apache.commons commons-lang3 3.1 Maven dependencies can define the **scope** of the project: * compile * provided * runtime * test * http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html ==== Maven Installation ==== $ sudo apt-get install maven ==== Test example project ==== Download, unpack and test: {{:courses:a4m36aos:cviceni:test.zip|}} Repair the bug. $ mvn test ===== JAVA EE 7 Samples ===== [[https://github.com/javaee-samples/javaee7-samples|Java EE 7 samples]] ===== GIT - GITLAB ===== There is an GITLAB account for students: https://gitlab.fel.cvut.cz Students may create repositories at GITLAB ===== Homework for next week ===== - Prepare teams of two - Create a repo at GITLAB - Study how Maven works. There will be no more time to study Maven