Question

I was asked about the possibility of creating an ANT script that could be use to copy property files (associated to target environment), create an EAR file (perhaps using JDeveloper deploy file), and deploy that EAR file to target OC4J container.

I am asking if anyone ever successfully invoking JDeveloper automatically to create the EAR file by using specified 'deploy' file by using ANT? OR is it possible to by pass invoking JDeveloper at all. Is there any sample ANT code snippet to do so, or any information/hint that could be useful.

Thanks.

Was it helpful?

Solution

I would advise against using JDevelopers for creating an EAR file because I strongly believe that a build process must be autosufficient (i.e. as few external dependencies as possible).

Using Ant, you can simply use the Ear task (remember that the Ear task is a subtask of the Zip task, i.e. you can also use zipfileset inside the ear task).

I've never used OC4J but usually the deployment of an EAR file is just a matter of copying the file into the right directory (so a simple copy task would suffice).

OTHER TIPS

If you use ADF Business Components (BC) then you must use ojdeploy. Otherwise your BC will not get validated and your deployment will fail.

ojdeploy requires JDeveloper installation (ouch!) and will produce an EAR based on JDeveloper's deployment profiles .

(Although it's an old thread, I added something cos you never know.)

Check out the ojdeploy command in the jdev\bin directory it will let you use JDeveloper's depoyment profiles from a command line.

I found that all the ant tasks used by jDeveloper are in the (default) directory: C:\Oracle\Middleware\jdeveloper\bin

I believe you can copy them to a build server and use them directly

They are the files it uses when you right click and select Deploy from the interface

You can build your own JDeveloper Deployment Profile Interpreter program and generate a Ant file from the Deployment Profile. I have done it before. Tim

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top