SlideShare une entreprise Scribd logo
1  sur  22
Application Lifecycle Management in JDeveloper 12c
Aino Andriessen, 14 aug 2013
JDeveloper 12c and Maven
ALM before 12c
• Focus on declarative development
• Application Lifecycle Management as an afterthought
– JDeveloper tasks
• Build
• Deploy
• Code analysis
– Dependent on JDeveloper installation
• 'internal' libraries
• ojdeploy
• Relative / hard-coded paths
– Build Magic
– Limited or no support for build tools like Ant and Maven.
– Subversion support comes late, is unintuitive and thus hardly used
– Team Productivity Center
3
What about 12c?
• Full Maven support in the entire Fusion Middleware stack
• Subversion 1.7 client
• Git support (since 11.1.1.6 (v2))
• Better code analysis (ojaudit)
• Ant support is slightly improved
• Application level build files (since 11.1.1.5)
• But still dependent on JDeveloper installation
4
5
What is Maven?
• Project description
– pom.xml
• Lifecycle
• 'Tasks'
– Provided by plugins
• sources, compiler, surefire, jar, war, ear, scm, assembly, release,
enforcer, sql, …
– Goals
• compiler:compile, compiler:testCompile, surefire:test, jar:jar, war:war,
war:manifest, scm:tag, scm:checkin, …
– can be bound to lifecycle phases
• Dependency Management
• Artifact repository
6
Maven dependency
management
• An "artifact" is something produced by the software development process
-> deliverable
• An artifact is identified by GroupId, ArtifactId, Version
• A dependency is an artifact needed by the project
– e.g. JUnit, Hibernate, commons-lang, …
• Transitive dependencies
– Dependencies of dependencies
• Bill of Materials
– Artifact that only contains dependencies
<dependencies>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.3</version>
<scope>compile</compiler>
<type>jar</jar>
</dependency>
…
</dependencies>
7
Artifact Repository
• Repositories store artifacts
– Repository Manager
• Used by Maven for
– plugins
– dependencies
• local
– ~/.m2/repository
– configure in settings.xml
– classpath
• central
– http://repo1.maven.org/maven2/
• The first execution of a plugin or requirement for a
dependency pulls the artifact from central and caches it
locally
• Internal / Organization
– Company artifacts
– Third party
– Proxy
central
local
Project
internal
8
9
Fusion Middleware and Maven
• Maven 3.0.4
• ADF, WLS, Coherence
• Create  enable Maven project
• pom editor
• Dependency management
– ADF (and other) libraries
• jars and Bill of Materials
• Repository synchronization plug-in
– To load dependencies from Middleware in internal and local
– Not a public repository
• Maven plugins
• Maven Archetypes
• …
• Maven is all over JDeveloper!!
10
Maven project
• Create Project and define Maven as build tool
• Mavenize existing project
• Create from archetype
• Import Maven project
11
pom editor
• Fairly complete
– No properties
– No editing for developers, organization, scm, ci, issue mgt, …
– No distributionManagement
– Profile editing is minimal
• sync with jpr
• Source editor
– with code completion
• Effective pom
• Search and add dependencies
• Include unittests
12
Pom editor - dependencies
13
Goal execution
• Right mouse on pom.xml
• Configure Goal profile
• No toolbar button
• No custom (plugin) goals or combinations
14
Plugins
• ADF
– ojmake
• can be used for applications and projects that don't involve any deployment, for example, projects with no
deployment profile defined.
– ojdeploy
• can handle the build of any application and project (including any that involve deployment). You can think of it
as a super-set of ojmake.
• WebLogic Maven Plugin
– (un)install (server), start/stop-server, create-domain, (un)(re)deploy, wlst, appc, ws-
jwsc, …
• Coherence Maven Plugin aka maven-gar-plugin
– package, …
15
Using ojdeploy / ojmake
• Environment dependencies :-(
– Use properties, environment variables or '-D' (preferences - additional settings) for workstation
configuration
– Use ${basedir} for build root
• slow: ojmake and ojdeploy are always executed (even if files are already compiled)
<plugin>
<groupId>com.oracle.adf.plugin</groupId>
<artifactId>ojdeploy</artifactId>
<version>12.1.2-0-0</version>
<configuration>
<ojdeploy>C:oracleMiddleware12.1.2.0.0jdeveloperjdevbinojdeploy.exe</ojdeploy>
<workspace>C:projectsprobeerselsHR12cHR12c.jws</workspace>
<project>ViewController</project>
<profile>HR12cVC_adflib HR12c_Project1_webapp</profile>
<usemaven>true</usemaven>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
17
Repository synchronization
plug-in
• Populate a Maven repository from a given Oracle home with the Oracle
specific libraries
• Sync to local is also done automagically from JDeveloper
1. Install plug-in in internal repository
2. Run the Oracle Maven Synchronization Plug-In
1. populate local and internal
3. [Update archetype catalogs]
4. Redo when updating JDev
• http://docs.oracle.com/middleware/1212/core/MAVEN/config_maven.htm
19
20
Issues
• Pom editor not complete
• Hard coded local dependencies (ojdeploy, ojmake)
• ojdeploy / ojmake are slow, always fully executed
– Artifact name is defined in build profile
• No Maven project structure (src/main/java)
• I couldn't get the BC Unittests to execute (can't find connection)
• 'Bending the Maven multi-module way'
– Parent has modules, but childs don't reference the parent
– No inheritance
– No dependencyManagement usage
– Use parent pom to build ear
• Defaults are not always chosen wisely
• Can't continue failed build
• Not able to run custom goals
21
Summary
• Fairly complete Maven support
• It seems to work!
• pom - jpr sync
• Still dependent on JDeveloper
• Still issues
• Don't use Maven as a full build replacement when working in JDeveloper
22
23
More info
• Articles:
– http://www.oracle.com/technetwork/developer-tools/jdev/documentation/1212-nf-
1964675.html#12c(12.1.2.0.0)NewFeatures-TeamDevelopment
– http://redstack.wordpress.com/2013/06/11/new-maven-support-in-fusion-middleware-
12-1-2/
– https://groups.google.com/forum/?hl=en#!topic/adf-methodology/3xRjN7qnA94
– http://download.oracle.com/otn_hosted_doc/jdeveloper/12cdemos/Maven_in_12c/Ma
ven_in_12c.html
– http://docs.oracle.com/middleware/1212/core/MAVEN/introduction.htm#MAVEN8755
• Fusion Middleware Documentation
– http://docs.oracle.com/middleware/1212/wls/WLPRG/maven.htm
24

