You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by ri...@nordea.com on 2003/11/13 10:07:04 UTC

Override behaviour in ejb:ejb goal !?

Hi,
I would like to be able to change the behaviour of the ejb-plugin, namely the goal ejb:ejb.
The thing is that I want to replace the resource-files with other ones (same file-names, but different content) before the actual jar is being built. This is kind of a problem :(
I�ve tried to copy my xml files (ejb-jar.xml, weblogic-ejb-jar.xml etc) to a different location and then change the variable maven.ejb.src, so that it points on the new location where my xml files are placed. I thought this would do an impact on the ejb:ejb goal, but it didn�t! It seems like it doesn't care about my new path I�ve specified, and still uses the original maven.ejb.src path when building the ejb-jar!
 
Have someone encountered a similiar or the exact same problem before, and then managed to solve it somehow ?
 
Here is abit of my maven.xml:
 
<preGoal name="ejb:ejb">
<ant:mkdir dir="${maven.build.tempsrc}"/> 
    <ant:copy todir="${maven.build.tempsrc}" overwrite="true"> 
        <ant:fileset dir="${maven.src.dir}/ejb"> 
            <ant:include name="**/*.xml"/> 
        </ant:fileset>
    </ant:copy> 
 
<!-- the value here doesn�t seem to affect the plugin -->
<j:set var="maven.ejb.src" value="${maven.build.tempsrc}/META-INF"/> 
 
<attainGoal name="replace:xml"/>
</preGoal>
 
Best Regards / Rikard Lindstr�m.
 
ps. I want to replace the files because the resource-files in clearcase contains tokens that must be replaced with a value before the jar is built! ds.