coherence managed coherence servers - part 3 - maven integration

15
Managed Coherence Servers – WebLogic Sever Part 3 – Maven Integration Tim Middleton - Solutions Architect – Oracle Coherence Development <Insert Picture Here>

Upload: oracle-coherence

Post on 10-Nov-2014

1.506 views

Category:

Technology


1 download

DESCRIPTION

Watch on YouTube: http://www.youtube.com/watch?v=RyW8wao86qM

TRANSCRIPT

Page 1: Coherence Managed Coherence Servers - Part 3 - Maven Integration

Managed Coherence Servers – WebLogic SeverPart 3 – Maven Integration

Tim Middleton - Solutions Architect – Oracle Coherence Development

<Insert Picture Here>

Page 2: Coherence Managed Coherence Servers - Part 3 - Maven Integration

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.2

See “Part 1 – Introduction and use-cases”

Page 3: Coherence Managed Coherence Servers - Part 3 - Maven Integration

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.3

• Maven Recap• WebLogic Server & Coherence Maven Support• Demonstration

Agenda

Page 4: Coherence Managed Coherence Servers - Part 3 - Maven Integration

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.4

• Maven is a build and dependency system allowing the configuration of project dependencies, 3rd party dependencies and the definition of a build lifecycle

• In terms of development there are a number of areas Maven attempts to help with:– Making the build process easy– Providing a uniform build system– Providing quality project information– Providing guidelines for best practices development– Allowing transparent migration to new features

Maven Recap

Page 5: Coherence Managed Coherence Servers - Part 3 - Maven Integration

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.5

• Maven Recap• WebLogic Server & Coherence Support• Demonstration

Agenda

Page 6: Coherence Managed Coherence Servers - Part 3 - Maven Integration

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.6

• Seamless integration between Oracle Home and Maven repositories

• Standardize Maven usage and naming conventions

• GAR Archetype support • GAR packaging type support for use with WLS

deploy plugin• Support for generation of POF configuration

file on creation of a GAR• WebLogic Maven Deploy Plugin

WebLogic & Coherence Maven Support

Maven Sync PluginOracle Home

Enterprise Maven

Repository

Development Environment

Production Environment

Page 7: Coherence Managed Coherence Servers - Part 3 - Maven Integration

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.7

• Our Example EAR Application contains– GAR with all artifacts for running Coherence Application,

POJO’s, Cache Configuration, etc.– WAR with JSP’s and Java Beans

• Maven project pom.xml filespom.xml

gar/pom.xml

servlet/pom.xml

ear/pom.xml

Example Configuration

Page 8: Coherence Managed Coherence Servers - Part 3 - Maven Integration

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.8

• Maven pom.xml filespom.xml

gar/pom.xml

servlet/pom.xml

ear/pom.xml

Example Configuration – Base pom.xmlInclude WebLogic Maven Plugin Configuration

<plugin> <groupId>com.oracle.weblogic</groupId> <artifactId>wls-maven-plugin</artifactId> <version>12.1.2.0</version> <configuration> <adminurl>t3://localhost:7001</adminurl> <user>weblogic</user> <password>welcome1</password> <action>deploy</action> <remote>false</remote> <verbose>true</verbose> <source>ear/target/ear-1.0.ear</source> <middlewareHome>/u01/Middleware </middlewareHome> <name>ExampleEAR</name> </configuration></plugin>

Page 9: Coherence Managed Coherence Servers - Part 3 - Maven Integration

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.9

• Maven pom.xml filespom.xml

gar/pom.xml

servlet/pom.xml

ear/pom.xml

Example Configuration – GAR pom.xmlInclude Coherence and Configure POF Generation

<project > ... <packaging>gar</packaging> ... <dependencies> <dependency> <groupId>com.oracle.coherence</groupId> <artifactId>coherence</artifactId> <version>12.1.2-0-0</version> <scope>provided</scope> </dependency> </dependencies> ... <plugin> <groupId>com.oracle.coherence</groupId> <artifactId>maven-gar-plugin</artifactId> <extensions>true</extensions> <configuration> <generatePof>false</generatePof> </configuration> </plugin>

Page 10: Coherence Managed Coherence Servers - Part 3 - Maven Integration

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.10

• Maven pom.xml filespom.xml

gar/pom.xml

servlet/pom.xml

ear/pom.xml

Example Configuration – Servlet pom.xmlInclude Coherence and GAR Dependencies

... <dependency> <groupId>com.oracle.coherence</groupId> <artifactId>gar</artifactId> <version>1.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.oracle.coherence</groupId> <artifactId>coherence</artifactId> <version>12.1.2-0-0</version> <scope>provided</scope> </dependency>

...

Page 11: Coherence Managed Coherence Servers - Part 3 - Maven Integration

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.11

• Maven pom.xml filespom.xml

gar/pom.xml

servlet/pom.xml

ear/pom.xml

Example Configuration – EAR pom.xmlInclude Coherence and GAR Dependencies

... <plugin> <artifactId>maven-ear-plugin</artifactId> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> </manifest> </archive> <artifactTypeMappings> <artifactTypeMapping type="gar" mapping="jar"/> </artifactTypeMappings> </configuration> </plugin>

...

Page 12: Coherence Managed Coherence Servers - Part 3 - Maven Integration

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.12

• This plugin from Oracle allows you to perform WebLogic deployment and maintenance tasks automatically within maven projects. Some of these tasks include:– Deployment / un-deployment of applciations– Creation of domains– Listing applications – Starting/ stopping servers– Starting/ stopping applications

12

WebLogic Maven Deploy Plugin

Page 13: Coherence Managed Coherence Servers - Part 3 - Maven Integration

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.13

• Maven Recap• WebLogic Server & Coherence Support• Demonstration

Agenda

Page 14: Coherence Managed Coherence Servers - Part 3 - Maven Integration

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.14

• Install oracle-maven-sync plugin• Execute the oracle-maven-sync plugin• Create a new GAR archetype project• Build the Managed Coherence Servers example from

the first screencast using maven• Deploy this using the WebLogic Maven plugin

Demonstration

Page 15: Coherence Managed Coherence Servers - Part 3 - Maven Integration

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.15