Contenu connexe

Tendances

Tendances (20)

Swagger
SwaggerSwagger
Swagger
 
Introduction to Node JS.pdf
Introduction to Node JS.pdfIntroduction to Node JS.pdf
Introduction to Node JS.pdf
 
Gradle Introduction
Gradle IntroductionGradle Introduction
Gradle Introduction
 
Event Driven Microservices architecture
Event Driven Microservices architectureEvent Driven Microservices architecture
Event Driven Microservices architecture
 
TypeScript: coding JavaScript without the pain
TypeScript: coding JavaScript without the painTypeScript: coding JavaScript without the pain
TypeScript: coding JavaScript without the pain
 
Maven Overview
Maven OverviewMaven Overview
Maven Overview
 
Node.Js: Basics Concepts and Introduction
Node.Js: Basics Concepts and Introduction Node.Js: Basics Concepts and Introduction
Node.Js: Basics Concepts and Introduction
 
Monitoring real-life Azure applications: When to use what and why
Monitoring real-life Azure applications: When to use what and whyMonitoring real-life Azure applications: When to use what and why
Monitoring real-life Azure applications: When to use what and why
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
 
The Point of Vue - Intro to Vue.js
The Point of Vue - Intro to Vue.jsThe Point of Vue - Intro to Vue.js
The Point of Vue - Intro to Vue.js
 
Reactjs workshop (1)
Reactjs workshop (1)Reactjs workshop (1)
Reactjs workshop (1)
 
Angular overview
Angular overviewAngular overview
Angular overview
 
JavaFX Presentation
JavaFX PresentationJavaFX Presentation
JavaFX Presentation
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Spring Data JPA from 0-100 in 60 minutes
Spring Data JPA from 0-100 in 60 minutesSpring Data JPA from 0-100 in 60 minutes
Spring Data JPA from 0-100 in 60 minutes
 
React state managmenet with Redux
React state managmenet with ReduxReact state managmenet with Redux
React state managmenet with Redux
 
DevOps overview 2019-04-13 Nelkinda April Meetup
DevOps overview  2019-04-13 Nelkinda April MeetupDevOps overview  2019-04-13 Nelkinda April Meetup
DevOps overview 2019-04-13 Nelkinda April Meetup
 
