SlideShare une entreprise Scribd logo
1  sur  16
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Continuous Integration
Fundamentals
Maven
Joel Nation, Solutions Architect
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
What is Maven?
• Apache open source project
• Maven is:
– An automated build system
– A project management system
– A library and dependency handling system
– A project description system
– A site generation system
• More than just an evolution of ANT
2
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Primary Maven Concepts
• Project Object Model (POM)
– Describes the project, it’s name/version, type, dependencies etc
– Portable
• Convention over Configuration
– Standard directory layout
– Default behaviours for projects
– Automation of build and packaging process
3
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
POM Structure
4
Dependencies
Build
Plugin
Execution
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Dependencies
• Maven looks for dependencies using:
– Group ID / Artifact ID / Version
• Dependencies can be scoped for
– Compile / Test / Packaging / Runtime
• Maven automatically manages the
download
– Obtained from public and/or corporate
repositories
– Stored in local repository for next use
– No need to ship libraries with projecy
5
<dependencies>
<dependency>
<groupId>com.oracle.weblogic</groupId>
<artifactId>weblogic-full</artifactId>
<version>12.1.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Build Lifecycle
6
Validate
Integration-TestVerifyInstallDeploy
TestCompile
Ensure the
project is correct
Compile the
source code
Test the compile code.
Tests should not require
the code be packaged or
deployed
Package the code
(eg: into a JAR)
Process and deploy the
package into an environment
where integration tests can be
run
Copy final
package to
remote
repository
Install the
package into local
repository for use
as a dependency
in other projects
Run checks to
verify the
package is valid
Package
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Typical WebLogic Phases
• Pre-Integration Test
– Install WebLogic, Create Domain, Start Server, Deploy, Start App etc
• Post-Integration Test
– Remove domain, Stop Server, Un-Deploy, Uninstall
• Verify, Install and Deploy are generally not used
• Tests are generally run in Integration-Test as we need to deploy the app to
the server first before testing
7
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Plugins
• Plugins perform the work
• Default set of plugins from Apache
– Eg: Compile JAR, WAR etc
• Plugins can be provided by others
– Automated download from repository
– Can be manually installed
– Oracle provides WebLogic plugins
• Can be executed as standalone goals
– Eg: mvn wls:deploy
• Can be bound to a given lifecycle
– Eg: mvn deploy
8
<plugins>
<plugin>
<groupId>com.oracle.weblogic</groupId>
<artifactId>weblogic-maven-plugin</artifactId>
<version>12.1.3-0-0</version>
</plugin>
</plugins>
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Executions
• Map plugin functions with build
lifecycle
• Will be executed in order
• Configuration mapped to command
arguments
• Access to maven variables
9
<execution>
<id>deploy</id>
<phase>pre-integration-test</phase>
<goals>
<goal>deploy</goal>
</goals>
<configuration>
<user>weblogic</user>
<password>welcome1</password>
<source>${project.build.directory}/${project.build.finalName}.${project.packaging}</source>
<verbose>true</verbose>
<name>${project.build.finalName}</name>
</configuration>
</execution>
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Repositories
• A Maven Repository holds artifacts, dependencies & plugins
• Automatically looks in remote repos for missing dependencies/plugins
• Default Public repo is Maven Central
– http://repo1.maven.org/maven2
• You can add more repo’s as required
– Eg: Java Repo: http://download.java.net/maven2
• Can create a corporate repository
10
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Archetype
• A project template
• Allows consistent projects with best practices
• Oracle provides a number of archetypes
– Basic Web-apps
– J2EE Apps
– SOA Apps
11
mvn archetype:generate
-DarchetypeGroupId=com.oracle.weblogic.archetype
-DarchetypeArtifactId=basic-webapp -DarchetypeVersion=12.1.3-0-0
-DgroupId=com.oracle.canberra -DartifactId=my-webapp
-Dversion=1.0-SNAPSHOT
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Demo 1: Maven Archetype
12
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Maven & Continuous Integration
13
Local WLS
Temp WLS
Compile
Create WLS
Create Domain
Deploy
Test
Undeploy
Remove Domain
Uninstall
Version Control
System
?
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Demo 2: Install WebLogic w/ Maven
https://github.com/Joelith/Maven-Install-WLS
14
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
• Introduced with 10.3.4
– Maven Mojo + WebLogic Deployer + WebLogic
Client
– Supports: list-apps, deploy/undeploy, start,
stop and update
• 12.1.2
– Embedded maven repo
– Maven Synchronization plugin
– New archetypes/projects
15
• 12.1.1
– Can install WebLogic zip distribution where
WebLogic has not been installed
– WebLogic Domain Creation
– Execute WLST scripts
• 12.1.3
– wlst-client goal to run online WLST without
local WebLogic
WebLogic Support
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
More Information
• Oracle Maven Integration Documentation
– http://docs.oracle.com/middleware/1213/wls/WLPRG/maven.htm#CHDCDGCG
• RedStack Maven Posts
– http://redstack.wordpress.com/tag/maven/
• Our blog
– http://ofmcanberra.wordpress.com
16

