--- ear-module/
------ pom.xml
------ src/main/application/META-INF/
--------- application.xml
--------- jboss-service.xml
I created blank-ejb-module just to insert it into ear-module/src/main/application/META-INF/application.xml (just because its DTD requires a module element)
In ear-module 's pom.xml I have this:
<project>
...
<properties>
<my.custom.mbean.attribute.value>MBean Attribute Value</my.custom.mbean.attribute.value>
</properties>
<build>
<finalName>EarName</finalName>
<plugins>
<plugin>
<artifactId>maven-ear-plugin</artifactId>
<version>2.5</version>
<configuration>
<filtering>true</filtering>
<modules>
<ejbModule>
<groupId>${project.groupId}</groupId>
<artifactId>blank-ejb-module</artifactId>
</ejbModule>
</modules>
</configuration>
</plugin>
</plugins>
</build>
...
</project>
While in src/main/application/META-INF/jboss-service.xml I have this:
<?xml version="1.0" encoding="UTF-8"?>
<server>
<mbean name="mbeanName" code="
fully.qualified.name">
<attribute name="CustomAttribute">${my.custom.mbean.attribute.value}</attribute>
</mbean>
</server>
When I run ' mvn package ' from CLI I have the expected behavior (Maven generates a EAR file named "EarName.ear" and changes the property ${my.custom.mbean.attribute.value} to "MBean Attribute Value".
But when I use m2e and publish to the server (JBoss in my case), Maven generates a EAR file named "ear-module.ear" and it does not change the value of ${my.custom.mbean.attribute.value}.
Below there are a few descriptions of the files I am attaching to help you understand them:
1. On the file m2ewtp-ear-source-filtering-bug.rar there is the clean Maven
project (without Eclipse files, just source and pom
files)
2. On the file EAR generated by Maven CLI.rar
there is the result of a simple ' mvn package ' that I ran from CLI
(and which is the result I would expect from m2e, but it´s failing)
3. On the file EAR generated by M2Eclipse.rar
there is the failed result of a simple ' Project > Clean ' followed by ' Server > Publish ' that I
ran from Eclipse (and which is the result I was not expecting, as I
expected the result in file 2 described above)
So, do you guys have any idea of when this would be fixed and, in the meanwhile, do you have any workaround to this problem?
Thanks and regards,
Rafael Vanderlei.