jira-importer commented on issue #48: URL: https://github.com/apache/maven-ejb-plugin/issues/48#issuecomment-2879258683
**[Sam Wilson](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=numbsafari)** commented Alright. I've got this working with the maven-assembly-plugin as my workaround. I am deploying to JBoss and so far this is working for me. Basically, in your POM you want to to include the following: [pom.xml] \<build> \<plugins> \<plugin> \<artifactId>maven-ejb-plugin\</artifactId> \<configuration> \<archive> \<manifest> \<!-- include dependencies in manifest classpath --> \<addClasspath>true\</addClasspath> \</manifest> \</archive> \</configuration> \</plugin> <!-- utilize maven assembly plugin to include dependency jars for standalone ejb-jar deployment --> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptors> <descriptor>src/assembly/assembly.xml</descriptor> </descriptors> </configuration> <executions> <execution> <id>package-dependencies</id> <phase>package</phase> <goals> <goal>attached</goal> </goals> </execution> </executions> </plugin> </plugins> \</build> [/pom.xml] Then, you'll have to create a directory called ${root.dir}/src/assembly and in there create a file named assembly.xml with the following: [assembly.xml] \<?xml version="1.0" encoding="UTF-8"?> \<assembly> \<id>jar-with-dependencies-packed\</id> \<formats> \<format>jar\</format> \</formats> \<includeBaseDirectory>false\</includeBaseDirectory> \<dependencySets> \<dependencySet> \<scope>runtime\</scope> \<excludes> \<!-- for some reason the assembly plugin includes the actual jar for the project which causes JBoss to try and register the EJB twice. we exclude it here so that we don't run into this error on startup/redeploy --> \<exclude>${pom.groupId}:${pom.artifactId}\</exclude> \</excludes> \</dependencySet> \</dependencySets> \<fileSets> \<fileSet> \<!-- include the code for the EJB --> \<directory>target/classes\</directory> \</fileSet> \</fileSets> \</assembly> [/assembly.xml] I still think the plugin should be fixed, but I hope this helps people. If the plugin isn't going to be fixed, then perhaps this info should be posted to the site so that people are aware of a workaround for this feature. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org