You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "jira-importer (via GitHub)" <gi...@apache.org> on 2025/05/16 14:40:26 UTC
[I] [MEJB-3] Add ejb bundle feature like in maven 1 [maven-ejb-plugin]
jira-importer opened a new issue, #48:
URL: https://github.com/apache/maven-ejb-plugin/issues/48
**[Alexandre Vivien](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=neoptoleme)** opened **[MEJB-3](https://issues.apache.org/jira/browse/MEJB-3?redirect=false)** and commented
It could be nice if we could include dependencies in the ejb jar produce by the ejb plugin. In fact, I think an ejb bundle feature like in Maven 1 will be useful. We could use the dependencies scope or whatever. (Perhaps it can be handy to add a new scope name "bundle" that could be use with ejb, war and ear plugin ???? )
Thanks.
Alexandre Vivien
---
6 votes, 6 watchers
--
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-unsubscribe@maven.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [MEJB-3] Add ejb bundle feature like in maven 1 [maven-ejb-plugin]
Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #48:
URL: https://github.com/apache/maven-ejb-plugin/issues/48#issuecomment-2879258665
**[Alexandre Vivien](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=neoptoleme)** commented
I don't know, I didn't use the EJB plugin since this issue. What does the EJB plugin produce when you try to use it ???
--
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-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [MEJB-3] Add ejb bundle feature like in maven 1 [maven-ejb-plugin]
Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #48:
URL: https://github.com/apache/maven-ejb-plugin/issues/48#issuecomment-2879258679
**[Sam Wilson](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=numbsafari)** commented
Any status on this issue? I saw it was "downgraded" to being a "new feature", although this functionality is supported in the Maven 1.0 version of the plugin.
Has anybody tried any work arounds? I'm going to explore the maven-assembly-plugin to see if I can accomplish the same thing that way.
--
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-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [MEJB-3] Add ejb bundle feature like in maven 1 [maven-ejb-plugin]
Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #48:
URL: https://github.com/apache/maven-ejb-plugin/issues/48#issuecomment-2879258688
**[Sam Wilson](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=numbsafari)** commented
Just found a minor mistake in my post above.
Be sure to include "\<outputDirectory>\</outputDirectory>" after \<directory>target/classes\</directory> in the assembly.xml file or else your EJB code will be packaged under target/classes inside the jar.
Sorry 'bout that.
--
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-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [MEJB-3] Add ejb bundle feature like in maven 1 [maven-ejb-plugin]
Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
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-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [MEJB-3] Add ejb bundle feature like in maven 1 [maven-ejb-plugin]
Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #48:
URL: https://github.com/apache/maven-ejb-plugin/issues/48#issuecomment-2879258673
**[Louisa Nilsen-Nygaard](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=louisa)** commented
all that it produces is a JAR containing the class files that are in the EJB source. i haven't been able to find a way to include the neccessary jars into the EJB jar, but using a manifest file i have been able to include them into the WAR file in which the EJB is packaged. it isn't the best solution in my case, and doesn't seem to work in every situation, but it will probably do for the moment..
--
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-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [MEJB-3] Add ejb bundle feature like in maven 1 [maven-ejb-plugin]
Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #48:
URL: https://github.com/apache/maven-ejb-plugin/issues/48#issuecomment-2879258662
**[Louisa Nilsen-Nygaard](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=louisa)** commented
I am in somewhat desperate need of this feature to bundle stuff into my EJB JAR. Has there been any progress on it?
--
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-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [MEJB-3] Add ejb bundle feature like in maven 1 [maven-ejb-plugin]
Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #48:
URL: https://github.com/apache/maven-ejb-plugin/issues/48#issuecomment-2879258707
**[Karl Heinz Marbaise](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=khmarbaise)** commented
Based on the age of the issue i will close the issue. If you have any objections or new information etc. don't hesitate to reopen the issue.
--
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-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [MEJB-3] Add ejb bundle feature like in maven 1 [maven-ejb-plugin]
Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #48:
URL: https://github.com/apache/maven-ejb-plugin/issues/48#issuecomment-2879258699
**[johan Eltes](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=johaneltes)** commented
I'm on Maven 2.0.5. Although I've added the ejb plugin configuration stated above...
\<build>
\<plugins>
\<plugin>
\<artifactId>maven-ejb-plugin\</artifactId>
\<configuration>
\<archive>
\<manifest>
\<!-- include dependencies in manifest classpath -->
\<addClasspath>true\</addClasspath>
\</manifest>
\</archive>
\</configuration>
\</plugin>
... my dependencies don't get listed in the ClassPath: entry of the generated MANIFEST.MF. Is there anything else I need to do? Any specific scope to be defined for the dependencies?
--
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-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [MEJB-3] Add ejb bundle feature like in maven 1 [maven-ejb-plugin]
Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #48:
URL: https://github.com/apache/maven-ejb-plugin/issues/48#issuecomment-2879258706
**[Michal Galet](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=galet)** commented
If you just want to include your dependencies into your EJB jar file a simple workaround is:
```xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
</execution>
</executions>
<configuration>
<outputDirectory>target/classes</outputDirectory>
<includeScope>runtime</includeScope>
</configuration>
</plugin>
. . .
```
--
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-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org