Scripting languages
Scripting languagesScripting languages
Scripting languages
 
Python Django tutorial | Getting Started With Django | Web Development With D...
Python Django tutorial | Getting Started With Django | Web Development With D...Python Django tutorial | Getting Started With Django | Web Development With D...
Python Django tutorial | Getting Started With Django | Web Development With D...
 

Similaire à Oracle 12c Launch Event 02 ADF 12c and Maven in Jdeveloper / By Aino Andriessen

Similaire à Oracle 12c Launch Event 02 ADF 12c and Maven in Jdeveloper / By Aino Andriessen (20)

Maven introduction in Mule
Maven introduction in MuleMaven introduction in Mule
Maven introduction in Mule
 
Maven
MavenMaven
Maven
 
Maven
MavenMaven
Maven
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest Istanbul
 
Maven in Mule
Maven in MuleMaven in Mule
Maven in Mule
 
Maven
MavenMaven
Maven
 
Maven
MavenMaven
Maven
 
Maven
MavenMaven
Maven
 
Introduction tomaven
Introduction tomavenIntroduction tomaven
Introduction tomaven
 
Apache Maven
Apache MavenApache Maven
Apache Maven
 
A-Z_Maven.pdf
A-Z_Maven.pdfA-Z_Maven.pdf
A-Z_Maven.pdf
 
Training in Android with Maven
Training in Android with MavenTraining in Android with Maven
Training in Android with Maven
 
BMO - Intelligent Projects with Maven
BMO - Intelligent Projects with MavenBMO - Intelligent Projects with Maven
BMO - Intelligent Projects with Maven
 
Maven
MavenMaven
Maven
 
Maven
MavenMaven
Maven
 
S/W Design and Modularity using Maven
S/W Design and Modularity using MavenS/W Design and Modularity using Maven
S/W Design and Modularity using Maven
 
An introduction to maven gradle and sbt
An introduction to maven gradle and sbtAn introduction to maven gradle and sbt
An introduction to maven gradle and sbt
 
Maven
MavenMaven
Maven
 
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
 
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
 

Plus de Getting value from IoT, Integration and Data Analytics

Plus de Getting value from IoT, Integration and Data Analytics (20)

AMIS Oracle OpenWorld en Code One Review 2018 - Blockchain, Integration, Serv...
AMIS Oracle OpenWorld en Code One Review 2018 - Blockchain, Integration, Serv...AMIS Oracle OpenWorld en Code One Review 2018 - Blockchain, Integration, Serv...
AMIS Oracle OpenWorld en Code One Review 2018 - Blockchain, Integration, Serv...
 
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: Custom Application ...
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: Custom Application ...AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: Custom Application ...
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: Custom Application ...
 
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaS
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaSAMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaS
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaS
 
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Data
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: DataAMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Data
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Data
 
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Cloud Infrastructure
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Cloud Infrastructure AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Cloud Infrastructure
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Cloud Infrastructure
 
10 tips voor verbetering in je Linkedin profiel
10 tips voor verbetering in je Linkedin profiel10 tips voor verbetering in je Linkedin profiel
10 tips voor verbetering in je Linkedin profiel
 
Iot in de zorg the next step - fit for purpose
Iot in de zorg   the next step - fit for purpose Iot in de zorg   the next step - fit for purpose
Iot in de zorg the next step - fit for purpose
 
Iot overview .. Best practices and lessons learned by Conclusion Conenct
Iot overview .. Best practices and lessons learned by Conclusion Conenct Iot overview .. Best practices and lessons learned by Conclusion Conenct
Iot overview .. Best practices and lessons learned by Conclusion Conenct
 
IoT Fit for purpose - how to be successful in IOT Conclusion Connect
IoT Fit for purpose - how to be successful in IOT Conclusion Connect IoT Fit for purpose - how to be successful in IOT Conclusion Connect
IoT Fit for purpose - how to be successful in IOT Conclusion Connect
 
Industry and IOT Overview of protocols and best practices Conclusion Connect
Industry and IOT Overview of protocols and best practices  Conclusion ConnectIndustry and IOT Overview of protocols and best practices  Conclusion Connect
Industry and IOT Overview of protocols and best practices Conclusion Connect
 
IoT practical case using the people counter sensing traffic density build usi...
IoT practical case using the people counter sensing traffic density build usi...IoT practical case using the people counter sensing traffic density build usi...
IoT practical case using the people counter sensing traffic density build usi...
 