Contenu connexe

Tendances

開放原始碼 Ch1.2 intro - oss - apahce foundry (ver 2.0)
開放原始碼 Ch1.2   intro - oss - apahce foundry (ver 2.0)開放原始碼 Ch1.2   intro - oss - apahce foundry (ver 2.0)
開放原始碼 Ch1.2 intro - oss - apahce foundry (ver 2.0)
My own sweet home!
 
Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)
Gunith Devasurendra
 
Getting Reactive with Spring Framework 5.0’s GA release
Getting Reactive with Spring Framework 5.0’s GA releaseGetting Reactive with Spring Framework 5.0’s GA release
Getting Reactive with Spring Framework 5.0’s GA release
VMware Tanzu
 
How maven makes your development group look like a bunch of professionals.
How maven makes your development group look like a bunch of professionals.How maven makes your development group look like a bunch of professionals.
How maven makes your development group look like a bunch of professionals.
Fazreil Amreen Abdul Jalil
 
Next Generation Development Infrastructure: Maven, m2eclipse, Nexus & Hudson ...
Next Generation Development Infrastructure: Maven, m2eclipse, Nexus & Hudson ...Next Generation Development Infrastructure: Maven, m2eclipse, Nexus & Hudson ...
Next Generation Development Infrastructure: Maven, m2eclipse, Nexus & Hudson ...
EclipseDayParis
 

Tendances (20)

Java APIs- The missing manual (concurrency)
Java APIs- The missing manual (concurrency)Java APIs- The missing manual (concurrency)
Java APIs- The missing manual (concurrency)
 
開放原始碼 Ch1.2 intro - oss - apahce foundry (ver 2.0)
開放原始碼 Ch1.2   intro - oss - apahce foundry (ver 2.0)開放原始碼 Ch1.2   intro - oss - apahce foundry (ver 2.0)
開放原始碼 Ch1.2 intro - oss - apahce foundry (ver 2.0)
 
Java 11 OMG
Java 11 OMGJava 11 OMG
Java 11 OMG
 
WebSocket in Enterprise Applications 2015
WebSocket in Enterprise Applications 2015WebSocket in Enterprise Applications 2015
WebSocket in Enterprise Applications 2015
 
Introduction to Maven
Introduction to MavenIntroduction to Maven
Introduction to Maven
 
Enabling .NET Apps with Monitoring and Management Using Steeltoe
Enabling .NET Apps with Monitoring and Management Using SteeltoeEnabling .NET Apps with Monitoring and Management Using Steeltoe
Enabling .NET Apps with Monitoring and Management Using Steeltoe
 
Connecting Connect with Spring Boot
Connecting Connect with Spring BootConnecting Connect with Spring Boot
Connecting Connect with Spring Boot
 
Introduction to Apache Maven
Introduction to Apache MavenIntroduction to Apache Maven
Introduction to Apache Maven
 
Spring boot
Spring bootSpring boot
Spring boot
 
Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)
 
Introduction To Core Java - SpringPeople
Introduction To Core Java - SpringPeopleIntroduction To Core Java - SpringPeople
Introduction To Core Java - SpringPeople
 
Getting Reactive with Spring Framework 5.0’s GA release
Getting Reactive with Spring Framework 5.0’s GA releaseGetting Reactive with Spring Framework 5.0’s GA release
Getting Reactive with Spring Framework 5.0’s GA release
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Java APIs - the missing manual
Java APIs - the missing manualJava APIs - the missing manual
Java APIs - the missing manual
 
SpringBoot
SpringBootSpringBoot
SpringBoot
 
BP-5 Application Lifecycle Management
BP-5 Application Lifecycle ManagementBP-5 Application Lifecycle Management
BP-5 Application Lifecycle Management
 
Springboot and camel
Springboot and camelSpringboot and camel
Springboot and camel
 
Maven
MavenMaven
Maven
 
How maven makes your development group look like a bunch of professionals.
How maven makes your development group look like a bunch of professionals.How maven makes your development group look like a bunch of professionals.
How maven makes your development group look like a bunch of professionals.
 
Next Generation Development Infrastructure: Maven, m2eclipse, Nexus & Hudson ...
Next Generation Development Infrastructure: Maven, m2eclipse, Nexus & Hudson ...Next Generation Development Infrastructure: Maven, m2eclipse, Nexus & Hudson ...
Next Generation Development Infrastructure: Maven, m2eclipse, Nexus & Hudson ...
 

