2 Replies Latest reply: Sep 11, 2013 1:24 AM by 1006695 RSS

    how to add artifacts to mds using ant scipts

    1006695

      Hi All,

       

      I'am trying to add artifacts from local system to mds. The file location is from C:\Oracle\Middleware\jdeveloper\integration\seed\apps\schemasOld , i kept my schemas(xsd's) in schemasOld folder.

                                  I was using the ant scripts from the link:-http://biemond.blogspot.in/2009/11/soa-suite-11g-mds-deploy-and-removal.html

      to store my artifacts in mds, To make this work the antcontrib.jar to the jdeveloper\ant\lib folder ( because of the foreach and the propertycopy fucntion ). And i given all my server details in build.properties from where my artifacts should upload to server mds. And in MDS.sh batch file mentioned the required details.

       

      But its not working, I will appreciate any comments in order to help to fix the problem.

        • 1. Re: how to add artifacts to mds using ant scipts
          869615

          "its not working" is not much information to use if you want some help. Please add some kind of error message, stracktrace, .err .xml from deploy dir, what version you are using etc.

          • 2. Re: how to add artifacts to mds using ant scipts
            1006695

            Hi,

             

            !st i tried with the MDS.sh batch file, when i double click the MDS.sh, the cmd prompt is opened for few seconds and it is closing suddenly, it was not even running the script. Then i tried to execute through JDeveloper using ant option and i got the errors which i mentioned in 1st itself

             

            This was the error i get when i compiled through Jdeveloper:-

             

            Buildfile: C:\Documents and Settings\sathish.garapati\Desktop\MDSscript\build.xml

                 [echo] basedir C:\Documents and Settings\sathish.garapati\Desktop\MDSscript

                 [echo] current folder ${env.CURRENT_FOLDER}

             

             

            deployMDS:

                 [echo] undeploy and deploy MDS

                 [echo] basedir C:\Documents and Settings\sathish.garapati\Desktop\MDSscript

                 [echo] current folder ${env.CURRENT_FOLDER}

             

             

            deployMDSApplication:

                 [echo] deploy MDS application schemasOld

                 [echo] remove and create local MDS temp

             

             

            BUILD FAILED

            C:\Documents and Settings\sathish.garapati\Desktop\MDSscript\build.xml:16: The following error occurred while executing this line:

            C:\Documents and Settings\sathish.garapati\Desktop\MDSscript\build.xml:24: Directory C:\Documents and Settings\sathish.garapati\Desktop\MDSscript\ emp\schemasOld creation was not successful for an unknown reason

             

             

            Total time: 0 seconds

             

            Here is my build.properties given details:-

             

            # global

            wn.bea.home=C:\Oracle\Middleware

            oracle.home=C:\Oracle\Middleware\jdeveloper

            java.passed.home=C:\Oracle\Middleware\jdk160_24

            wl_home=C:\Oracle\Middleware\wlserver_10.3

             

            # temp

            temp.output.dir=C:\temp

            mds.reposistory=C:\Documents and Settings\sathish.garapati\Desktop\MDSscript\mdstemp

            mds.applications=schemasOld

             

            deployment.plan.environment=dev

             

            # dev deployment server weblogic

            dev.serverURL=http://172.18.79.90:7001

            dev.overwrite=true

            dev.user=weblogic

            dev.password=welcome1

            dev.forceDefault=true

             

            # acceptance deployment server weblogic

            acc.serverURL=http://172.18.79.90:7001

            acc.overwrite=true

            acc.user=weblogic

            acc.password=welcome1

            acc.forceDefault=true

             

            and my build.xml:-

             

            <?xml version="1.0" encoding="iso-8859-1"?>

            <project name="soaDeployAll" default="deployMDS">

                <echo>basedir ${basedir}</echo>

                <property environment="env"/>

                <echo>current folder ${env.CURRENT_FOLDER}</echo>

                <property file="build.properties"/>

                <path id="antcontrib.path">

                    <pathelement path="lib/ant-contrib-1.0b3.jar"/>

                </path>

                <taskdef classpathref="antcontrib.path"

                         resource="net/sf/antcontrib/antlib.xml"/>

                <target name="deployMDS">

                    <echo>undeploy and deploy MDS</echo>

                    <foreach list="${mds.applications}" param="mds.application"

                             target="deployMDSApplication" inheritall="true"

                             inheritrefs="true"/>

                </target>

                <target name="deployMDSApplication">

                    <echo>deploy MDS application ${mds.application}</echo>

                    <echo>remove and create local MDS temp</echo>

                    <property name="mds.deploy.dir"

                              value="${temp.output.dir}/${mds.application}"/>

                    <delete dir="${mds.deploy.dir}"/>

                    <mkdir dir="${mds.deploy.dir}"/>

                    <echo>create zip from file MDS store</echo>

                    <zip destfile="${mds.deploy.dir}/${mds.application}_mds.jar"

                         compress="false">

                        <fileset dir="${mds.reposistory}" includes="${mds.application}/**"/>

                    </zip>

                    <echo>create zip with MDS jar</echo>

                    <zip destfile="${mds.deploy.dir}/${mds.application}_mds.zip"

                         compress="false">

                        <fileset dir="${mds.deploy.dir}" includes="*.jar"/>

                    </zip>

                    <propertycopy name="deploy.serverURL"

                                  from="${deployment.plan.environment}.serverURL"/>

                    <propertycopy name="deploy.overwrite"

                                  from="${deployment.plan.environment}.overwrite"/>

                    <propertycopy name="deploy.user"

                                  from="${deployment.plan.environment}.user"/>

                    <propertycopy name="deploy.password"

                                  from="${deployment.plan.environment}.password"/>

                    <propertycopy name="deploy.forceDefault"

                                  from="${deployment.plan.environment}.forceDefault"/>

                    <echo>deploy MDS app</echo>

                    <echo>deploy on ${deploy.serverURL} with user ${deploy.user}</echo>

                    <echo>deploy sarFile ${mds.deploy.dir}/${mds.application}_mds.zip</echo>

                    <ant antfile="${oracle.home}/bin/ant-sca-deploy.xml" inheritall="false"

                         target="deploy">

                        <property name="wl_home" value="${wl_home}"/>

                        <property name="oracle.home" value="${oracle.home}"/>

                        <property name="serverURL" value="${deploy.serverURL}"/>

                        <property name="user" value="${deploy.user}"/>

                        <property name="password" value="${deploy.password}"/>

                        <property name="overwrite" value="${deploy.overwrite}"/>

                        <property name="forceDefault" value="${deploy.forceDefault}"/>

                        <property name="sarLocation"

                                  value="${mds.deploy.dir}/${mds.application}_mds.zip"/>

                    </ant>

                </target>

                <target name="undeployMDSApplication">

                    <echo>undeploy MDS application ${mds.application}</echo>

                    <propertycopy name="deploy.serverURL"

                                  from="${deployment.plan.environment}.serverURL"/>

                    <propertycopy name="deploy.overwrite"

                                  from="${deployment.plan.environment}.overwrite"/>

                    <propertycopy name="deploy.user"

                                  from="${deployment.plan.environment}.user"/>

                    <propertycopy name="deploy.password"

                                  from="${deployment.plan.environment}.password"/>

                    <propertycopy name="deploy.forceDefault"

                                  from="${deployment.plan.environment}.forceDefault"/>

                    <echo>undeploy MDS app folder apps/${mds.application} </echo>

                    <ant antfile="${oracle.home}/bin/ant-sca-deploy.xml" inheritall="false"

                         target="removeSharedData">

                        <property name="wl_home" value="${wl_home}"/>

                        <property name="oracle.home" value="${oracle.home}"/>

                        <property name="serverURL" value="${deploy.serverURL}"/>

                        <property name="user" value="${deploy.user}"/>

                        <property name="password" value="${deploy.password}"/>

                        <property name="folderName" value="${mds.application}"/>

                    </ant>

                </target>

            </project>