SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

MySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLMySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
 
Automated master failover
Automated master failoverAutomated master failover
Automated master failover
 
Query logging with proxysql
Query logging with proxysqlQuery logging with proxysql
Query logging with proxysql
 
Weblogic12 c installation guide
Weblogic12 c installation guideWeblogic12 c installation guide
Weblogic12 c installation guide
 
seven-ways-to-run-flink-on-aws.pdf
seven-ways-to-run-flink-on-aws.pdfseven-ways-to-run-flink-on-aws.pdf
seven-ways-to-run-flink-on-aws.pdf
 
MySQL GTID 시작하기
MySQL GTID 시작하기MySQL GTID 시작하기
MySQL GTID 시작하기
 
Kafka error handling patterns and best practices | Hemant Desale and Aruna Ka...
Kafka error handling patterns and best practices | Hemant Desale and Aruna Ka...Kafka error handling patterns and best practices | Hemant Desale and Aruna Ka...
Kafka error handling patterns and best practices | Hemant Desale and Aruna Ka...
 
PostgreSQL
PostgreSQLPostgreSQL
PostgreSQL
 
MySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software TestMySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software Test
 
Federated Engine 실무적용사례
Federated Engine 실무적용사례Federated Engine 실무적용사례
Federated Engine 실무적용사례
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability
 
Acing the amazing Elastic Certified Engineer Exam (APAC Version)
Acing the amazing Elastic Certified Engineer Exam (APAC Version)Acing the amazing Elastic Certified Engineer Exam (APAC Version)
Acing the amazing Elastic Certified Engineer Exam (APAC Version)
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansible
 
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best PracticesMySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
 
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
 
Maxscale switchover, failover, and auto rejoin
Maxscale switchover, failover, and auto rejoinMaxscale switchover, failover, and auto rejoin
Maxscale switchover, failover, and auto rejoin
 
Maria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High AvailabilityMaria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High Availability
 
New lessons in connection management
New lessons in connection managementNew lessons in connection management
New lessons in connection management
 
How to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScaleHow to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScale
 
Mongodb backup
Mongodb backupMongodb backup
Mongodb backup
 

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

Semelhante a 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...
 

Mais de Getting value from IoT, Integration and Data Analytics

Mais 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
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
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...
 
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
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
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?
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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...
 

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