Similaire à Continuous Integration Fundamentals: Maven - OFM Canberra July 2014

Similaire à Continuous Integration Fundamentals: Maven - OFM Canberra July 2014 (20)

Introduction to maven
Introduction to mavenIntroduction to maven
Introduction to maven
 
Mavennotes.pdf
Mavennotes.pdfMavennotes.pdf
Mavennotes.pdf
 
A-Z_Maven.pdf
A-Z_Maven.pdfA-Z_Maven.pdf
A-Z_Maven.pdf
 
Introduction to Maven for beginners and DevOps
Introduction to Maven for beginners and DevOpsIntroduction to Maven for beginners and DevOps
Introduction to Maven for beginners and DevOps
 
Em13c New Features- Two of Two
Em13c New Features- Two of TwoEm13c New Features- Two of Two
Em13c New Features- Two of Two
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest Istanbul
 
Lecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdfLecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdf
 
JDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDKJDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDK
 
What is maven
What is mavenWhat is maven
What is maven
 
Maven
MavenMaven
Maven
 
Maven
MavenMaven
Maven
 
Java Community and Overview Track - March 2016
Java Community and Overview Track - March 2016Java Community and Overview Track - March 2016
Java Community and Overview Track - March 2016
 
Maven Basics - Explained
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - Explained
 
Tech talk live alfresco add ons
Tech talk live alfresco add onsTech talk live alfresco add ons
Tech talk live alfresco add ons
 
Introduction tomaven
Introduction tomavenIntroduction tomaven
Introduction tomaven
 
Continuous Integration Fundamentals: Build Automation - OFM Canberra October ...
Continuous Integration Fundamentals: Build Automation - OFM Canberra October ...Continuous Integration Fundamentals: Build Automation - OFM Canberra October ...
Continuous Integration Fundamentals: Build Automation - OFM Canberra October ...
 
Extending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.jsExtending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.js
 
Oracle ADF Architecture TV - Development - Version Control
Oracle ADF Architecture TV - Development - Version ControlOracle ADF Architecture TV - Development - Version Control
Oracle ADF Architecture TV - Development - Version Control
 
BMO - Intelligent Projects with Maven
BMO - Intelligent Projects with MavenBMO - Intelligent Projects with Maven
BMO - Intelligent Projects with Maven
 
Mastering DevOps with Oracle
Mastering DevOps with Oracle Mastering DevOps with Oracle
Mastering DevOps with Oracle
 

Plus de Joelith

Plus de Joelith (7)

API Gateway - OFM Canberra October 2014
API Gateway - OFM Canberra October 2014API Gateway - OFM Canberra October 2014
API Gateway - OFM Canberra October 2014
 
OSB Exception Handling Logging - OFM Canberra September 2014
OSB Exception Handling Logging - OFM Canberra September 2014OSB Exception Handling Logging - OFM Canberra September 2014
OSB Exception Handling Logging - OFM Canberra September 2014
 
Mobile Application Framework - OFM Canberra September 2014
Mobile Application Framework - OFM Canberra September 2014Mobile Application Framework - OFM Canberra September 2014
Mobile Application Framework - OFM Canberra September 2014
 
Coherence Overview - OFM Canberra July 2014
Coherence Overview - OFM Canberra July 2014Coherence Overview - OFM Canberra July 2014
Coherence Overview - OFM Canberra July 2014
 
WebLogic Performance Monitoring - OFM Canberra July 2014
WebLogic Performance Monitoring - OFM Canberra July 2014WebLogic Performance Monitoring - OFM Canberra July 2014
WebLogic Performance Monitoring - OFM Canberra July 2014
 
High Availability and Disaster Recovery Topologies - OMF Canberra June 2014
High Availability and Disaster Recovery Topologies - OMF Canberra June 2014High Availability and Disaster Recovery Topologies - OMF Canberra June 2014
High Availability and Disaster Recovery Topologies - OMF Canberra June 2014
 
WebLogic 12c - OMF Canberra June 2014
WebLogic 12c - OMF Canberra June 2014WebLogic 12c - OMF Canberra June 2014
WebLogic 12c - OMF Canberra June 2014
 

