Using Ant to Build EAR file with Various Configurations

Hi,
I figured that someone has come across this problem and would be able to help
I am simplifying the complexity of my problem for explanation purposes.
I have the followings WARs: product1.war, product2.war and product3.war where product1.war needs to be deployed with product2.war but product3.war is optional.
So I have them all building the ant script and have them all referenced in the application.xml and no problems.
However, sometimes I would like to build with product3.war and sometimes I would like to build without.
I know that I probably could do some work with if-conditions in the build.xml and maybe have two application.xml files and swap them in accordingly (if war is referenced in application.xml but does not exist in ear then ear will not deploy) BUT in reality I have 10 wars and more than just 1 dependency.
So I am looking for a nicer implementation strategy for having a configurable variety of ear contents and configurations.
Thanks for reading,
Katie Wright
[email protected]

Maybe not the best place, but Ant IS one of the most popular build tools out there.
My take would be to have a single build file that is dynamically generated from a Java program, then fire off an exec command to the Ant script/bat/pl with an argument pointing to your build file.
You can call Ant this way more than once; I've had Ant return me a list of webapps from my versioning software that are displayed in a gui; user selects which ones to build, then a build file is created and Ant is called a second time.

Similar Messages

  • How to build ear files for ADF application using Ant task

    How to build ear files for ADF applications using Ant. The ojdeploy ant task can not find application-level deployment profiles. I am trying to automated build and release for ADF application.
    Any help is highly appreciated.
    Thanks
    Shiva

    Hi Timo
    Thanks for your reply.
    I have successfully created ear file using ojdeploy on jenkins. however when am trying to auto deploy using WLDeploy ant task am getting the following
    error :
    weblogic.application.ModuleException: :oracle.mds.config.MDSConfigurationException:MDS-01335: namespace "/oracle/webcenter/quicklinks/scopedMD" mapped to metadata-store-usage "WebCenterFileMetadataStore" but its definition was not found in MDS configuration
    Please advise how to handle this.
    As am a newbie to ADF, could you please advise if it is possible for the ADF application deployments can be automated for different environments using jenkins due to this MDS dependencies.
    Appreciate your help.
    Thanks
    Shiva

  • Change manifest file in existing EAR file with ANT task

    Hi,
    I use ant task (ojdeploy) to create EAR files from ADF application.
    Now I want to add the application version number to MANIFEST.MF.
    Is it possible to do the manifest file modification IN THE EXISTING EAR FILE (or while creating the EAR file with ojdeploy) with ant task or do I have to do the modification in the source MANIFEST.MF and after this create EAR file with ojdeploy?
    BTW: I tried the <ear> task to create the EAR file instead of using ojdeploy but I was not able to find the needed deployment descriptor (appxml="application.xml") in my ADF appication.
    regards
    Peter

    Hi Peter,
    I don't know of a way to do it directly in ANT/ojdeploy. However, you could try exploding the EAR, updating the manifest, and recreating the EAR - cumbersome and slow, but it should work.
    John

  • Is there any possibilty to integrate a EAR file with cq5 project??? the ear file is generated from a

    Is there any possibilty to integrate a EAR file with cq5 project??? the ear file is generated from a WSDL..

    Is there a reason why you need an "ear" file ? So what is the task you want to fullfill.
    For me it sounds like you want to integrate a jax-ws service inside a cq5 project. To achive that you have to integrate a jax-rs client in cq5.
    One option to achive that is to integrate Apache CXF like documented here:
    http://www.pro-vision.de/adaptto/downloads/110915_adaptto_sling_cxf.pdf
    Samplecode can be found here:
    http://www.pro-vision.de/adaptto/downloads/110915_adaptto_sling_cxf_sampleproject.zip
    Best regards,
    Dominik

  • File with various field lengths non - fixed cardinalities problem

    Hallo all,
    we have the following problem.
    we implemented a scenario as sown in this blog
    /people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
    but there is a problem.
    If the file structure is declared as :
    Header,1,Items,*
    then the adapter does not even read the file from the directory (so I assume that for some reason the file structure is not as expected).
    If on the other had the structured is declared as :
    Header,1,Items,3
    everything works.
    Obviously though, this is not satisfying since we need variable cardinalities.
    Any suggestions and help is appreciated
    Thank you .

    Well, I will write the main tests we tried, in case that the situation could be cleared :
    I have a specific file in a standard directory, called xi_input. The file is edited straight into that directory, so there can't be filename errors etc.
    If the file is left empty :
    Nothing happens . No message of any kind in sxmb_moni/monitoring xml messages .
    If the file contains the following (data is random) , where 'H' is the key for the header and 'I' is the key for the items :
    H     20060403     16     3     316001     kapou     lalla     morellala     20060403     F3     23
    I     277101010     2
    I     277101011     3
    I     277101012     4
    There are to cases :
    if the file structure is declared as :
    Header,1,Items,*
    Then nothing happens .
    If on the other had the structured is declared as :
    Header,1,Items,3
    everything works .
    I guess there is now a more clear picture of the problem.
    As for whether the file adapter does care about the file contents or not, I think that if the Message Protocol is "Message Content Conversion", then it does check the structure.

  • Which Port used by Integration Builder to communicate with JMS service

    Hi,
    Anybody know which port that used by Integration builder to communicate with JMS service in XI server in order to activate changes list.
    Thank you and Regards
    Fernand

    The main cause is not the communication problem between Integration builder and JMS provider but the inconsistent SLD contents.
    Now i can activate my object in the integration builder. see SAP Notes 764176
    Best Regards
    Fernand

  • Help -- Who has experience with ant and build.xml files ?

    Hi,
    I think my build.xml file is missing setting a classpath I need, but I have never played around with a build.xml file. Could someone help ?
    Thank you.
    Grazia

    A lot of people here use ant. But not all of us can read your mind, and those of us that can are sadistic bastards that like to force people to provide details of their problems just for the hell of it.
    So please do the following:
    * Go through an ant tutorial or other introductory docs, doing an example or two if present.
    * Set up your build.xml according to what you've learned.
    * If it still doesn't work, post the relevant portions of it (hopefully you'll have a small, representative sample that reproduces the problem), along with your relevant directory and file structure, the command you're running, and what error messages you're getting.

  • Build.xml classpath ref to be used in another build XML file

    Hi,
    I have ant build.xml with a target as
    <target name="build_project">
              <ant antfile="C:/projects/antbuild/build.xml" inheritAll="true">
                   <target name="clean" />
              </ant>
         </target>
         in report1.xml.
         This build.xml inturn have the classpath defined in it with the JARS added to the classpath.
         In the report2.xml,
         Can I use the classpathref in build.xml which is defined in report2.xml? Where report2.xml is imported in report1.xml as
         <import file="report2.xml" />
         If I can do so I don't have to create duplicate class path ref again adding all the JARS in report2.xml?
         Please clarify.
    Thanks.

    I've used quite a bit of ANT in the past, but I don't really know what to answer to your question that is in any way helpful to you. I remember that ANT has some form of build file inheritance built in, I've played around with it in years ago to try and crank out somewhat standardized build files with reusable elements. What I can recall is that I had to read a book on advanced ANT usage to be able to work it out, the online manual wasn't nearly enough.

  • Building EAR files

    Hello,
    I want to build a ear-file containing several EJB jar files (one ejb in each jar-file)
    and some utility classes needed by the ejbs in a utility.jar. No webbapps.
    * How do I do this? Is there a special tool or do I just use the usual jar?
    * Is there some guide or help somewhere in the documentation?
    * How should the structure of the ear-file look like? Are any extra xml-files
    needed (except those in the ejb jar-files)?
    Best Regards,
    Anders Thornberg

    Basically just put the jar files in a directory with the application.xml
    file and let the jar program rip!
    "jar -cvf MyFile.ear ."
    Mike
    "Anders Thornberg" <[email protected]> wrote in message
    news:3b1f570e$[email protected]..
    >
    Hello,
    I want to build a ear-file containing several EJB jar files (one ejb ineach jar-file)
    and some utility classes needed by the ejbs in a utility.jar. No webbapps.
    * How do I do this? Is there a special tool or do I just use the usualjar?
    >
    * Is there some guide or help somewhere in the documentation?
    * How should the structure of the ear-file look like? Are any extraxml-files
    needed (except those in the ejb jar-files)?
    Best Regards,
    Anders Thornberg

  • Using workshop to build EAR successfully but deployment of the EAR fails.

    Hi there,
    i've developed an application using Weblogic workshop. And also, It's been working fine when using the workshop to deploy and test in exploded format.
    When building the EAR using workshop, the ear file was built successfully without any errors. But, when it's deployed as an EAR, the deployment failed!
    This is the error throwing out at the console:
    Aug 2, 2004 9:13:14 PM GMT+08:00> <Warning> <Deployer> <BEA-149004> <Failures w
    re detected while initiating Deploy task for application Rapid.>
    Aug 2, 2004 9:13:14 PM GMT+08:00> <Error> <Deployer> <BEA-149201> <Failed to co
    plete the deployment task with ID 0 for the application Rapid.
    ava.lang.NoClassDefFoundError: com/bea/wlw/runtime/core/bean/SLSBContainerBean
    at java.lang.ClassLoader.defineClass(Ljava.lang.String;[BIILjava.securit
    .ProtectionDomain;)Ljava.lang.Class;(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Ljava.lang.String;[BIILja
    a.security.CodeSource;)Ljava.lang.Class;(SecureClassLoader.java:123)
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(Ljava.l
    ng.String;)Ljava.lang.Class;(GenericClassLoader.java:476)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(Ljava.lang.S
    ring;)Ljava.lang.Class;(GenericClassLoader.java:181)
    at java.lang.ClassLoader.loadClass(Ljava.lang.String;Z)Ljava.lang.Class;
    Unknown Source)
    at java.lang.ClassLoader.loadClass(Ljava.lang.String;)Ljava.lang.Class;(
    nknown Source)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(Ljava.lang.S
    ring;)Ljava.lang.Class;(GenericClassLoader.java:223)
    at weblogic.ejb20.deployer.EJBModule.setupEJBToImplClassDependencies(Lja
    a.lang.ClassLoader;)V(EJBModule.java:1030)
    at weblogic.ejb20.deployer.EJBModule.prepare(Ljava.lang.ClassLoader;)V(E
    BModule.java:481)
    And also, i notice that in the EAR file there is .workshop folder. will it cause any problem?
    If the workshop deployed successfully in exploded format and application works properly, as well as generating the EAR file without any error, shouldn't the generated EAR file to be deployed without error?
    Would anyone help up please?

    Did you deploy the application in a workshop enabled domain?
    Hi there,
    i've developed an application using Weblogic
    workshop. And also, It's been working fine when
    using the workshop to deploy and test in exploded
    format.
    When building the EAR using workshop, the ear file
    was built successfully without any errors. But, when
    it's deployed as an EAR, the deployment failed!
    This is the error throwing out at the
    console:
    Aug 2, 2004 9:13:14 PM GMT+08:00> <Warning>
    <Deployer> <BEA-149004> <Failures w
    re detected while initiating Deploy task for
    application Rapid.>
    Aug 2, 2004 9:13:14 PM GMT+08:00> <Error> <Deployer>
    <BEA-149201> <Failed to co
    plete the deployment task with ID 0 for the
    application Rapid.
    ava.lang.NoClassDefFoundError:
    com/bea/wlw/runtime/core/bean/SLSBContainerBean
    at
    at
    at
    t
    java.lang.ClassLoader.defineClass(Ljava.lang.String;[B
    IILjava.securit
    .ProtectionDomain;)Ljava.lang.Class;(Unknown Source)
    at
    at
    at
    t
    java.security.SecureClassLoader.defineClass(Ljava.lang
    .String;[BIILja
    a.security.CodeSource;)Ljava.lang.Class;(SecureClassLo
    ader.java:123)
    at
    at
    at
    t
    weblogic.utils.classloaders.GenericClassLoader.findLoc
    alClass(Ljava.l
    ng.String;)Ljava.lang.Class;(GenericClassLoader.java:4
    76)
    at
    at
    at
    t
    weblogic.utils.classloaders.GenericClassLoader.findCla
    ss(Ljava.lang.S
    ring;)Ljava.lang.Class;(GenericClassLoader.java:181)
    at
    at
    at
    t
    java.lang.ClassLoader.loadClass(Ljava.lang.String;Z)Lj
    ava.lang.Class;
    Unknown Source)
    at
    at
    at
    t
    java.lang.ClassLoader.loadClass(Ljava.lang.String;)Lja
    va.lang.Class;(
    nknown Source)
    at
    at
    at
    t
    weblogic.utils.classloaders.GenericClassLoader.loadCla
    ss(Ljava.lang.S
    ring;)Ljava.lang.Class;(GenericClassLoader.java:223)
    at
    at
    at
    t
    weblogic.ejb20.deployer.EJBModule.setupEJBToImplClassD
    ependencies(Lja
    a.lang.ClassLoader;)V(EJBModule.java:1030)
    at
    at
    at
    t
    weblogic.ejb20.deployer.EJBModule.prepare(Ljava.lang.C
    lassLoader;)V(E
    BModule.java:481)
    And also, i notice that in the EAR file there is
    .workshop folder. will it cause any problem?
    If the workshop deployed successfully in exploded
    format and application works properly, as well as
    generating the EAR file without any error, shouldn't
    the generated EAR file to be deployed without error?
    Would anyone help up please?

  • How to use application params in .EAR files

    When we build an ear file , Weblogic-application.xml provides application-param
    tag?
    are they similar to env-entry in ejb-jar.xml.
    Can I use application-param tag to define a configurable params
    say myName and value as "Harshad"
    How do i read it in the application say a simple java class that is included in
    a jar inside the ear file.

    application-param tag in weblogic-application.xml may be used to define parameters:
    webapp.encoding.default
    webapp.encoding.usevmdefault
    webapp.getrealpath.accept_context_path
    http://e-docs.bea.com/wls/docs81/programming/app_xml.html#1034632
    "Harshad Nanal" <[email protected]> wrote:
    >
    When we build an ear file , Weblogic-application.xml provides application-param
    tag?
    are they similar to env-entry in ejb-jar.xml.
    Can I use application-param tag to define a configurable params
    say myName and value as "Harshad"
    How do i read it in the application say a simple java class that is included
    in
    a jar inside the ear file.

  • Unable to compile .ear file with an operation that returns an array

    Hi
    God, hopefully someone can help me.....
    I have a web service that has various operations, one of which is attempting to return an array of strings. I am declaring a complextype in the WSDL that should functions as the array like this:
    <schema.....
    <element name="result" type="string"/>
    <complexType name="searchResponseElement">
    <sequence>
    <element ref="tns:result" maxOccurs="unbounded"
    minOccurs="0"/>
    </sequence>
    The error I receive is utterly vague, just saying ' compilation error occurred' when I go to deploy the ear file. I did have this working with another methos of declaring an array i.e.
    <schema...
    <complexType name="searchResponseElement">
    <complexContent>
    <restriction base="soap11-enc:Array">
    <attribute ref="soap11-enc:arrayType" wsdl:arrayType="xsd:string[]"/>
    </restriction>
    </complexContent>
    </complexType>
    But, I was trying to consume the webservice in an APEX application and that method did not return a tree structure that APEX was able to handle.
    I really am losing my mind over this as I've had the same type of definition working before. Please, anyone - any clues???

    I answered this question that you also posted on stackoverflow.com.

  • How to deploy ear file with jar file and war file with different names

    Hi,
    As part of weblogic migration from WL 6.1 sp3 to WL 10, Iam facing some problem.
    Problem:
    I have one ear file(abc.ear) to deploy which contains one jar file(xyz.jar) and one war file(pqr.war).
    In config.xml file of WL 6.1, it was mentioned as :
    <Application Deployed="true" Name="abc" Path="./config/mydomain/applications/abc.ear">
    <EJBComponent Name="xyz" Targets="myserver" URI="xyz.jar"/>
    <WebAppComponent Name="pqr" Targets="myserver" URI="pqr.war"/>
    </Application>.
    The above is working fine.
    But in config.xml file WL10,I cannot mention the same.
    I need to have different application anmes for ear,jar and war.If I deploy as a ear file,the jar and war files are deployed with the same ear file name.
    I tried the following options:
    1) Deploying as a ear file by adding <sub-deployments>
    2) Deploying both war and jar seperately which is not recommended in my application.
    Please provide the content I should place in the config.xml so that everything works fine correctly.
    Any help is appreciated.

    Hi,
    As part of weblogic migration from WL 6.1 sp3 to WL 10, Iam facing some problem.
    Problem:
    I have one ear file(abc.ear) to deploy which contains one jar file(xyz.jar) and one war file(pqr.war).
    In config.xml file of WL 6.1, it was mentioned as :
    <Application Deployed="true" Name="abc" Path="./config/mydomain/applications/abc.ear">
    <EJBComponent Name="xyz" Targets="myserver" URI="xyz.jar"/>
    <WebAppComponent Name="pqr" Targets="myserver" URI="pqr.war"/>
    </Application>.
    The above is working fine.
    But in config.xml file WL10,I cannot mention the same.
    I need to have different application anmes for ear,jar and war.If I deploy as a ear file,the jar and war files are deployed with the same ear file name.
    I tried the following options:
    1) Deploying as a ear file by adding <sub-deployments>
    2) Deploying both war and jar seperately which is not recommended in my application.
    Please provide the content I should place in the config.xml so that everything works fine correctly.
    Any help is appreciated.

  • How do I build a file with tabs

    This may seem silly but I have never done this. I am building a booklet that will be 10 individual sheets 6" x 8" .... they will be laminated pages and included in this mix are 3 tabs that will go outside the 6x8 size... how do I build the file and make crop marks etc for this type of project?
    Thank you,
    Andrea

    When you set up a Line for CutterGuide or whatever you call it, make sure it's a Spot Colour and that the Stroke is set to Overprint.
    Just send the printers the one page that the tab will be like, then they can get a forme made to suit your job, they will not have to make more than one forme for the job.
    However, you should really be asking your printer what way is the best to set your job up. Because they might prefer one way over the other. And they may already have a forme that they used in a previous job that you can use, which will save you the cost of getting a forme made to cut out the tabs.
    The image posted by Paul Cracknell is the correct way to set up your page.
    Make your page 6 inches wide + "x" inches for the tab width.
    Then draw a guide at 6 inches and don't let anything other than the tab information into the "x" inches for the tab.
    You also don't want any text going right up the 6 inches, as this is far too close to the page edge and may be trimmed off.

  • Using ant to build and deploy plsql packages to a 11g wls.

    Hi all,
    Not sure is this is the right place, but I found a few other threads in this forum regarding plsql and ant, so I'll try this one.
    My firm is moving from 10g ADF applcations to 11g SOA applications. When I'm not busy being lost in the whole new SOA world, I also have the pleasure of building our ant scripts. :-)
    It has been years since I looked at the deploy scripts I made for 10g, so I'm a bit rusty.
    I used wsassemble in our old scripts and I used http://download.oracle.com/docs/cd/B25221_05/web.1013/b14434/wsassemble.htm as a reference. But I can't seem to find the same documentation for 11g? I tried http://download.oracle.com/docs/cd/E12839_01/index.htm but it doesn't seem to have anything about plsqlAssemble, genInterface, genproxy etc. for 11g wls servers? I also tried google a while to no avail.
    For example, I'm having problems setting the values for the ant-oracle.properties.
    So can someone please throw some links my way, so I can read how to build and deploy plsql packages to a 11g wls server using ant? Thanks!
    Cheers,
    William

    Hi,
    Did you ever find an answer to this question ?
    I am currently creating the webservice using webservices assembler from 10g/OC4j, then using the SmartUpgrade tool to re-engineer the webservice for deployment to 11g
    ( SmartUpgrade info here http://docs.oracle.com/cd/E16764_01/doc.1111/e15878/intro.htm)
    G
    Edited by: user999097 on Mar 5, 2012 1:16 PM

Maybe you are looking for

  • Run javascript (not in a jsx file) from the command line extendscript

    Hi all, I was wondering if anyone knew how to run javascript from the command line in Extendscript (meaning Extendscript would be the target application). I know about the -run command line flag in which allows you to run a .jsx script from the comma

  • External Mail

    I am trying to run a basic JavaMail I am failing on any attempt to send mail to a server other than the one that the mailserver listed as host is on. I have tried on 2 different mail severs one inside and one outside the firewall. In both cases I can

  • Perspektivisch Verformen Funktion nicht verfügbar

    "Perspektivisch Verformen". Ich nutze das Photoshop CC / Lightroom Abo. Die Updates sind auf dem neuesten Stand. Die Funktion "Perspektivisch verformen erscheint jedoch nicht in den Menüfunktionen. In den Voreinstellungen/Leistung ist "Grafikprozesso

  • Compare between 2 dates

    Hi, I would like to know how to compare between 2 dates. for example if I have 1 employee working from 01-01-2005 to 31-03-2005 I want to know how many days is that so that can also view how many working staff in 1 shop per day... cos I'm thinking to

  • Change in password ?? Virus???

    Good day, I click " systems preferences" in OS LION,  then Security and privacy, then I click on: Click lock to make changes at the bottom left .......in any either " General" , or " file vault"  or " Firewall" or " Privacy" a small window opens show