We have a multi module maven project setup to run in Eclipse deploying to Weblogic 11g.
Everything has been working fine, including filtering resources, until we tried this with the web-project/web-inf/weblogic.xml. We seem to be unable to use maven filtering when deploying from within Eclipse to Weblogic:
<01-May-2015 15:02:54 o'clock BST> <Error> <J2EE> <BEA-160197> <Unable to load descriptor C:\checkout\app\branch\workspace\web-project\WebContent\WEB-INF\weblogic.xml of module null. The error is weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
problem: boolean: Invalid boolean value '${cookie-secure}':<null>
problem: cvc-datatype-valid.1.1: boolean value '${cookie-secure}' does not match pattern for true-falseType in namespace http://xmlns.oracle.com/weblogic/weblogic-web-app:<null>
C:\Oracle\Middleware\user_projects\domains\mydomain\<unknown>:25:4: problem: com.bea.xbean.common.InvalidLexicalValueException: invalid boolean: ${cookie-secure}:<<unknown>>
problem: boolean: Invalid boolean value '${url-rewriting-enabled}':<null>
problem: cvc-datatype-valid.1.1: boolean value '${url-rewriting-enabled}' does not match pattern for true-falseType in namespace http://xmlns.oracle.com/weblogic/weblogic-web-app:<null>
C:\Oracle\Middleware\user_projects\domains\DEV114\<unknown>:25:4: problem: com.bea.xbean.common.InvalidLexicalValueException: invalid boolean: ${url-rewriting-enabled}:<<unknown>>
...
<01-May-2015 15:02:54 o'clock BST> <Error> <HTTP> <BEA-101370> <There was a failure when merging library descriptors into the application descriptors for application C:\checkout\app\branch\workspace\web-project\target\m2e-wtp\web-resources. Please make sure that the descriptors are valid. The error is VALIDATION PROBLEMS WERE FOUND
The question is how can we stop the deployment merging the source weblogic.xml into already filtered target\m2e-wtp\web-resources\WEB-INF\weblogic.xml?
weblogic.xml relevant parts:
<session-descriptor>
...
<cookie-secure>${cookie-secure}</cookie-secure>
<url-rewriting-enabled>${url-rewriting-enabled}</url-rewriting-enabled>
</session-descriptor>
pom.xml war config
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
...
<webResources>
<resource>
<directory>WebContent/WEB-INF</directory>
<targetPath>WEB-INF</targetPath>
<filtering>true</filtering>
<includes>
<include>web.xml</include>
<include>weblogic.xml</include>
<include>config/securityConfiguration.properties</include>
</includes>
</resource>
<resource>
<directory>WebContent/WEB-INF</directory>
<targetPath>WEB-INF</targetPath>
<filtering>false</filtering>
<includes></includes>
<excludes>
<exclude>web.xml</exclude>
<exclude>weblogic.xml</exclude>
<exclude>config/securityConfiguration.properties</exclude>
</excludes>
</resource>
</webResources>
</configuration>
</plugin>
Oracle Java EE Tools Part of Oracle Enterprise Pack for Eclipse 12.1.2.2 (6.3.0.201312191402)
Maven 3.0.4
JDK 1.6
Eclipse Kepler SR1
m2e-wtp 1.4.1.20140328-1905
Not a show stopper but we want to avoid environment specific config files when we shouldn't really need to create them.
Any help is appreciate, thanks, JB