Software_Development_Context
Software_Development_Context
C1 SOFTWARE
DEVELOPMENT CONTEXT [C2]
2
1.2 Tools
● IDE: Integrated Development Environments
3
Software building process
with MAVEN
● Maven simplified build process workflow:
○ compile;
○ resolve dependencies;
○ test;
○ package;
○ install;
○ deploy.
4
Maven Build Process Model
[Conceptual Model diagram]
5
Maven Build Process
validate validate the project is correct and all necessary information is available.
initialize initialize build state, e.g. set properties or create directories.
generate-sources generate any source code for inclusion in compilation.
process-sources process the source code, for example to filter any values.
generate-resources generate resources for inclusion in the package.
process-resources copy and process the resources into the destination directory, ready for packaging.
process-test-sources process the test source code, for example to filter any values.
generate-test-resources create resources for testing.
process-test-resources copy and process the resources into the test destination directory.
test-compile compile the test source code into the test destination directory
9
Practice 2
● MVN-eclipse integration
○ run builds from eclipse
● MVN-command
○ mvn-installation
○ run builds from command-shell
mvn phase
mvn plugin:goal
10
Maven POM: Project Object Model: pom.xml
11
Maven Project Object Model: pom.xml
12
Maven Profiles and Properties
13
MVN project structure
Default properties
● ${project.basedir}
● Default target folder
○ ${project.build.directory}
● Default target/classes folder
○ ${project.build.outputDirectory}
● Default target/test-classes folder
○ ${project.build.testOutputDirectory}
● Default src/main/java folder
○ ${project.build.sourceDirectory}
● Default src/test/java folder
○ ${project.build.testSourceDirectory}
14
MVN project structure
Convention over configuration
15
Maven Repositories and
Dependency management
16
Maven Repositories and
Dependency management
<repositories>
<repository>
<id>my-repo1</id>
<name>your custom repo</name>
<url>http://remote-repo-url.org</url>
</repository>
<repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit}</version>
<scope>test</scope>
</dependency>
</dependencies>
17
Maven Common Commands
execute task (unit-of-work) as {plugin}:{goal}
● mvn archetype:generate
○ generate project (structure and configuration)
● mvn compile
○ execute compile phase
■ from default build lifecycle
○ mvn compiler:compile [and up]
● mvn package
○ execute phase from default build lifecycle
○ mvn jar:jar [and up]
18
Maven Common Commands (2)
● mvn install
○ execute install phase
■ from default build lifecycle
○ mvn install:install [and up]
● mvn
○ dependency:resolve
○ dependency:analyze
○ dependency:tree
○ dependency:copy-dependencies
19
Practice: MVN
20
Maven managing hierarchical project
structure: project and sub-projects
21
Other build-support management tools
● Gradle
● Apache Buildr
● Jeka
22
Collaborative programming workflow.
Software Development & Teaming
23
Features of Version Control Systems
(or Source Code Management Systems)
24
SVN System
25
SVN Concepts
26
SVN Repositories
27
SVN Client - common commands
28
TortoiseSVN
29
Eclipse
Subclipse
30
GIT System and Approach
31
GiT Distributed Architecture and
Git Process
32
Eclipse Git - eGit
33
Eclipse Git - eGit
34
Git commands
● git init
● git clone username@host:/path/to/repository
------------------------------------------------
● git add <filename>
● git fetch
● git pull
● git commit -m "Commit message"
● git push origin master
------------------------------------------------
● git diff
● git checkout -- <filename>
● git reset --hard origin/master
35
Git Workflow
36
Git GUI Tools
● Git-GUI Console
● SourceTree
● GitHub Desktop
● TortoiseGit
● Git Extensions
37
Refs: Ant Build Tool
38
Refs: Maven Build Tool
39
Refs: SVN and GiT
● SVN
○ http://www.tutorialspoint.com/svn/
○ http://www.ibm.com/developerworks/library/os-ecl-su
bversion/
● GiT
○ http://www.vogella.com/tutorials/Git/article.html
○ http://www.tutorialspoint.com/git/
○ http://www.vogella.com/tutorials/EclipseGit/article.ht
ml#creating-an-eclipse-project
○ Pro Git online version
40
Tutorial Sources
● Tutorial Point
○ http://www.tutorialspoint.com/index.htm
● Java Code Geeks
○ http://www.javacodegeeks.com/2014/04/java-ee7-an
d-maven-project-for-newbies-part-1-a-simple-maven
-project-structure-the-parent-pom.html
○ http://www.javacodegeeks.com/2014/06/java-ee7-an
d-maven-project-for-newbies-part-5-unit-testing-usin
g-arquillian-wildfly-8.html
41