R introduction decision_trees
R introduction decision_treesR introduction decision_trees
R introduction decision_trees
 
Introduction overviewmachinelearning sig Door Lucas Jellema
Introduction overviewmachinelearning sig Door Lucas JellemaIntroduction overviewmachinelearning sig Door Lucas Jellema
Introduction overviewmachinelearning sig Door Lucas Jellema
 
IoT and the Future of work
IoT and the Future of work IoT and the Future of work
IoT and the Future of work
 
Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)
Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)
Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)
 
Ethereum smart contracts - door Peter Reitsma
Ethereum smart contracts - door Peter ReitsmaEthereum smart contracts - door Peter Reitsma
Ethereum smart contracts - door Peter Reitsma
 
Blockchain - Techniek en usecases door Robert van Molken - AMIS - Conclusion
Blockchain - Techniek en usecases door Robert van Molken - AMIS - ConclusionBlockchain - Techniek en usecases door Robert van Molken - AMIS - Conclusion
Blockchain - Techniek en usecases door Robert van Molken - AMIS - Conclusion
 
kennissessie blockchain - Wat is Blockchain en smart contracts @Conclusion
kennissessie blockchain -  Wat is Blockchain en smart contracts @Conclusion kennissessie blockchain -  Wat is Blockchain en smart contracts @Conclusion
kennissessie blockchain - Wat is Blockchain en smart contracts @Conclusion
 
Internet of Things propositie - Enterprise IOT - AMIS - Conclusion
Internet of Things propositie - Enterprise IOT - AMIS - Conclusion Internet of Things propositie - Enterprise IOT - AMIS - Conclusion
Internet of Things propositie - Enterprise IOT - AMIS - Conclusion
 
Omc AMIS evenement 26012017 Dennis van Soest
Omc AMIS evenement 26012017 Dennis van SoestOmc AMIS evenement 26012017 Dennis van Soest
Omc AMIS evenement 26012017 Dennis van Soest
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

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
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
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...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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...
 
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
 

