If you have been following our series of posts on Continuous Integration, you will have seen that we have got SCA composites containing various components including BPEL, BPMN, Spring and Rules and also SCA Test working in a Hudson/Maven/Subversion continuous integration environment. In this post, we will extend this to include ADF Human Task UI projects.
Before we dive in, let’s take a look at the overall structure so we can see how this all fits together. There are a lot of arrows on this diagram, but don’t worry, its not as complicated as it looks.
When we build a BPM or SOA application in JDeveloper, we put it in a ‘Project’ which is kept inside an ‘Application.’ The SOA/BPM project contains the composite, all of our WSDLs, XSDs, adapter configurations, and so on. The application contains some metadata that is used during build and deployment, importantly for our purposes, it contains the adf-config.xml file which is used to identify which MDS we want to use (if any), and it contains the EAR deployment profile for the human task UI projects.
In addition to this, for every human task we create an ADF UI for, we will have another project to hold that UI. In the example above, we have two such ADF Human Task UI projects in the application.
In this case, the EAR deployment profile in the application will include the two Human Task UI projects. Here is an example of what this looks like. In this example oj1 and oj2 are the Human Task UI projects.
So, in order to automate this build, we need to take two separate sets of actions:
- We need to compile, package, deploy (and maybe test and paramterize) the composite (SAR)
- We need to compile and package the Human Task UI projects into WARs and then package those WARs into an EAR and deploy that EAR
To orchestrate this, we will use the Maven Reactor function – which allows us to build multiple projects as part of the build. The way this works is actually pretty simple. First we have a top level Maven POM, which we will put in the application, as opposed to one of the projects. You can see it on the diagram above. In this POM, we point to the two ‘modules’ that make up the build, i.e. the two POMs in the composite project and the first Human Task UI project. We only need one POM for all of the Human Task UI projects because we are packaging them all up into a single EAR for deployment.
The POM in the composite project will then be much like the ones we have seen earlier in this series of posts. It will point to the ant-sca-compile, ant-sca-package, ant-sca-deploy, and ant-sca-test ANT tasks, and to the adf-config.xml for the MDS configuration. I wont go over this, as it is covered in the previous posts.
The POM in the Human Task UI project is new and different, so we will look at it more closely. It uses the ojdeploy utility that is included with JDeveloper to compile and package the Human Task UIs into WARs and then an EAR. It then uses the WebLogic Maven Plugin (also covered previously) to deploy the EAR to WebLogic Server.
So, now that we have the overall picture of how this hangs together, let’s look into the details.
One important thing to note though! The use of ojdeploy in the build means that the build server must have JDeveloper installed on it.
Here is an example of what the top level POM looks like:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>OJ</groupId> <artifactId>TOP</artifactId> <version>1.0-SNAPSHOT</version> <packaging>pom</packaging> <scm> <connection>scm:svn:https://administrator@bpm.mark.oracle.com/svn/OJ/trunk</connection> <developerConnection>scm:svn:https://administrator@bpm.mark.oracle.com/svn/OJ/trunk</developerConnection> </scm> <modules> <!-- FIRST WE HANDLE THE COMPOSITE --> <module>OJ</module> <!-- THEN THE TASK UI PROJECTS --> <module>oj1</module> </modules> <build> <plugins> <!-- AGGREGATE JUNIT TEST RESULTS --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> <version>2.4.2</version> <configuration> <aggregate>true</aggregate> </configuration> </plugin> </plugins> </build> <distributionManagement> <!-- use the following if you're not using a snapshot version. --> <repository> <id>local</id> <name>local repository</name> <url>file:///c:/users/administrator/.m2/repository</url> </repository> <!-- use the following if you ARE using a snapshot version. --> <snapshotRepository> <id>localSnapshot</id> <name>local snapshot repository</name> <url>file:///c:/users/administrator/.m2/repository</url> </snapshotRepository> </distributionManagement> </project>
There are two interesting things to note here. First the modules section, which identifies the two project-level POMs . The names of the modulse must be the same as the names of directories at the same level as this POM which contains the POM for the project. Conveniently, JDeveloper keeps the projects in a subdirectory of the application directory, so this is nice and easy for us to do. When you create the application (top) level POM, make sure you put it in the application directory, not a project directory.
In our example, it is in c:\JDeveloper\mywork\OJ and the project level POMs are in c:\JDeveloper\mywork\OJ\OJ and c:\JDeveloper\mywork\OJ\oj1 for the composite and Human Task UIs respectively.
The second thing to note is the configuration for maven-surefire-report-plugin. This allows us to aggregate the test results (if any) from all of the modules. This means that the SCA Test results will be available in the Hudson console. It means we dont need to use the ‘freestyle’ project like we did in the SCA Test post, we can use the Maven2 project type.
Here is the POM for the composite project:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>OJ</groupId> <artifactId>OJ</artifactId> <version>1.0-SNAPSHOT</version> <parent> <groupId>OJ</groupId> <artifactId>TOP</artifactId> <version>1.0-SNAPSHOT</version> </parent> <dependencies> </dependencies> <build> <plugins> <plugin> <artifactId>maven-antrun-plugin</artifactId> <version>1.6</version> <executions> <execution> <id>sca-compile</id> <phase>compile</phase> <configuration> <target> <property name="scac.input" value="${basedir}/composite.xml" /> <property name="scac.application.home" value="${basedir}/.." /> <ant antfile="c:/Oracle/Middleware/Oracle_SOA1/bin/ant-sca-compile.xml" dir="c:/Oracle/Middleware/Oracle_SOA1/bin" target="scac" /> </target> </configuration> <goals> <goal>run</goal> </goals> </execution> <execution> <id>sca-package</id> <phase>package</phase> <configuration> <target> <property name="build.compiler" value="extJavac"/> <property name="compositeName" value="${project.artifactId}" /> <property name="compositeDir" value="${basedir}" /> <property name="revision" value="${project.version}" /> <property name="scac.application.home" value="${basedir}/.." /> <ant antfile="c:/Oracle/Middleware/Oracle_SOA1/bin/ant-sca-package.xml" dir="c:/Oracle/Middleware/Oracle_SOA1/bin" target="package" /> </target> </configuration> <goals> <goal>run</goal> </goals> </execution> <execution> <id>sca-deploy</id> <phase>deploy</phase> <configuration> <target> <property name="serverURL" value="http://bpm.mark.oracle.com:7001" /> <property name="user" value="weblogic" /> <property name="password" value="welcome1" /> <property name="sarLocation" value="${basedir}/deploy/sca_${project.artifactId}_rev${project.version}.jar" /> <property name="overwrite" value="true" /> <property name="forceDefault" value="true" /> <property name="partition" value="default" /> <!-- <property name="configplan" value="${basedir}/OJ_cfgplan.xml" /> --> <ant antfile="c:/Oracle/Middleware/Oracle_SOA1/bin/ant-sca-deploy.xml" dir="c:/Oracle/Middleware/Oracle_SOA1/bin" target="deploy" /> </target> </configuration> <goals> <goal>run</goal> </goals> </execution> <execution> <id>sca-test</id> <phase>deploy</phase> <configuration> <target> <property name="jndi.properties.input" value="c:/Oracle/Middleware/sca-test.jndi.properties" /> <property name="scatest.input" value="OJ" /> <property name="scatest.format" value="junit" /> <property name="scatest.result" value="reports" /> <ant antfile="c:/Oracle/Middleware/Oracle_SOA1/bin/ant-sca-test.xml" dir="c:/Oracle/Middleware/Oracle_SOA1/bin" target="test" /> </target> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project>
This is the same as the POMs we have already seen, with one exception: I have added a parent section that points back to the top level POM. I also commented out the SOA configuration plan line in there, of course you can add one if you have one.
Now, here is the POM for the Human Task UI projects:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>OJ</groupId> <artifactId>oj1</artifactId> <version>1.0-SNAPSHOT</version> <packaging>ear</packaging> <parent> <groupId>OJ</groupId> <artifactId>TOP</artifactId> <version>1.0-SNAPSHOT</version> </parent> <build> <plugins> <!-- USE OJDEPLOY TO MAKE THE EAR --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <configuration> <executable>c:/oracle/middleware/jdeveloper/jdev/bin/ojdeploy</executable> <arguments> <argument>-workspace</argument> <argument>${basedir}/${project.artifactId}.jws</argument> <argument>-profile</argument> <argument>${basedir}/deploy/${project.artifactId}.ear</argument> <argument>-clean</argument> </arguments> </configuration> <executions> <execution> <id>ojdeploy</id> <phase>deploy</phase> <goals> <goal>exec</goal> </goals> </execution> </executions> </plugin> <!-- WEBLOGIC MAVEN PLUGIN CONFIG - TO DEPLOY THE EAR --> <plugin> <groupId>com.oracle.weblogic</groupId> <artifactId>weblogic-maven-plugin</artifactId> <version>10.3.4</version> <configuration> <adminurl>t3://bpm.mark.oracle.com:7001</adminurl> <user>weblogic</user> <password>welcome1</password> <name>${project.artifactId}</name> <remote>true</remote> <upload>true</upload> <targets>AdminServer</targets> </configuration> <executions> <execution> <id>deploy</id> <phase>deploy</phase> <goals> <goal>deploy</goal> </goals> <configuration> <source>deploy/${project.artifactId}.ear</source> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>
Again, this has a parent section that points back to the top level POM. Then we use the exec-maven-plugin to execute the ojdeploy utility. You can see the configuration that passes in the necessary information. The command that gets executed will look like this:
c:\oracle\middleware\jdeveloper\jdev\bin\ojdeploy -workspace c:\jdeveloper\mywork\oj\oj.jws -profile oj1 -clean
In this command, the workspace parameter points to the JDeveloper Workspace (JWS) file for the application (not project). The profile parameter is the name of the deployment profile in the application (not porject) that is used to build the EAR – we looked at this earlier. The clean option tells it to delete any previous output and rebuild the whole thing.
Special thanks to Ali Mukadam who tested this and helped me find and correct a problem with my POM which meant that ojdeploy was not being executed.
Running this will cause all of the Human Task UI projects that are included in the deployment profile’s assembly (which should be all of them) into WARs, it will then package all of those WARs into an EAR. It actually injects some ADF metadata that is needed at runtime in there, which is why we need to use ojdeploy rather than just building the WARs and EAR ourselves using normal Maven functionality – believe me, I tried 🙂
Once that is done, we use the WebLogic Maven Plugin to deploy the EAR to WebLogic. Again, we have seen the use of this plugin before (here for example), so I wont go over it.
Now that we have all this in place (and your adf-config.xml set up for MDS – see here) you need to check the application (not the project(s), the application) into Subversion. You do this using the Version… option in the Application menu. Then you can set up your job in Hudson (as we have done before) using the Maven2 project type and point it to your Subversion root and the top level POM.
Here is example output from a successful build for reference:
Started by user anonymous Updating https://bpm.mark.oracle.com/svn/OJ/trunk revision: Aug 10, 2011 11:31:32 AM depth:infinity ignoreExternals: false At revision 5 no change for https://bpm.mark.oracle.com/svn/OJ/trunk since the previous build Found mavenVersion 2.2.1 from file jar:file:/c:/apache-maven-2.2.1/lib/maven-2.2.1-uber.jar!/META-INF/maven/org.apache.maven/maven-core/pom.properties Parsing POMs [workspace] $ c:\java\jdk1.6.0_25/bin/java -classpath c:\Oracle\Middleware\oracle_common\modules\oracle.mds_11.1.1\oramds.jar -cp C:\hudson\plugins\maven-plugin\WEB-INF\lib\maven-agent-2.0.1.jar;c:\apache-maven-2.2.1\boot\classworlds-1.1.jar hudson.maven.agent.Main c:\apache-maven-2.2.1 C:\hudson\war\WEB-INF\lib\hudson-remoting-2.0.1.jar C:\hudson\plugins\maven-plugin\WEB-INF\lib\maven-interceptor-2.0.1.jar 51707 C:\hudson\plugins\maven-plugin\WEB-INF\lib\maven2.1-interceptor-1.2.jar <===[HUDSON REMOTING CAPACITY]===>���channel started Executing Maven: -B -f C:\hudson\jobs\OJ\workspace\pom.xml clean deploy [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] Unnamed - OJ:TOP:pom:1.0-SNAPSHOT [INFO] Unnamed - OJ:OJ:jar:1.0-SNAPSHOT [INFO] Unnamed - OJ:oj1:ear:1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] Building Unnamed - OJ:TOP:pom:1.0-SNAPSHOT [INFO] task-segment: [clean, deploy] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] [site:attach-descriptor {execution: default-attach-descriptor}] [INFO] [install:install {execution: default-install}] [INFO] Installing C:\hudson\jobs\OJ\workspace\pom.xml to C:\.m2\repository\OJ\TOP\1.0-SNAPSHOT\TOP-1.0-SNAPSHOT.pom [INFO] [deploy:deploy {execution: default-deploy}] [INFO] Retrieving previous build number from localSnapshot Uploading: file:///c:/users/administrator/.m2/repository/OJ/TOP/1.0-SNAPSHOT/TOP-1.0-20110810.013138-4.pom 1K uploaded (TOP-1.0-20110810.013138-4.pom) [INFO] Retrieving previous metadata from localSnapshot [INFO] Uploading repository metadata for: 'snapshot OJ:TOP:1.0-SNAPSHOT' [INFO] Retrieving previous metadata from localSnapshot [INFO] Uploading repository metadata for: 'artifact OJ:TOP' [HUDSON] Archiving C:\hudson\jobs\OJ\workspace\pom.xml to C:\hudson\jobs\OJ\modules\OJ$TOP\builds\2011-08-10_11-31-33\archive\OJ\TOP\1.0-SNAPSHOT\pom.xml [HUDSON] Archiving C:\.m2\repository\OJ\TOP\1.0-SNAPSHOT\TOP-1.0-SNAPSHOT.pom to C:\hudson\jobs\OJ\modules\OJ$TOP\builds\2011-08-10_11-31-33\archive\OJ\TOP\1.0-20110810.013138-4\TOP-1.0-SNAPSHOT.pom [INFO] ------------------------------------------------------------------------ [INFO] Building Unnamed - OJ:OJ:jar:1.0-SNAPSHOT [INFO] task-segment: [clean, deploy] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting directory C:\hudson\jobs\OJ\workspace\OJ\target [INFO] [resources:resources {execution: default-resources}] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\hudson\jobs\OJ\workspace\OJ\src\main\resources [INFO] [compiler:compile {execution: default-compile}] [INFO] No sources to compile [INFO] [antrun:run {execution: sca-compile}] [INFO] Executing tasks main: scac: Validating composite "C:\hudson\jobs\OJ\workspace\OJ/composite.xml" [scac] warning: in oj1.task: Task title not specified [scac] warning: in oj1.task: Error assignee not specified [scac] warning: in oj1.task: Payload not specified [scac] warning: in oj2.task: Task title not specified [scac] warning: in oj2.task: Error assignee not specified [scac] warning: in oj2.task: Payload not specified [INFO] Executed tasks [INFO] [resources:testResources {execution: default-testResources}] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\hudson\jobs\OJ\workspace\OJ\src\test\resources [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] No sources to compile [INFO] [surefire:test {execution: default-test}] [INFO] No tests to run. [HUDSON] Recording test results [INFO] [jar:jar {execution: default-jar}] [WARNING] JAR will be empty - no content was marked for inclusion! [INFO] Building jar: C:\hudson\jobs\OJ\workspace\OJ\target\OJ-1.0-SNAPSHOT.jar [INFO] [antrun:run {execution: sca-package}] [INFO] Executing tasks main: [echo] oracle.home = c:\Oracle\Middleware\Oracle_SOA1\bin/.. [input] skipping input as property compositeDir has already been set. [input] skipping input as property compositeName has already been set. [input] skipping input as property revision has already been set. clean: [echo] deleting C:\hudson\jobs\OJ\workspace\OJ/deploy/sca_OJ_rev1.0-SNAPSHOT.jar [delete] Deleting: C:\hudson\jobs\OJ\workspace\OJ\deploy\sca_OJ_rev1.0-SNAPSHOT.jar init: scac-validate: [echo] Running scac-validate in C:\hudson\jobs\OJ\workspace\OJ/composite.xml [echo] oracle.home = c:\Oracle\Middleware\Oracle_SOA1\bin/.. [input] skipping input as property compositeDir has already been set. [input] skipping input as property compositeName has already been set. [input] skipping input as property revision has already been set. scac: Validating composite "C:\hudson\jobs\OJ\workspace\OJ/composite.xml" [scac] warning: in oj1.task: Task title not specified [scac] warning: in oj1.task: Error assignee not specified [scac] warning: in oj1.task: Payload not specified [scac] warning: in oj2.task: Task title not specified [scac] warning: in oj2.task: Error assignee not specified [scac] warning: in oj2.task: Payload not specified package: [echo] oracle.home = c:\Oracle\Middleware\Oracle_SOA1\bin/.. [input] skipping input as property compositeDir has already been set. [input] skipping input as property compositeName has already been set. [input] skipping input as property revision has already been set. compile-source: [mkdir] Created dir: C:\hudson\jobs\OJ\workspace\OJ\dist [copy] Copying 26 files to C:\hudson\jobs\OJ\workspace\OJ\dist [copy] Warning: C:\hudson\jobs\OJ\workspace\OJ\src does not exist. [copy] Copying 3 files to C:\hudson\jobs\OJ\workspace\OJ\dist\SCA-INF\classes [jar] Building jar: C:\hudson\jobs\OJ\workspace\OJ\deploy\sca_OJ_rev1.0-SNAPSHOT.jar [delete] Deleting directory C:\hudson\jobs\OJ\workspace\OJ\dist [INFO] Executed tasks [INFO] [oracle-sca-advisor:analyze {execution: sca-advisor}] [INFO] ------------------------------------------------------------------------ [INFO] ORACLE SCA ADVISOR - ANALYZE [INFO] ------------------------------------------------------------------------ [INFO] [INFO] Beginning analysis of composite C:\hudson\jobs\OJ\workspace\OJ/composite.xml [INFO] Scanning... [INFO] Checking at least one service is defined... [INFO] Checking at least one component is defined... [INFO] Checking at least one wire is defined... [INFO] Checking whether references are using concrete WSDLs... [INFO] Oracle SCA Advisor Finished [INFO] [INFO] [install:install {execution: default-install}] [INFO] Installing C:\hudson\jobs\OJ\workspace\OJ\target\OJ-1.0-SNAPSHOT.jar to C:\.m2\repository\OJ\OJ\1.0-SNAPSHOT\OJ-1.0-SNAPSHOT.jar [INFO] [deploy:deploy {execution: default-deploy}] [INFO] Retrieving previous build number from localSnapshot Uploading: file:///c:/users/administrator/.m2/repository/OJ/OJ/1.0-SNAPSHOT/OJ-1.0-20110810.013138-3.jar 1K uploaded (OJ-1.0-20110810.013138-3.jar) [INFO] Retrieving previous metadata from localSnapshot [INFO] Uploading repository metadata for: 'snapshot OJ:OJ:1.0-SNAPSHOT' [INFO] Retrieving previous metadata from localSnapshot [INFO] Uploading repository metadata for: 'artifact OJ:OJ' [INFO] Uploading project information for OJ 1.0-20110810.013138-3 [INFO] [antrun:run {execution: sca-deploy}] [INFO] Executing tasks main: [echo] oracle.home = c:\Oracle\Middleware\Oracle_SOA1\bin/.. deploy: [input] skipping input as property serverURL has already been set. [input] skipping input as property sarLocation has already been set. setting user/password..., user=weblogic Processing sar=C:\hudson\jobs\OJ\workspace\OJ/deploy/sca_OJ_rev1.0-SNAPSHOT.jar Adding sar file - C:\hudson\jobs\OJ\workspace\OJ\deploy\sca_OJ_rev1.0-SNAPSHOT.jar INFO: Creating HTTP connection to host:bpm.mark.oracle.com, port:7001 INFO: Received HTTP response from the server, response code=200 ---->Deploying composite success. [INFO] Executed tasks [INFO] [antrun:run {execution: sca-test}] [INFO] Executing tasks main: [echo] Running scatest using oracle.home = c:\Oracle\Middleware\Oracle_SOA1\bin/.. test: [echo] Classpth = c:\Oracle\Middleware\Oracle_SOA1\soa\modules\oracle.soa.fabric_11.1.1\fabric-ext.jar;c:\Oracle\Middleware\Oracle_SOA1\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime.jar;c:\Oracle\Middleware\Oracle_SOA1\soa\modules\oracle.soa.fabric_11.1.1\oracle-soa-client-api.jar;c:\Oracle\Middleware\oracle_common\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar;c:\Oracle\Middleware\Oracle_SOA1\soa\modules\oracle.soa.bpel_11.1.1\orabpel-common.jar;c:\Oracle\Middleware\Oracle_SOA1\soa\modules\oracle.soa.bpel_11.1.1\orabpel.jar;c:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic.jar;c:\Oracle\Middleware\oracle_common\modules\oracle.jps_11.1.1\jps-api.jar;c:\Oracle\Middleware\oracle_common\modules\oracle.jps_11.1.1\jps-common.jar;c:\Oracle\Middleware\oracle_common\modules\oracle.jps_11.1.1\jps-internal.jar;c:\Oracle\Middleware\oracle_common\modules\oracle.jrf_11.1.1\jrf-api.jar;c:\Oracle\Middleware\oracle_common\soa\modules\oracle.soa.mgmt_11.1.1\soa-client-stubs-was.jar;c:\Oracle\Middleware\Oracle_SOA1\bin\${was.home}\runtimes\com.ibm.ws.ejb.thinclient_7.0.0.jar;c:\Oracle\Middleware\Oracle_SOA1\bin\${was.home}\runtimes\com.ibm.ws.orb_7.0.0.jar;c:\Oracle\Middleware\Oracle_SOA1\bin\${was.home}\plugins\com.ibm.ws.runtime.jar;c:\Oracle\Middleware\Oracle_SOA1\bin\${was.home}\runtimes\com.ibm.ws.admin.client_7.0.0.jar [echo] Running scatest using oracle.home = c:\Oracle\Middleware\Oracle_SOA1\bin/.. OJ [echo] Using context = build.properties [echo] Using path = c:\Oracle\Middleware\Oracle_SOA1\soa\modules\oracle.soa.fabric_11.1.1\fabric-ext.jar;c:\Oracle\Middleware\Oracle_SOA1\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime.jar;c:\Oracle\Middleware\Oracle_SOA1\soa\modules\oracle.soa.fabric_11.1.1\oracle-soa-client-api.jar;c:\Oracle\Middleware\oracle_common\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar;c:\Oracle\Middleware\Oracle_SOA1\soa\modules\oracle.soa.bpel_11.1.1\orabpel-common.jar;c:\Oracle\Middleware\Oracle_SOA1\soa\modules\oracle.soa.bpel_11.1.1\orabpel.jar;c:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic.jar;c:\Oracle\Middleware\oracle_common\modules\oracle.jps_11.1.1\jps-api.jar;c:\Oracle\Middleware\oracle_common\modules\oracle.jps_11.1.1\jps-common.jar;c:\Oracle\Middleware\oracle_common\modules\oracle.jps_11.1.1\jps-internal.jar;c:\Oracle\Middleware\oracle_common\modules\oracle.jrf_11.1.1\jrf-api.jar;c:\Oracle\Middleware\oracle_common\soa\modules\oracle.soa.mgmt_11.1.1\soa-client-stubs-was.jar;c:\Oracle\Middleware\Oracle_SOA1\bin\${was.home}\runtimes\com.ibm.ws.ejb.thinclient_7.0.0.jar;c:\Oracle\Middleware\Oracle_SOA1\bin\${was.home}\runtimes\com.ibm.ws.orb_7.0.0.jar;c:\Oracle\Middleware\Oracle_SOA1\bin\${was.home}\plugins\com.ibm.ws.runtime.jar;c:\Oracle\Middleware\Oracle_SOA1\bin\${was.home}\runtimes\com.ibm.ws.admin.client_7.0.0.jar [input] skipping input as property scatest.input has already been set. [input] skipping input as property jndi.properties.input has already been set. [scatest] Junit formatting [scatest] <testsuite name="sca.default-OJ.codeCoverages" errors="0" failures="0" tests="0" time="0.0"/> [scatest] C:\hudson\jobs\OJ\workspace\reports\BPEL-sca.default-OJ.codeCoverages.xml [INFO] Executed tasks [HUDSON] Archiving C:\hudson\jobs\OJ\workspace\OJ\pom.xml to C:\hudson\jobs\OJ\modules\OJ$OJ\builds\2011-08-10_11-31-33\archive\OJ\OJ\1.0-SNAPSHOT\pom.xml [HUDSON] Archiving C:\hudson\jobs\OJ\workspace\OJ\target\OJ-1.0-SNAPSHOT.jar to C:\hudson\jobs\OJ\modules\OJ$OJ\builds\2011-08-10_11-31-33\archive\OJ\OJ\1.0-20110810.013138-3\OJ-1.0-SNAPSHOT.jar [INFO] ------------------------------------------------------------------------ [INFO] Building Unnamed - OJ:oj1:ear:1.0-SNAPSHOT [INFO] task-segment: [clean, deploy] [INFO] ------------------------------------------------------------------------ [INFO] artifact org.codehaus.mojo:exec-maven-plugin: checking for updates from central Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/exec-maven-plugin/1.2/exec-maven-plugin-1.2.pom Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/mojo-parent/24/mojo-parent-24.pom Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/exec-maven-plugin/1.2/exec-maven-plugin-1.2.jar [INFO] [clean:clean {execution: default-clean}] [INFO] [ear:generate-application-xml {execution: default-generate-application-xml}] [INFO] Generating application.xml [INFO] [resources:resources {execution: default-resources}] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\hudson\jobs\OJ\workspace\oj1\src\main\resources [INFO] [ear:ear {execution: default-ear}] [INFO] Could not find manifest file: C:\hudson\jobs\OJ\workspace\oj1\src\main\application\META-INF\MANIFEST.MF - Generating one [INFO] Building jar: C:\hudson\jobs\OJ\workspace\oj1\target\oj1-1.0-SNAPSHOT.ear [INFO] [install:install {execution: default-install}] [INFO] Installing C:\hudson\jobs\OJ\workspace\oj1\target\oj1-1.0-SNAPSHOT.ear to C:\.m2\repository\OJ\oj1\1.0-SNAPSHOT\oj1-1.0-SNAPSHOT.ear [INFO] [deploy:deploy {execution: default-deploy}] [INFO] Retrieving previous build number from localSnapshot [INFO] repository metadata for: 'snapshot OJ:oj1:1.0-SNAPSHOT' could not be found on repository: localSnapshot, so will be created Uploading: file:///c:/users/administrator/.m2/repository/OJ/oj1/1.0-SNAPSHOT/oj1-1.0-20110810.013138-1.ear 2K uploaded (oj1-1.0-20110810.013138-1.ear) [INFO] Retrieving previous metadata from localSnapshot [INFO] repository metadata for: 'artifact OJ:oj1' could not be found on repository: localSnapshot, so will be created [INFO] Uploading repository metadata for: 'artifact OJ:oj1' [INFO] Uploading project information for oj1 1.0-20110810.013138-1 [INFO] Retrieving previous metadata from localSnapshot [INFO] repository metadata for: 'snapshot OJ:oj1:1.0-SNAPSHOT' could not be found on repository: localSnapshot, so will be created [INFO] Uploading repository metadata for: 'snapshot OJ:oj1:1.0-SNAPSHOT' [INFO] [null:deploy {execution: deploy}] weblogic.Deployer invoked with options: -noexit -adminurl t3://bpm.mark.oracle.com:7001 -user weblogic -deploy -name oj1 -source deploy/oj1.ear -targets AdminServer -upload -remote <Aug 10, 2011 11:32:17 AM EST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, oj1 [archive: deploy\oj1.ear], to AdminServer .> Task 0 initiated: [Deployer:149026]deploy application oj1 on AdminServer. Task 0 completed: [Deployer:149026]deploy application oj1 on AdminServer. Target state: deploy completed on Server AdminServer [HUDSON] Archiving C:\hudson\jobs\OJ\workspace\oj1\pom.xml to C:\hudson\jobs\OJ\modules\OJ$oj1\builds\2011-08-10_11-31-33\archive\OJ\oj1\1.0-SNAPSHOT\pom.xml [HUDSON] Archiving C:\hudson\jobs\OJ\workspace\oj1\target\oj1-1.0-SNAPSHOT.ear to C:\hudson\jobs\OJ\modules\OJ$oj1\builds\2011-08-10_11-31-33\archive\OJ\oj1\1.0-20110810.013138-1\oj1-1.0-SNAPSHOT.ear [INFO] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] ------------------------------------------------------------------------ [INFO] Unnamed - OJ:TOP:pom:1.0-SNAPSHOT ..................... SUCCESS [2.494s] [INFO] Unnamed - OJ:OJ:jar:1.0-SNAPSHOT ...................... SUCCESS [28.258s] [INFO] Unnamed - OJ:oj1:ear:1.0-SNAPSHOT ..................... SUCCESS [40.726s] [INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1 minute 12 seconds [INFO] Finished at: Wed Aug 10 11:32:47 EST 2011 [INFO] Final Memory: 42M/633M [INFO] ------------------------------------------------------------------------ channel stopped Finished: SUCCESS
After running the build, everything is deployed in the right place, just as if youdid a deployment from JDeveloper. Enjoy!
Hi Mark,
nice work!
However, I’d very much like to achieve the same, but without using ojdeploy, since it in my oppinion introduces a dependency/coupling (to JDeveloper) which is undesirable in a “pure” ALM setup.
Do you invision that being possible? (ie. using “standard” tools only)
And if yes, are you going to show that in a future posting?
Cheers and thanks!
Kim
Hi Kim, I think that we are stuck with the need to have access to a JDev install for the foreseeable future unfortunately. I am planning to validate that a single JDev install on a SAN/NAS mounted on a number of build servers would work. Mark.
Reblogged this on lava kafle kathmandu nepal.