Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8015979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:24:47+00:00 2026-06-04T20:24:47+00:00

I made an EJB project through Maven using org.codehaus.mojo.archetypes:ejb-jee5 lastest version. Then I typed

  • 0

I made an EJB project through Maven using “org.codehaus.mojo.archetypes:ejb-jee5” lastest version.

Then I typed “mvn install” and “mvn eclipse:eclipse”.

Finally I imported it as a general java project in eclipse but the project is not being recognised as being EJB capable.

What did I do wrong?

Thanks

EDIT

tried this as suggested by an awnser, doesn’t work

<build>
    <plugins>   
        <plugin>
            <artifactId>maven-eclipse-plugin</artifactId>
            <configuration>
                <buildcommands>
                    <buildcommand>org.eclipse.wst.common.project.facet.core.builder</buildcommand>
                    <buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
                    <buildcommand>org.eclipse.wst.validation.validationbuilder</buildcommand>
                </buildcommands>
                <additionalProjectnatures>
                    <projectnature>org.eclipse.jem.workbench.JavaEMFNature</projectnature>
                    <projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature</projectnature>
                    <projectnature>eclipse.jdt.core.javanature</projectnature>
                    <projectnature>org.eclipse.wst.common.project.facet.core.nature</projectnature>
                </additionalProjectnatures>
            </configuration>
        </plugin>
    </plugins>
</build>

EDIT

Apparently adding those builder and natures to your .project is not enougth, an xml file describing wich facet is enabled must be generated too, in order to do that I should add the following code betwen the ” tags

<additionalProjectFacets>
    <jst.java>1.6</jst.java>
    <jst.ejb>3.0</jst.ejb>
</additionalProjectFacets>

However those 4 line generate a ‘Build failure’

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T20:24:50+00:00Added an answer on June 4, 2026 at 8:24 pm

    So I found out, as expected modifying the project natures is not enought, you also have to generate other file describing thing such as activated facets, etc.

    add this to your EJB project and it will be recognized as an EJB without m2e.

        <build>
            <plugins>
                <plugin>
                    <artifactId>maven-eclipse-plugin</artifactId>
                    <configuration>
                        <additionalBuildcommands>
                            <buildCommand>
                                <name>org.eclipse.jdt.core.javabuilder</name>
                            </buildCommand>
                            <buildCommand>
                                <name>org.eclipse.wst.common.project.facet.core.builder</name>
                            </buildCommand>
                            <buildCommand>
                                <name>org.eclipse.wst.validation.validationbuilder</name>
                            </buildCommand>
                            <buildCommand>
                                <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
                                <arguments>
                                    <LaunchConfigHandle>&lt;project&gt;/.settings/MavenBuilder.launch</LaunchConfigHandle>
                                </arguments>
                            </buildCommand>
                        </additionalBuildcommands>
                        <additionalProjectnatures>
                            <projectnature>org.eclipse.wst.common.project.facet.core.nature</projectnature>
                            <projectnature>org.eclipse.jdt.core.javanature</projectnature>
                            <projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature</projectnature>
                            <projectnature>org.eclipse.jem.workbench.JavaEMFNature</projectnature>
                        </additionalProjectnatures>
                        <additionalConfig>
                            <file>
                                <name>.settings/org.eclipse.wst.common.project.facet.core.xml</name>
                                <content>
                                    <![CDATA[<faceted-project>
        <runtime name="my JBoss Runtime" />
        <fixed facet="jst.ejb" />
        <fixed facet="jst.java" />
        <installed facet="jst.java" version="6.0" />
        <installed facet="jst.ejb" version="3.0" />
    </faceted-project>]]>
                                </content>
                            </file>
                            <file>
                                <name>.settings/org.eclipse.wst.common.component</name>
                                <content>
                                    <![CDATA[
    <project-modules id="moduleCoreId" project-version="1.5.0">
        <wb-module deploy-name="${project.artifactId}">
            <wb-resource deploy-path="/" source-path="/src/main/java" />
            <wb-resource deploy-path="/" source-path="/src/main/resources" />
            <property name="java-output-path" value="target/classes" />
        </wb-module>
    </project-modules>]]>
                                </content>
                            </file>
                            <file>
                                <name>.checkstyle</name>
                                <content>
                                    <![CDATA[<fileset-config file-format-version="1.2.0" simple-config="true">
        <fileset name="all" enabled="true" check-config-name="Myproject Checks" local="false">
            <file-match-pattern match-pattern="." include-pattern="true" />
        </fileset>
    </fileset-config>]]>
                                </content>
                            </file>
                            <file>
                                <name>.settings/MavenBuilder.launch</name>
                                <content>
                                    <![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
    <stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="$${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;launchConfigurationWorkingSet editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot; factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; label=&quot;working set&quot; name=&quot;working set&quot;&gt;&#13;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/acces-services/target/test-classes&quot; type=&quot;2&quot;/&gt;&#13;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/acces-services/target/classes&quot; type=&quot;2&quot;/&gt;&#13;&#10;&lt;/launchConfigurationWorkingSet&gt;}" />
    <booleanAttribute key="org.eclipse.debug.core.capture_output" value="false" />
    <booleanAttribute key="org.eclipse.debug.ui.ATTR_CONSOLE_OUTPUT_ON" value="false" />
    <booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false" />
    <stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="$${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;launchConfigurationWorkingSet editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot; factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; label=&quot;workingSet&quot; name=&quot;workingSet&quot;&gt;&#13;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/acces-services/src/test/resources&quot; type=&quot;2&quot;/&gt;&#13;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/acces-services/src/main/resources&quot; type=&quot;2&quot;/&gt;&#13;&#10;&lt;/launchConfigurationWorkingSet&gt;}" />
    <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${env.M2_HOME}\bin\mvn.bat" />
    <stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,clean" />
    <stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="resources:resources resources:testResources --offline" />
    <booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true" />
    <stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="$${workspace_loc:/acces-services}" />
    </launchConfiguration>]]>
                                </content>
                            </file>
                        </additionalConfig>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    

    notice that We are defining wich Server runtime is being used, meaning you have to configure a server runtime before and put it’s name inside.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While trying to call an EJB made using NETbeans (using jdk1.7) from a client
Made a new project, added main.cpp and wrote the code at this URL: http://www.boost.org/doc/libs/1_43_0/doc/html/boost_asio/example/echo/async_tcp_echo_server.cpp
I'm using EJB and JSF. I made a jsp simple page with a button
here is my problem, I made an EJB with maven and 2 test clients,
Somebody knows an example of this? an application made with JSF 2.0 and EJB
I made a page using HTML which have some .jpg files and some .swf
I made a custom cell in a UITableView using IB and Storyboards. The code
I made a small Rest webservice using Jersey 1.11. When i call the url
I made a script which iterates through a couple pages of a third party
Made an application which targets .net 4 client. Created an installer using Inno Setup

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.