Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 357213

Summary: app-client type project sources can't see ejb-client type dependencies
Product: z_Archived Reporter: Sahoo <sanjeeb.sahoo>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: CLOSED NOT_ECLIPSE QA Contact:
Severity: normal    
Priority: P3 CC: igor
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Standalone Test Case none

Description Sahoo CLA 2011-09-09 07:07:29 EDT
Build Identifier: 20110615-0604

I am building an ear file containing an ejb-jar and appclient. 
I have set up my ejb project like this so that a separate ejb-client type artifact is generated by the build which I can then reference from my appclient project:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-ejb-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <ejbVersion>3.1</ejbVersion>
                   <generateClient>true</generateClient>
                  <clientIncludes>
                  	<clientInclude>**/MyEJBRemote.class</clientInclude>
                  </clientIncludes>
                </configuration>
            </plugin>

My appclient project's pom looks like this:

    <groupId>sahoo</groupId>
    <artifactId>javaeeapp1.appclient</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>app-client</packaging>

    <dependencies>
		<dependency>
			<groupId>sahoo</groupId>
			<artifactId>javaeeapp1.remoteejb1</artifactId>
			<version>0.0.1-SNAPSHOT</version>
                        <!-- Only depend on the ejb-client jar -->
			<type>ejb-client</type>
			<scope>provided</scope>
		</dependency>
    </dependencies>

In source code of this project, I can't reference any artifact from this dependency, although maven build succeeds from command line. I am attaching the whole maven project here so that one can reproduce easily.

Reproducible: Always
Comment 1 Sahoo CLA 2011-09-09 07:08:16 EDT
Created attachment 203047 [details]
Standalone Test Case
Comment 2 Igor Fedorenko CLA 2011-09-09 07:34:30 EDT
There are no plans to support JEE development directly in m2e core. I am aware of at least two opensource efforts to provide such support on top of m2e (m2e-wtp and webby) and I think m2e-wtp has supports for ejbs so you may want to look at it.
Comment 3 Sahoo CLA 2011-09-09 07:38:21 EDT
I am already using m2e-wtp. I am not sure if this is a bug in m2e-wtp or m2e. I thought classpath handling is a core plugin's responsibility. If you think differently, please assign to the right group. Thanks.
Comment 4 Igor Fedorenko CLA 2011-09-09 07:40:59 EDT
please report m2e-wtp issues to https://issues.sonatype.org/browse/MECLIPSEWTP
Comment 5 Denis Roy CLA 2021-04-19 13:24:27 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/