0

Where, or how, can I download the dukes-age sample? It should be available from maven, apparently:

From the File menu, select New Project. Under Categories, select Maven. Under Projects, select Project from Archetype. Click Next. In the Search field, enter dukes-age. In the Known Archetypes field, select dukes-age-archetype.

Since it wasn't showing in netbeans, I turned to the CLI:

thufir@dur:~/maven$ 
thufir@dur:~/maven$ mvn archetype:generate -Dfilter=dukes
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>>
[INFO] 
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<<
[INFO] 
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
[INFO] Your filter doesn't match any archetype, so try again with another value.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.943s
[INFO] Finished at: Mon Aug 04 12:57:12 PDT 2014
[INFO] Final Memory: 10M/25M
[INFO] ------------------------------------------------------------------------
thufir@dur:~/maven$ 
thufir@dur:~/maven$ mvn -v
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.7.0_51, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-i386/jre
Default locale: en_CA, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-24-generic", arch: "i386", family: "unix"
thufir@dur:~/maven$ 

but, so far, get similar results. Do I need to specify a repo, or something similar?

Community
  • 1
  • 1
Thufir
  • 8,216
  • 28
  • 125
  • 273

4 Answers4

1

The archetype is not deployed to maven central. But you can still build and use the arche type from the source code here: https://svn.java.net/svn/firstcup~svn/trunk/example/archetypes/dukes-age-archetype/

6ton
  • 4,174
  • 1
  • 22
  • 37
  • out of curiosity, how do I get it from maven? – Thufir Aug 04 '14 at 20:34
  • You either find an open source maven repo that hosts this archetype. or build and deploy it to a local maven repository and then point netbean/eclipse or maven cli to this. – 6ton Aug 04 '14 at 20:38
1

Have you completed section 3.2.1.1 of FirstCup tutorial?

Maybe this will help: https://stackoverflow.com/a/25132779/2944398

Community
  • 1
  • 1
infranoise
  • 277
  • 4
  • 18
  • how do you install: `In NetBeans IDE select File, then Open Project, navigate to tut-install` ... `The required projects, including the archetypes, will be built.` but...where is `tut-install`? I cannot find it. – Thufir Aug 10 '14 at 07:38
  • The tut-install directory is a variable. The tutorial is bundled with GlassFish and the Java EE SDK, but can also be installed separately. – Ian Evans Sep 04 '14 at 19:26
1

it's available here:

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

although it also seems to ship with glassfish itself.

see also

https://stackoverflow.com/a/25649721/262852

Community
  • 1
  • 1
Thufir
  • 8,216
  • 28
  • 125
  • 273
1

You can find it in NetBeans (8.0.2) like so, replacing the tutorial advice "In NetBeans IDE select File, then Open Project, navigate to tut-install/, select example, deselect the Open Required Projects check box, and click Open Project." which has non-existing path tut-install with the path: %YOUR_JAVA_EE7_SDK_FOLDER%\glassfish4\docs\firstcup

Then firstcup should appear in the "Project Name" field. You then click the "Open Project" button.

For me, the two archetypes initially were "mavened" unsuccessfully (warning icons in Project view). Resolved by right-clicking on each archetype in Projects view, then "Build", then "Resolve.." errors which started some Priming build, which resolved the errors.

From then on you should find "dukes-age-archetype" (and "firstcup-war-archetype") via New Project - Maven - Project from Archetype - Search e.g. with searchterm "firstcup"

Mike Elofson
  • 2,017
  • 1
  • 10
  • 16