Here are the key phases of the Maven default build lifecycle:- validate - Validate the project is correct and all necessary information is available- compile - Compile the source code of the project - test - Test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed- package - Take the compiled code and package it in its distributable format, such as a JAR. - integration-test - Process and deploy the package if necessary into an environment where integration tests can be run- verify - Run any checks to verify the package is valid and meets quality criteria- install - Install the package into the local repository, for use as a dependency
This document discusses setting up continuous integration for Oracle SOA Suite and Oracle Unified Business Process Management Suite projects. It introduces continuous integration and its benefits, then outlines the key building blocks needed, including Subversion for version control, Maven for project building and management, and Hudson for continuous integration and automation. It also discusses alternatives, the WebLogic Maven plugin, building SCA composites, handling dependencies on Metadata Services, and putting all the pieces together into a continuous integration workflow.
New & Emerging _ KrisDowney _ Simplifying the Change Process.pdfInSync2011
Mais conteúdo relacionado
Semelhante a Here are the key phases of the Maven default build lifecycle:- validate - Validate the project is correct and all necessary information is available- compile - Compile the source code of the project - test - Test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed- package - Take the compiled code and package it in its distributable format, such as a JAR. - integration-test - Process and deploy the package if necessary into an environment where integration tests can be run- verify - Run any checks to verify the package is valid and meets quality criteria- install - Install the package into the local repository, for use as a dependency
Semelhante a Here are the key phases of the Maven default build lifecycle:- validate - Validate the project is correct and all necessary information is available- compile - Compile the source code of the project - test - Test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed- package - Take the compiled code and package it in its distributable format, such as a JAR. - integration-test - Process and deploy the package if necessary into an environment where integration tests can be run- verify - Run any checks to verify the package is valid and meets quality criteria- install - Install the package into the local repository, for use as a dependency (20)
Developer and Fusion Middleware 2 _Greg Kirkendall _ How Australia Post teach...
Here are the key phases of the Maven default build lifecycle:- validate - Validate the project is correct and all necessary information is available- compile - Compile the source code of the project - test - Test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed- package - Take the compiled code and package it in its distributable format, such as a JAR. - integration-test - Process and deploy the package if necessary into an environment where integration tests can be run- verify - Run any checks to verify the package is valid and meets quality criteria- install - Install the package into the local repository, for use as a dependency
1. <Insert Picture Here>
Continuous Integration for Oracle SOA Suite and Oracle
Unified Business Process Management Suite
Mark Nelson
Consulting Solution Architect
The A-Team
2. THE FOLLOWING IS INTENDED TO OUTLINE OUR GENERAL PRODUCT
DIRECTION. IT IS INTENDED FOR INFORMATION PURPOSES ONLY, AND
MAY NOT BE INCORPORATED INTO ANY CONTRACT. IT IS NOT A
COMMITMENT TO DELIVER ANY MATERIAL, CODE, OR FUNCTIONALITY, AND
SHOULD NOT BE RELIED UPON IN MAKING PURCHASING DECISION. THE
DEVELOPMENT, RELEASE, AND TIMING OF ANY FEATURES OR
FUNCTIONALITY DESCRIBED FOR ORACLE'S PRODUCTS REMAINS AT THE
SOLE DISCRETION OF ORACLE.
2
5. Agenda
• Introduction – What is Continuous Integration?
• Building Blocks
• Subversion
• Maven
• Hudson
• Alternatives
• The WebLogic Maven Plugin
• The SCA build process
• Handling MDS
• Handling Task Forms
• Putting it all together
5
6. Continuous Integration
• Continuous Integration is a software engineering
practice which attempts to improve quality and reduce
time to deliver
• This is done by applying small, frequent quality
control efforts
Let’s see an example…
6
ORACLE CONFIDENTIAL
7. Without Continuous Integration
”HEAD”
1
We want to make some changes to an artifact in our
project…
7
ORACLE CONFIDENTIAL
8. Without Continuous Integration
”HEAD”
1
Check
out
1
… so we check out the artifact from the version control
system …
8
ORACLE CONFIDENTIAL
9. Without Continuous Integration
”HEAD”
1
Check
out
1 Change
1’
… and we make our changes. This may take several
days …
9
ORACLE CONFIDENTIAL
10. Without Continuous Integration
”HEAD”
1 2 3 4 5
Check
out
1 Change
1’
… meanwhile, other developers have made changes
too, and have checked them in to the version control
system …
10
ORACLE CONFIDENTIAL
11. Without Continuous Integration
”HEAD”
1 2 3 4 5 6
Check
out
Integrate
1 Change
1’
… when we are ready to check our changes back in to
the version control system (“integrate”) there is a big
difference between our version and the HEAD version.
This means integration will likely be difficult and time
consuming …
11
ORACLE CONFIDENTIAL
12. Without Continuous Integration
”HEAD”
1 2 3 4 5 6 Build
Check
out
Integrate
1 Change
1’
… it also means that when the next build happens, it is
much more likely to have errors due to inconsistencies
introduced by all these small changes made by
different developers.
12
ORACLE CONFIDENTIAL
13. With Continuous Integration
”HEAD”
1 Build
Check
out
1
With continuous integration, we build every time there
is a commit to HEAD. When we want to make
changes we check out from version control …
13
ORACLE CONFIDENTIAL
14. With Continuous Integration
”HEAD”
1 Build 2 Build
Check
out
1 Change
1’
… and make our changes. We should make fewer
changes between commits to minimize the integration
burden. Other developers will still be making changes
in parallel and we will build when they commit ...
14
ORACLE CONFIDENTIAL
15. With Continuous Integration
”HEAD”
1 Build 2 Build 3 Build 4
Check
out
Integrate
1 Change
1’
… so when we come to integrate our changes, there is
(so the theory goes) less work for us to do. We will
also know very quickly if we have broken the build
(minutes instead of days/weeks).
15
ORACLE CONFIDENTIAL
16. Continuous Integration – Key Practices
• Continuous Integration is characterized by these key
practices:
• Use of version control system
• All developers commit to the HEAD every day
• Build on every commit
• The build must be automated and fast
• Automated deployment to a production-like environment
• Automated testing
• Results of all builds are published (so everyone can see who
broke the build)
• Deliverables are easily available (for developers, testers,
other stakeholders)
16
ORACLE CONFIDENTIAL
17. Agenda
• Introduction – What is Continuous Integration?
• Building Blocks
• Subversion
• Maven
• Hudson
• Alternatives
• The WebLogic Maven Plugin
• The SCA build process
• Handling MDS
• Handling Task Forms
• Putting it all together
17
18. Building Blocks - Subversion
• We need a version control system and Subversion is
arguably the best choice for us today
• It is widely used and understood
• It is well integrated with our other building blocks (Maven,
Hudson)
• It is well integrated with JDeveloper
• It can be used with strong authentication and through proxies,
VPNs, etc.
18
ORACLE CONFIDENTIAL
19. Building Blocks - Subversion
• Subversion is used to:
• Store our source artifacts
• Share them between developers
• Manage versions of artifacts
19
ORACLE CONFIDENTIAL
20. Agenda
• Introduction – What is Continuous Integration?
• Building Blocks
• Subversion
• Maven
• Hudson
• Alternatives
• The WebLogic Maven Plugin
• The SCA build process
• Handling MDS
• Handling Task Forms
• Putting it all together
20
21. Building Blocks - Maven
• Maven is a project management and build
management system
• Project management in terms of:
• Managing naming and version numbering
• Managing dependencies
• Managing where source code is stored
• Managing where builds are stored
• Managing templates for project types
• Managing the release process
21
ORACLE CONFIDENTIAL
22. Building Blocks - Maven
• Maven is a project management and build
management system
• Build management in terms of:
• How to execute the build
• What to do in each phase
• Parameterization of the build
• An extensible framework
22
ORACLE CONFIDENTIAL
23. Maven Build Lifecycle
• Maven is based around the central concept of a build
lifecycle
• The process for building and distributing a particular artifact
(project) is clearly defined
• Only necessary to learn a small set of commands to build any
Maven project, the POM ensures the project is built correctly
• default, clean, site!
• Build lifecycles are further defined by a set of build phases
• A build phase represents a stage in the lifecycle
• Executed sequentially to complete the default lifecycle
• Build phase made up of goals
• Phases are composed of goals that perform actual tasks
• Default goal bindings for standard lifecycle phases
• Plugins contribute additional goals to project
23
24. Maven Default Lifecycle
test: test the compiled
validate: ensure the source code using a
project is correct and all compile: compile the suitable unit testing
necessary information is source code of the project framework; tests should
available not require the code be
packaged or deployed
integration-test: process package: take the
verify: run checks to verify and deploy the package if compiled code and
the package is valid and necessary into an package it in its
meets quality criteria environment where distributable format, such
integration tests can be run as a JAR, WAR, etc.
deploy: for final release,
install: install the package copies the final package to
into the local repository, for
the remote repository for
use as a dependency in
sharing with other
other projects locally
developers and projects.
h"p://maven.apache.org/guides/introduc5on/introduc5on-‐to-‐the-‐lifecycle.html
24
25. The Maven Process: End-to-End
Input
Output
Maven
Plugins
Project
pom.xml
Local Build
Maven
repository package
Custom
plugins
25
26. Agenda
• Introduction – What is Continuous Integration?
• Building Blocks
• Subversion
• Maven
• Hudson
• Alternatives
• The WebLogic Maven Plugin
• The SCA build process
• Handling MDS
• Handling Task Forms
• Putting it all together
26
27. Building Blocks - Hudson
• Hudson is a
common
Continuous
Integration
server
• It is based around
the concept of a
‘job’
• The Hudson
dashboard
displays status of
all jobs
27
28. Building Blocks - Hudson
• Builds can be
automatically
triggered from
SCM changes
• Jobs can be
created directly
from a Maven
project
• Can execute any
combination of
Maven goals
28
29. Building Blocks - Hudson
• Allows automatic
deployment to
WLS and SOA on
an SCM change
• Integration tests
can be run against
applications and
composites on
WLS/SOA
• Results reported
in build status
29
30. Agenda
• Introduction – What is Continuous Integration?
• Building Blocks
• Subversion
• Maven
• Hudson
• Alternatives
• The WebLogic Maven Plugin
• The SCA build process
• Handling MDS
• Handling Task Forms
• Putting it all together
30
31. Alternatives
• Version control
• git
• Allows distributed version control and offline commit
• Seen as becoming more popular
• Has some integration with JDeveloper too
• CVS
• Works fine, but recommend not using the SCM polling in
Hudson/Jenkins with CVS due to CVS versioning model
(every file)
• Continuous Integration
• Hudson/Jenkins
• Continuum
31
ORACLE CONFIDENTIAL
32. Agenda
• Introduction – What is Continuous Integration?
• Building Blocks
• Subversion
• Maven
• Hudson
• Alternatives
• The WebLogic Maven Plugin
• The SCA build process
• Handling MDS
• Handling Task Forms
• Putting it all together
32
33. The WebLogic Maven Plugin
• WebLogic Server 11g R1 (10.3.4) provides an
official Maven plugin to perform application
deployment operations
• Maven Mojo + WebLogic Deployer + WebLogic Client
• Supports the deployment of Maven projects to
WebLogic Server directly from Maven
• No need to use console or command line deployment
utility
• Can be wired into Maven lifecycle to automate
deployment for specific goals
33
35. Agenda
• Introduction – What is Continuous Integration?
• Building Blocks
• Subversion
• Maven
• Hudson
• Alternatives
• The WebLogic Maven Plugin
• The SCA build process
• Handling MDS
• Handling Task Forms
• Putting it all together
35
36. The SCA build process
• SCA builds are done using a set of ANT build files
and tasks
• Called ‘under the covers’ by JDeveloper
• Or from the command line (so they can be automated)
36
ORACLE CONFIDENTIAL
37. The SCA build process
ant-sca-compile.xml, target: scac
scac.input: The location of the composite.xml
scac.application.home: The location of the Application directory
ant-sca-package.xml, target: package
compositeName: The name of the composite (will show up in EM)
compositeDir: The directory containing the composite
revision: The version number for the composite
scac.application.home: The location of the Application directory
37
ORACLE CONFIDENTIAL
38. The SCA build process
ant-sca-deploy.xml, target: deploy
serverURL: The URL of the SOA instance
user: The user to do the deployment
password: The deploying user's password
sarLocation: The location of the SAR file
overwrite: Overwrite existing deployments with
same revision?
forceDefault: Make this version the default version?
partition: Which SOA partition to deploy into
ant-sca-test.xml, target: test
jndi.properties.input The name of the JNDI properties file
scatest.input The name of the composite to test
scatest.format The format for the results – “junit”
scatest.result The relative path to store the results in
38
ORACLE CONFIDENTIAL
39. Agenda
• Introduction – What is Continuous Integration?
• Building Blocks
• Subversion
• Maven
• Hudson
• Alternatives
• The WebLogic Maven Plugin
• The SCA build process
• Handling MDS
• Handling Task Forms
• Putting it all together
39
40. Some service components depend on
Metadata Services (MDS)
• For example:
• Human Tasks consume XSD from MDS
• Rules consume XSD from MDS
• You may also choose to deploy canonical data models,
abstract service definitions, etc. to MDS
• Your project will need an MDS connection defined in
adf-config.xml, either:
• File-based MDS, or
• Database MDS
• And you must specify scac.application.home
40
ORACLE CONFIDENTIAL
41. Agenda
• Introduction – What is Continuous Integration?
• Building Blocks
• Subversion
• Maven
• Hudson
• Alternatives
• The WebLogic Maven Plugin
• The SCA build process
• Handling MDS
• Handling Task Forms
• Putting it all together
41
42. Handling Task Forms
• To build task form UI projects, we need to use the
ojdeploy utility which is part of JDeveloper
• This means the build servers need access to an
installation of JDeveloper
• We call ojdeploy using the exec-maven-plugin and
pass in:
• workspace The name of the JWS file
• Profile The name of the deployment profile
• Clean To rebuild all
42
ORACLE CONFIDENTIAL
43. Agenda
• Introduction – What is Continuous Integration?
• Building Blocks
• Subversion
• Maven
• Hudson
• Alternatives
• The WebLogic Maven Plugin
• The SCA build process
• Handling MDS
• Handling Task Forms
• Putting it all together
43
44. Putting it all together (without ADF)
MDS
refers to
ADF config
contains
44
ORACLE CONFIDENTIAL
45. Putting it all together (with ADF)
45
ORACLE CONFIDENTIAL
46. Agenda
• Introduction – What is Continuous Integration?
• Building Blocks
• Subversion
• Maven
• Hudson
• Alternatives
• The WebLogic Maven Plugin
• The SCA build process
• Handling MDS
• Handling Task Forms
• Putting it all together
46
47. More information about Continuous Integration
for Oracle Fusion Middleware is available on
my blog:
http://redstack.wordpress.com
Watch the blog for more detail leading up to
OpenWorld and also for coverage of other
products – OSB, ADF, WebCenter…
47
ORACLE CONFIDENTIAL
48. Join us at Oracle OpenWorld 2011
• Learn more about Continuous Integration for SOA/
BPM at Oracle Develop, including:
• Handling resources (JDBC, JMS, etc)
• Parameterization of the build
• Dependencies between projects
• Using Maven Archetypes
• Harvesting assets into OER
48
ORACLE CONFIDENTIAL
49. <Insert Picture Here>
Continuous Integration for Oracle SOA Suite and Oracle
Unified Business Process Management Suite
Mark Nelson
Consulting Solution Architect
The A-Team