Oracle 12c Launch Event 02 ADF 12c and Maven in Jdeveloper / By Aino Andriessen

  • 1. Application Lifecycle Management in JDeveloper 12c Aino Andriessen, 14 aug 2013 JDeveloper 12c and Maven
  • 2. ALM before 12c • Focus on declarative development • Application Lifecycle Management as an afterthought – JDeveloper tasks • Build • Deploy • Code analysis – Dependent on JDeveloper installation • 'internal' libraries • ojdeploy • Relative / hard-coded paths – Build Magic – Limited or no support for build tools like Ant and Maven. – Subversion support comes late, is unintuitive and thus hardly used – Team Productivity Center
  • 3. 3 What about 12c? • Full Maven support in the entire Fusion Middleware stack • Subversion 1.7 client • Git support (since 11.1.1.6 (v2)) • Better code analysis (ojaudit) • Ant support is slightly improved • Application level build files (since 11.1.1.5) • But still dependent on JDeveloper installation
  • 4. 4
  • 5. 5 What is Maven? • Project description – pom.xml • Lifecycle • 'Tasks' – Provided by plugins • sources, compiler, surefire, jar, war, ear, scm, assembly, release, enforcer, sql, … – Goals • compiler:compile, compiler:testCompile, surefire:test, jar:jar, war:war, war:manifest, scm:tag, scm:checkin, … – can be bound to lifecycle phases • Dependency Management • Artifact repository
  • 6. 6 Maven dependency management • An "artifact" is something produced by the software development process -> deliverable • An artifact is identified by GroupId, ArtifactId, Version • A dependency is an artifact needed by the project – e.g. JUnit, Hibernate, commons-lang, … • Transitive dependencies – Dependencies of dependencies • Bill of Materials – Artifact that only contains dependencies <dependencies> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.3</version> <scope>compile</compiler> <type>jar</jar> </dependency> … </dependencies>
  • 7. 7 Artifact Repository • Repositories store artifacts – Repository Manager • Used by Maven for – plugins – dependencies • local – ~/.m2/repository – configure in settings.xml – classpath • central – http://repo1.maven.org/maven2/ • The first execution of a plugin or requirement for a dependency pulls the artifact from central and caches it locally • Internal / Organization – Company artifacts – Third party – Proxy central local Project internal
  • 8. 8
  • 9. 9 Fusion Middleware and Maven • Maven 3.0.4 • ADF, WLS, Coherence • Create enable Maven project • pom editor • Dependency management – ADF (and other) libraries • jars and Bill of Materials • Repository synchronization plug-in – To load dependencies from Middleware in internal and local – Not a public repository • Maven plugins • Maven Archetypes • … • Maven is all over JDeveloper!!
  • 10. 10 Maven project • Create Project and define Maven as build tool • Mavenize existing project • Create from archetype • Import Maven project
  • 11. 11 pom editor • Fairly complete – No properties – No editing for developers, organization, scm, ci, issue mgt, … – No distributionManagement – Profile editing is minimal • sync with jpr • Source editor – with code completion • Effective pom • Search and add dependencies • Include unittests
  • 12. 12 Pom editor - dependencies
  • 13. 13 Goal execution • Right mouse on pom.xml • Configure Goal profile • No toolbar button • No custom (plugin) goals or combinations
  • 14. 14 Plugins • ADF – ojmake • can be used for applications and projects that don't involve any deployment, for example, projects with no deployment profile defined. – ojdeploy • can handle the build of any application and project (including any that involve deployment). You can think of it as a super-set of ojmake. • WebLogic Maven Plugin – (un)install (server), start/stop-server, create-domain, (un)(re)deploy, wlst, appc, ws- jwsc, … • Coherence Maven Plugin aka maven-gar-plugin – package, …
  • 15. 15 Using ojdeploy / ojmake • Environment dependencies :-( – Use properties, environment variables or '-D' (preferences - additional settings) for workstation configuration – Use ${basedir} for build root • slow: ojmake and ojdeploy are always executed (even if files are already compiled) <plugin> <groupId>com.oracle.adf.plugin</groupId> <artifactId>ojdeploy</artifactId> <version>12.1.2-0-0</version> <configuration> <ojdeploy>C:oracleMiddleware12.1.2.0.0jdeveloperjdevbinojdeploy.exe</ojdeploy> <workspace>C:projectsprobeerselsHR12cHR12c.jws</workspace> <project>ViewController</project> <profile>HR12cVC_adflib HR12c_Project1_webapp</profile> <usemaven>true</usemaven> </configuration> <executions> <execution> <phase>package</phase> <goals> <goal>deploy</goal> </goals> </execution> </executions> </plugin>
  • 16. 17 Repository synchronization plug-in • Populate a Maven repository from a given Oracle home with the Oracle specific libraries • Sync to local is also done automagically from JDeveloper 1. Install plug-in in internal repository 2. Run the Oracle Maven Synchronization Plug-In 1. populate local and internal 3. [Update archetype catalogs] 4. Redo when updating JDev • http://docs.oracle.com/middleware/1212/core/MAVEN/config_maven.htm
  • 17. 19
  • 18. 20 Issues • Pom editor not complete • Hard coded local dependencies (ojdeploy, ojmake) • ojdeploy / ojmake are slow, always fully executed – Artifact name is defined in build profile • No Maven project structure (src/main/java) • I couldn't get the BC Unittests to execute (can't find connection) • 'Bending the Maven multi-module way' – Parent has modules, but childs don't reference the parent – No inheritance – No dependencyManagement usage – Use parent pom to build ear • Defaults are not always chosen wisely • Can't continue failed build • Not able to run custom goals
  • 19. 21 Summary • Fairly complete Maven support • It seems to work! • pom - jpr sync • Still dependent on JDeveloper • Still issues • Don't use Maven as a full build replacement when working in JDeveloper
  • 20. 22
  • 21. 23 More info • Articles: – http://www.oracle.com/technetwork/developer-tools/jdev/documentation/1212-nf- 1964675.html#12c(12.1.2.0.0)NewFeatures-TeamDevelopment – http://redstack.wordpress.com/2013/06/11/new-maven-support-in-fusion-middleware- 12-1-2/ – https://groups.google.com/forum/?hl=en#!topic/adf-methodology/3xRjN7qnA94 – http://download.oracle.com/otn_hosted_doc/jdeveloper/12cdemos/Maven_in_12c/Ma ven_in_12c.html – http://docs.oracle.com/middleware/1212/core/MAVEN/introduction.htm#MAVEN8755 • Fusion Middleware Documentation – http://docs.oracle.com/middleware/1212/wls/WLPRG/maven.htm
  • 22. 24