You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Gonzalo Vásquez Sáez <go...@gmail.com> on 2007/06/15 21:38:43 UTC

building an ejb

I can't generate the JAR for an ejb using maven

I do have my META-INF/ejb-jar.xml file under the directory specified under
/project/build/sourceDirectory (as if it were an xpath expression), this is
an extract:

<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>net.excelsys.framework</groupId>
    <artifactId>timedOps</artifactId>
    <packaging>ejb</packaging>
    <version>1.0.0</version>
    <description></description>
    <build>
        <sourceDirectory>ejbmodule</sourceDirectory>
    </build>......

so the ejb-jar.xml is in /ejbmodule/META-INF directory


what is the proper path to place that file? how can I override that default
setting?

Re: building an ejb

Posted by Gonzalo Vásquez Sáez <go...@gmail.com>.
Works great! Thanks

On 15/06/07, Eric Redmond <er...@gmail.com> wrote:
>
> ejb-jar.xml is not a "source" (source are for things like java code), this
> is a "resource". You would put it under src/main/resources/META-INF/ejb-
> jar.xml
>
> Alternatively, you can override the default resources directory:
>
>     <resources>
>       <resource>
>         <!-- Where non-compiled files reside (such as .properties file).
> They are put into the outputDirectory -->
>         <directory>src/main/resources</directory>
>       </resource>
>     </resources>
>
> Note that this is usually frowned upon - if you can at all use the
> default,
> do it. It will make your entire Maven experience much simpler to do so,
> and
> will also make it easier for you to find help on important problems -
> since
> others have the same layout.
>
> Eric
> On 6/15/07, Gonzalo Vásquez Sáez <go...@gmail.com> wrote:
> >
> > I can't generate the JAR for an ejb using maven
> >
> > I do have my META-INF/ejb-jar.xml file under the directory specified
> under
> > /project/build/sourceDirectory (as if it were an xpath expression), this
> > is
> > an extract:
> >
> > <project>
> >     <modelVersion>4.0.0</modelVersion>
> >     <groupId>net.excelsys.framework</groupId>
> >     <artifactId>timedOps</artifactId>
> >     <packaging>ejb</packaging>
> >     <version>1.0.0</version>
> >     <description></description>
> >     <build>
> >         <sourceDirectory>ejbmodule</sourceDirectory>
> >     </build>......
> >
> > so the ejb-jar.xml is in /ejbmodule/META-INF directory
> >
> >
> > what is the proper path to place that file? how can I override that
> > default
> > setting?
> >
>
>
>
> --
> Eric Redmond
> http://www.sonatype.com
>

Re: building an ejb

Posted by Eric Redmond <er...@gmail.com>.
ejb-jar.xml is not a "source" (source are for things like java code), this
is a "resource". You would put it under src/main/resources/META-INF/ejb-
jar.xml

Alternatively, you can override the default resources directory:

    <resources>
      <resource>
        <!-- Where non-compiled files reside (such as .properties file).
They are put into the outputDirectory -->
        <directory>src/main/resources</directory>
      </resource>
    </resources>

Note that this is usually frowned upon - if you can at all use the default,
do it. It will make your entire Maven experience much simpler to do so, and
will also make it easier for you to find help on important problems - since
others have the same layout.

Eric
On 6/15/07, Gonzalo Vásquez Sáez <go...@gmail.com> wrote:
>
> I can't generate the JAR for an ejb using maven
>
> I do have my META-INF/ejb-jar.xml file under the directory specified under
> /project/build/sourceDirectory (as if it were an xpath expression), this
> is
> an extract:
>
> <project>
>     <modelVersion>4.0.0</modelVersion>
>     <groupId>net.excelsys.framework</groupId>
>     <artifactId>timedOps</artifactId>
>     <packaging>ejb</packaging>
>     <version>1.0.0</version>
>     <description></description>
>     <build>
>         <sourceDirectory>ejbmodule</sourceDirectory>
>     </build>......
>
> so the ejb-jar.xml is in /ejbmodule/META-INF directory
>
>
> what is the proper path to place that file? how can I override that
> default
> setting?
>



-- 
Eric Redmond
http://www.sonatype.com