where is dukes-age in maven archetype? per first cup of JEE7

后端 未结 5 2002
梦如初夏
梦如初夏 2021-01-22 14:07

I\'m following the JEE7 first cup directions for EJB:

Before you can create applications based on the archetypes, you must first install the archetypes

相关标签:
5条回答
  • 2021-01-22 14:49
    1. Click Open Project
    2. Go to %YOUR_GLASSFISH_FOLDER%\docs\firstcup
    3. Open examples

    Note that Java EE SDK comes with Glassfish and NetBeans comes with Glassfish. You need the Glassfish from Java EE SDK.

    1. Right-click the firstcup project in the Projects pane and select Build.

    Now you can create an application based on dukes-age archetype - just follow the instructions in clause 3.2.2.2 of tutorial. In my case it took maybe 10 minutes after step 5 until dukes-age-archetype has appeared in Known Archetypes, so you'll need to be patient.

    0 讨论(0)
  • 2021-01-22 14:55

    Here is what I figured. Throwing it here as additional info.

    The archtypes are not available in the glassfish install that comes packaged with Netbeans 8.0.1. I downloaded Java EE SDK update 1 from http://www.oracle.com/technetwork/java/javaee/downloads/index.html.

    Once the downloaded .zip is extracted, the java_ee_sdk-7u1\glassfish4\docs\firstcup\example folder contains the archtypes.

    0 讨论(0)
  • 2021-01-22 15:01

    Once you open the first cup project in NetBeans from javee7 sdk, you should edit the pom.xml with:

    <groupId>org.glassfish.javaeetutorial.firstcup</groupId>
      <artifactId>dukes-age-archetype</artifactId>
      <packaging>maven-archetype</packaging>
    

    Then build the dukes-age-archetype project to get listed in the known types.

    0 讨论(0)
  • 2021-01-22 15:06

    A bit old topic.

    Not sure is it a bug or not but building First Cup project/module from intellij doesn't create any maven archetype for me. I followed following steps to get the maven dukes-age archetype.

    1. Install IntelliJ Maven Archetype Catalog plugin https://plugins.jetbrains.com/plugin/7965-maven-archetype-catalogs

    2. Run mvn clean install from First Cup root. It will create archetype-catalog.xml in maven repository root directory

    3. Add the xml path to Maven Archetype Catalog. File -> Settings -> Build execution, Deployment -> Build tools -> Maven Archetype Catalog

    Now org.glassfish.docs:* archetype should appear

    0 讨论(0)
  • 2021-01-22 15:10

    it's available here:

    https://java.net/downloads/glassfish-samples/

    although it also seems to ship with glassfish itself.

    0 讨论(0)
提交回复
热议问题