Is there a way to remotely deploy an EAR after building it to Oracle AS? Remote deployment functionality exists for Eclipse, and I'm looking for something similar for maven2:
A:
This is not a complete answer your question; is's just a checklist for things to look up while solving this:
- what to do with generated sources, when to generate them?
- do you need custom information in META-INF?
- how to manage jars?
- you can have them installed in an external repository, local repository, or specify them with system, on a project relative path, or a system absolute path
- if specified with system, you can keep compile time jars in any location, and those that you want inside wars inside webapp/WEB-INF
If your project has a maven friendly architecture, then ok. Otherwise you can specify custom paths like this:
<packaging>ear</packaging>
<build>
<finalName>ear-name</finalName>
<!-- you can have only one source path-->
<sourceDirectory>src-dir-path</sourceDirectory>
<!-- you can have only one test path-->
<testSourceDirectory>test-dir-path</testSourceDirectory>
<!-- you can have several resource paths -->
<resources>
<resource>
<directory>src-resources-path</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<!-- you can have several test resource paths -->
<testResources>
<testResource>
<directory>test-resources-path</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
</testResources>
</build>
Other tips:
- study Eclipse generated ear, and maven generated ear, check for differences
- you can find missing jars with mvn compile, don't use an IDE for this, you want to make sure that maven has all the jars it needs
- you can have ant scripts inside maven, use maven-antrun-plugin, i can provide examples if requested
Mercer Traieste
2009-07-13 11:44:05
+1
A:
Have you tried the Weblogic Maven plugin? The weblogic:deploy goal seems to do exactly what you want. I've not used it myself so can't confirm if it actually works or not.
Update: Found this blog that describes deploying to 10.1.3, though not using the weblogic plugin.
Rich Seller
2009-07-13 12:14:17
Thanks for the hint. I would appreciate if someone could confirm whether this works also with Oracle AS 10.
tputkonen
2009-07-13 13:00:04
I've not seen any evidence for or against, though it should be pretty quick to confirm it yourself. It has been tested with versions 8.1 SP 4-6 and 9.0 - 9.2 MP3. If the API has changed you should get a pretty clear error.
Rich Seller
2009-07-13 20:50:06
+1
A:
Verified on Oc4j 10
http://chadthedeveloper.blogspot.com/2008/05/automated-deployment-to-oc4j-in-maven2.html
kazanaki
2009-07-14 07:52:34