You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by eol <jo...@csn.se> on 2007/12/06 15:43:14 UTC

Re: any tag for customized path ejb-jar.xml?

I had the same problem. According to this post 
http://www.nabble.com/-jira--Created%3A-%28MIDEA-95%29-location-of-ejb-jar.xml-is-hard-coded-tf3928089s177.html#a11140114
http://www.nabble.com/-jira--Created%3A-%28MIDEA-95%29-location-of-ejb-jar.xml-is-hard-coded-tf3928089s177.html#a11140114 
the location of ejb-jar.xml is hard coded to
src/main/resources/META-INF/ejb-jar.xml. 
I use WSAD5.1/RAD6. I added my ejb-jar location (ejbModule/META-INF) to
<resources>, but it didn't work for me. 

My workaround to add an antrun plugin that copies the ejb-jar.xml file
before packaging:

<plugin>
    	<groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <configuration>
              <tasks>
                <delete dir="${basedir}/src"/>
		<copy file="${basedir}/ejbModule/META-INF/ejb-jar.xml"
tofile="${basedir}/src/main/resources/META-INF/ejb-jar.xml"/>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

Note:
1. If you use WSAD/RAD, you'll probably want to copy the entire META-INF
directory since it may include IBM-specific ejb binding files. 
2. The above script deletes "src" and all its subdirectories...

/Jonas Öhrnell



Teody Cue Jr. wrote:
> 
> Hi Kiran,
> 
> I'm not sure what you are trying to do here but I guess you want to put 
> your ejb-jar.xml somewhere else aside from src/main/resources/META-INF.. 
> and be copied to the right path in the war file.
> 
> You can put it anywhere you want to and just add it under the <resource> 
> tag. It will be automatically copied to your build output directory 
> during the process-resource phase of the maven life cycle. There are 
> options such as <targetPath>, <directory> and <includes>. For more 
> information, please see the schema for the POM here: 
> http://maven.apache.org/pom.html
> 
> But I think it is better to put everything or most things in its default 
> directory. As that's one of the nice features/advantages that maven has 
> - convention over configuration. Just my 2 cents though.
> 
> Hope this helps.
> 
> Teody
> 
> 
> 
> Kiran Kodlady wrote:
>> Hello, 
>>
>> can anyone tell me - is there any tag for customized path for
>> ejb-jar.xml?? 
>> Default value is  - src/main/resources/META-INF.. 
>>
>> Thanks in advance, 
>>
>> Kiran Kodlady
>>   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/any-tag-for-customized-path-ejb-jar.xml--tf4127679s177.html#a14193333
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org