[JAVAEETUTORIAL-65] Consider create examples also using Maven Created: 07/Mar/12  Updated: 12/Jun/13  Resolved: 15/Aug/12

Status: Resolved
Project: javaeetutorial
Component/s: None
Affects Version/s: 6.0.4
Fix Version/s: 7.0.0

Type: Improvement Priority: Major
Reporter: Manfred Riem Assignee: Ian Evans
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
blocks JAVAEETUTORIAL-45 Move resource creation/deletion Ant t... Closed


Rationale a lot of large organizations use Maven instead of Ant.

Comment by Ian Evans [ 02/Apr/12 ]

We're looking into moving to Maven for Java EE 7. It would certainly be easier to support other IDEs and not have to maintain Ant build files.

I'll update this issue as we discuss the impact of changing our infrastructure to Maven.

Comment by Brant Gurganus [ 28/Jun/12 ]

I think the build system would be outside the scope of the information a tutorial on Java2 Enterprise Edition should cover. As is, the tutorial seems cluttered with: "Here's how to do it in Netbeans. Here's how to do it in Ant." I see merit in "Here's how to get up and running with Netbeans, Ant, Maven, Eclipse, etc." but having instructions for everything everywhere distracts from learning J2EE. This isn't a Maven tutorial, it's a J2EE tutorial.

An alternative approach that I think works is J2EE tutorial for Ant, J2EE tutorial for Netbeans, J2EE tutorial for Maven. Gentoo Linux used to do something along those lines generating architecture-specific installation guides so that the instructions for one architecture didn't distract from instructions for a different architecture. I don't know how the source for the tutorial is processed though to know how feasible such an idea might be.

Comment by Ian Evans [ 28/Jun/12 ]

Producing parallel tutorials is basically too much of a strain on our resources. We're looking at reducing the number of alternate build/deploy/run instructions by moving to a single build system in Maven that could be run within NetBeans (or any other Maven-aware IDE) and the mvn command line tool.

While technically the development and build environment is outside the scope of the Java EE platform, for the sake of our novice users we need explicit instructions on how to build and run our example applications. We get a lot of user feedback supporting this. We also get feedback from expert users like you that feel the build instructions get in the way. So we try to strike a balance between these two groups. We attempt to make our example applications runnable out of the box to the extent that it is possible, with as few steps as possible, and to do that we need to provide instructions for a common build environment.

We don't provide step-by-step instructions for creating Java EE applications using NetBeans, as that is (or should be) covered by the NetBeans documentation and our First Cup tutorial. We wouldn't provide instructions on, e.g. generating Java EE projects using Maven archetypes. Rather, the instructions would be similar to what we currently do with Ant: a set of steps to get the raw project deployed and running on the Java EE RI server.

Comment by Brant Gurganus [ 29/Jun/12 ]

I think you're on the right track then. It was sounding like Maven in addition to the existing Ant and Netbeans, and that'd definitely be a bit much. Glad you regard me as an expert user, haha. I'm actually pretty much a novice with J2EE, hence why I'm reading through the tutorial.

Comment by Ian Evans [ 15/Aug/12 ]

We will migrate our examples to use Maven for Java EE 7. Following the 6.0.7-6 release, we will branch the workspace for continuing Java EE 6 work, and migrate the examples in the trunk to Maven.

Comment by Ian Evans [ 15/Aug/12 ]

This improvement will be implemented in the Java EE 7 Tutorial and the Java EE 7 version of First Cup.

Comment by Ian Evans [ 12/Jun/13 ]

Java EE 7 was released today, as was the first Mavenized releases of the Java EE 7 Tutorial and First Cup tutorial examples:

Generated at Thu Mar 23 13:32:37 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.