SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Webpack Introduction
Webpack IntroductionWebpack Introduction
Webpack Introduction
 
Introduction à Angular
Introduction à AngularIntroduction à Angular
Introduction à Angular
 
WebLogic Deployment Plan Example
WebLogic Deployment Plan ExampleWebLogic Deployment Plan Example
WebLogic Deployment Plan Example
 
Angular 8
Angular 8 Angular 8
Angular 8
 
React JS - Introduction
React JS - IntroductionReact JS - Introduction
React JS - Introduction
 
React Js Simplified
React Js SimplifiedReact Js Simplified
React Js Simplified
 
Webpack slides
Webpack slidesWebpack slides
Webpack slides
 
N-Tier Application Architecture
N-Tier Application ArchitectureN-Tier Application Architecture
N-Tier Application Architecture
 
Angular
AngularAngular
Angular
 
React JS
React JSReact JS
React JS
 
Introduction to react js
Introduction to react jsIntroduction to react js
Introduction to react js
 
Microservices Interview Questions and Answers | Microservices Architecture Tr...
Microservices Interview Questions and Answers | Microservices Architecture Tr...Microservices Interview Questions and Answers | Microservices Architecture Tr...
Microservices Interview Questions and Answers | Microservices Architecture Tr...
 
Intro to React
Intro to ReactIntro to React
Intro to React
 
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...
 
Angular 14.pptx
Angular 14.pptxAngular 14.pptx
Angular 14.pptx
 
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
 
An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.js
 
Angular Directives
Angular DirectivesAngular Directives
Angular Directives
 
Docker basics
Docker basicsDocker basics
Docker basics
 
Oracle Webcenter Suite Overview
Oracle Webcenter Suite OverviewOracle Webcenter Suite Overview
Oracle Webcenter Suite Overview
 

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

Ähnlich wie 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...
 

Mehr von Getting value from IoT, Integration and Data Analytics

Mehr von 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
 

Kürzlich hochgeladen

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
 

Kürzlich hochgeladen (20)

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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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...
 
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
 
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
 
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?
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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
 
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 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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

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