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
%YOUR_GLASSFISH_FOLDER%\docs\firstcup
examples
Note that Java EE SDK comes with Glassfish and NetBeans comes with Glassfish. You need the Glassfish from Java EE SDK.
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.
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.
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.
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.
Install IntelliJ Maven Archetype Catalog plugin https://plugins.jetbrains.com/plugin/7965-maven-archetype-catalogs
Run mvn clean install
from First Cup root. It will create archetype-catalog.xml
in maven repository root directory
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
it's available here:
https://java.net/downloads/glassfish-samples/
although it also seems to ship with glassfish itself.