Dernier

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Dernier (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Continuous Integration Fundamentals: Maven - OFM Canberra July 2014

  • 1. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Continuous Integration Fundamentals Maven Joel Nation, Solutions Architect
  • 2. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | What is Maven? • Apache open source project • Maven is: – An automated build system – A project management system – A library and dependency handling system – A project description system – A site generation system • More than just an evolution of ANT 2
  • 3. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Primary Maven Concepts • Project Object Model (POM) – Describes the project, it’s name/version, type, dependencies etc – Portable • Convention over Configuration – Standard directory layout – Default behaviours for projects – Automation of build and packaging process 3
  • 4. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | POM Structure 4 Dependencies Build Plugin Execution
  • 5. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Dependencies • Maven looks for dependencies using: – Group ID / Artifact ID / Version • Dependencies can be scoped for – Compile / Test / Packaging / Runtime • Maven automatically manages the download – Obtained from public and/or corporate repositories – Stored in local repository for next use – No need to ship libraries with projecy 5 <dependencies> <dependency> <groupId>com.oracle.weblogic</groupId> <artifactId>weblogic-full</artifactId> <version>12.1.1</version> <scope>compile</scope> </dependency> </dependencies>
  • 6. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Build Lifecycle 6 Validate Integration-TestVerifyInstallDeploy TestCompile Ensure the project is correct Compile the source code Test the compile code. Tests should not require the code be packaged or deployed Package the code (eg: into a JAR) Process and deploy the package into an environment where integration tests can be run Copy final package to remote repository Install the package into local repository for use as a dependency in other projects Run checks to verify the package is valid Package
  • 7. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Typical WebLogic Phases • Pre-Integration Test – Install WebLogic, Create Domain, Start Server, Deploy, Start App etc • Post-Integration Test – Remove domain, Stop Server, Un-Deploy, Uninstall • Verify, Install and Deploy are generally not used • Tests are generally run in Integration-Test as we need to deploy the app to the server first before testing 7
  • 8. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Plugins • Plugins perform the work • Default set of plugins from Apache – Eg: Compile JAR, WAR etc • Plugins can be provided by others – Automated download from repository – Can be manually installed – Oracle provides WebLogic plugins • Can be executed as standalone goals – Eg: mvn wls:deploy • Can be bound to a given lifecycle – Eg: mvn deploy 8 <plugins> <plugin> <groupId>com.oracle.weblogic</groupId> <artifactId>weblogic-maven-plugin</artifactId> <version>12.1.3-0-0</version> </plugin> </plugins>
  • 9. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Executions • Map plugin functions with build lifecycle • Will be executed in order • Configuration mapped to command arguments • Access to maven variables 9 <execution> <id>deploy</id> <phase>pre-integration-test</phase> <goals> <goal>deploy</goal> </goals> <configuration> <user>weblogic</user> <password>welcome1</password> <source>${project.build.directory}/${project.build.finalName}.${project.packaging}</source> <verbose>true</verbose> <name>${project.build.finalName}</name> </configuration> </execution>
  • 10. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Repositories • A Maven Repository holds artifacts, dependencies & plugins • Automatically looks in remote repos for missing dependencies/plugins • Default Public repo is Maven Central – http://repo1.maven.org/maven2 • You can add more repo’s as required – Eg: Java Repo: http://download.java.net/maven2 • Can create a corporate repository 10
  • 11. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Archetype • A project template • Allows consistent projects with best practices • Oracle provides a number of archetypes – Basic Web-apps – J2EE Apps – SOA Apps 11 mvn archetype:generate -DarchetypeGroupId=com.oracle.weblogic.archetype -DarchetypeArtifactId=basic-webapp -DarchetypeVersion=12.1.3-0-0 -DgroupId=com.oracle.canberra -DartifactId=my-webapp -Dversion=1.0-SNAPSHOT
  • 12. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Demo 1: Maven Archetype 12
  • 13. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Maven & Continuous Integration 13 Local WLS Temp WLS Compile Create WLS Create Domain Deploy Test Undeploy Remove Domain Uninstall Version Control System ?
  • 14. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Demo 2: Install WebLogic w/ Maven https://github.com/Joelith/Maven-Install-WLS 14
  • 15. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | • Introduced with 10.3.4 – Maven Mojo + WebLogic Deployer + WebLogic Client – Supports: list-apps, deploy/undeploy, start, stop and update • 12.1.2 – Embedded maven repo – Maven Synchronization plugin – New archetypes/projects 15 • 12.1.1 – Can install WebLogic zip distribution where WebLogic has not been installed – WebLogic Domain Creation – Execute WLST scripts • 12.1.3 – wlst-client goal to run online WLST without local WebLogic WebLogic Support
  • 16. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | More Information • Oracle Maven Integration Documentation – http://docs.oracle.com/middleware/1213/wls/WLPRG/maven.htm#CHDCDGCG • RedStack Maven Posts – http://redstack.wordpress.com/tag/maven/ • Our blog – http://ofmcanberra.wordpress.com 16