its possible change library-ref descriptor using a plan deployment in weblogic?

47 views Asked by At

I trying to overwrite the library-ref descriptor from weblogic.xml file using a plan.xml but im getting "DeploymentException: weblogic.management.DeploymentException: Error: Unresolved Webapp Library references..."

the objective is use a different library using plan.xml without modify the weblogic.xml file

In my weblogic.xml (fragment)

   <wls:library-ref>
    <wls:library-name>lib_framework</wls:library-name>
    <wls:specification-version>1.0.0</wls:specification-version>
    <wls:implementation-version>1.0.0</wls:implementation-version>
    <wls:exact-match>false</wls:exact-match>
</wls:library-ref>

i define in the plan.xml (fragment) ....

<variable> 
    <name>var_lib_framework</name>
        <value>lib_framework_replace</value>
</variable>

<module-descriptor external="false">
    <root-element>weblogic-web-app</root-element>
    <uri>WEB-INF/weblogic.xml</uri>
    
    <variable-assignment>
        <name>var_lib_framework</name>
        <xpath>/weblogic-web-app/library-ref/[library-name="lib_framework"]</xpath>
        <operation>replace</operation>
    </variable-assignment>
    
</module-descriptor>
....
....

but when i try start the app the error appear during deployment. So the question is: Can i change a library descriptor defined in a weblogic.xml file using a deployment plan?

0

There are 0 answers