Hi Adam, 

you'll find below what I've done to get things working (maveners, if
this is not the right way to do things, please let me know) :

1. create a Maven 2.0 project :
m2 archetype:create -DgroupId=com.mycompany.app -DartifactId=my-ejbapp

2. change the <packaging>jar</packaging> to <packaging>ejb</packaging>
in the generated pom.xml

3. add a META-INF\ejb-jar.xml in the src\main\resources directory

Your project should now looks like this : 

\---src
    +---main
    |   +---java
    |   |   \---com
    |   |       \---mycompany
    |   |           \---app
    |   \---resources
    |       \---META-INF
    \---test
        \---java
            \---com
                \---mycompany
                    \---app

4. run m2 install (according to the documentation, m2 ejb:ejb might
not have the same behaviour as with maven 1.x)

5. optionaly, add the following to the <build> section of your pom if
you want to generate a client ejb-jar :

        <build>
                <plugins>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-ejb-plugin</artifactId>
                                <configuration>
                                        <generateClient>true</generateClient>
                                </configuration>
                        </plugin>
                </plugins>
        </build>

6. write or wait for the ear plugin :)

On 7/1/05, Adam Hardy <[EMAIL PROTECTED]> wrote:
> Just trying to find out the steps to set up an EJB project and I can't
> find anything in the mailing list or on the website.
> 
> There is no maven-archetype-ear or maven-archetype-ejb for the
> quickstart plugin with which I can create a new project, so should I
> just be creating a plain old jar project?
> 
> That produces no resources directory, so should I just be following the
> maven 1.0 config, with properties like
> 
> ${maven.ejb.src}/META-INF/MANIFEST.MF
> 
> and m2 ejb:ejb will be OK?
> 
> 
> Regards
> Adam
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-- 
Pascal

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to