|
Sponsored Links
Resources
Enterprise Java Research Library
Get Java white papers, product information, case studies and webcasts
|
News
News
News
|
Messages: 12
Messages: 12
Messages: 12
Printer friendly
Printer friendly
Printer friendly
Post reply
Post reply
Post reply
XML
XML
XML
|
 |
New Build Tool: J2EE + Ant = JAM
JAM is a modular Ant toolkit for developing and testing Java/J2EE applications. JAM supports EJB and Servlet/JSP development using XDoclet, JUnit, Cactus, Maven, Castor and MDA/UML code generation on various J2EE servers including JBoss.
JAM highlights include the following:
- Uses Ant 1.6 import feature to modularize Ant tasks.
- Uses Ant 1.6 target override feature to standardize target names (setup, gen, compile, dist, clean, deploy, test, repo).
- Supports multi-module projects.
- Targets EJB, Servlet/JSP, and standard Java development.
- Promotes logical Ant property organization at the module, project and user levels.
- J2EE application servers are interchangeable.
- Uses Maven POM files to automate classpath and deployment drudgery.
- Uses Maven repository to manage libraries, versioning and installation.
- Supports transparent unit testing using JUnit.
- Supports automated EJB testing using Apache Cactus.
- Leverages XDoclet for EJB and WebApp deployment.
- Supports Apache Struts development.
- Supports MDA/UML code generation via dual source directories.
- Supports Castor XML data binding.
- Supports JBoss 3.x, Resin 2.x and other J2EE application servers.
- Supports automated integration testing via the testcycle target.
JAM is the result of two years of development and refactoring work by the Outsource Café and is published under the GNU GPL open-source license. Developers who use JAM are impressed with its ease of use and depth. Welcome to the community of JAMers.
Links: (NOTE: there is a name collision here with BEA's JAM tool that deals with annotations and javadoc. It is also interesting that BEA had another product called JAM (Java Adapter for Mainframe). We are running out of TLAs!)
|
|
Message #123065
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
New Build Tool: J2EE + Ant = JAM
Sorry for the confusion but you can always use the full name JavaGen Ant Modules when the issue arises. Interestingly all our other name candidates (J2EE Ant Modules, Java Ant Modules, and Java+Ant+Maven) lead to the same JAM temptation, but we are officially blaming our logo artist for making use acronym sinners ;-)
|
|
Message #123097
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
New Build Tool: J2EE + Ant = JAM
I've got a question for JavaGen Ant Modules folks. What particular problem is being addressed by JAM that is not well-solved with Maven+Ant?
|
|
Message #123114
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Maven vs JAM
We had originally hoped to use Maven, but we quickly realized that wed have to rewrite many of the plugins, especially the XDoclet plugin to support requirements like dual source directories. Our Maven builds proved fragile, J2EE functionality was lacking and the documentation sparse. The other issue was lack of developer adoption and we felt that forcing already overwhelmed developers to learn yet another technology would cost us customers.
However, having experienced the elegance of the POM and repository ideas, we decided to use these features by writing a Maven-to-Ant bridge in the form of a Maven plugin. The bridge allows JAM to provide many of Mavens high-level services such as classpath handling, distribution packaging and version management, but from a pure Ant environment. These features along with the new Ant 1.6 import and target override functionality inspired us to refractor our Ant libraries and the results are a very cool, flexible build framework.
We actually see JAM as step towards Maven, not as a competing framework. But until Maven matures, Ant is still the reliable industry workhorse
and we hope JAM makes it a little easier to use.
|
|
Message #123171
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Multisource Maven directories
Hi,
I'm trying out maven and I didn't have to rewrite the plugins to support multiple source directories. Though I had trouble when getting the testing with cactus working when i first started.
Its not trivial to find though I agree, but once you find it (its just a few properties that need to be changed). The maven-genapp plugin provides samples that uses XDoclet + cactus.
|
|
Message #123269
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
JAM has taught me a thing or two about Ant
I am working with a monolithic Java web application with 200k+ lines of code in 500+ Java files. I use Ant to build it and I use Maven for all the generated site documentation.
It's been on my ToDo list for quite some time to modularize the build of the web application to help better define the dependencies in the code. For example, I want a core module, a utils module, a jsp module, a javacc module, a couple xmlbeans modules and separate custom modules to contain the code for each of our customer-specific code pieces.
The only thing that has stopped me separating the code into modules has been that I'd either have to manually re-code the Ant script to handle the modules, or I'd have to use Maven's multiproject support (and still have to convert some of my Ant script for use in Maven), and frankly, both approaches have scared me enough to not tackle the problem until now. When I investigated JAM, it looked like a quicker and safer solution to this issue than the other approaches.
With the help of JAM I was able to quickly and easily modularize the utils piece, and I also have JAM compiling my entire core module. I really like that I can maintain my modules' dependencies using Maven's POM and use the JavaGen plug-in to easily create a classpath.xml file for JAM's Ant modules.
On the downside, my web application is deployed to iPlanet and Tomcat, and at present JAM does not provide a JAM appserver modules for those. I must admit that I'm impressed enough with JAM at the moment that I'm considering writing my own Tomcat appserver module, but I don't know if I have the luxury to do that at this time. Also, there are no JAM modules ready-made to handle my JavaCC and XmlBeans needs.
Nevertheless, if nothing else, JAM has started to show me how to fully utilize the new capabilities of Ant 6.1 to create a modular and flexible build system for my multi-module application.
|
|
Message #123270
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Cactus support
The maven-genapp plugin provides samples that uses XDoclet + cactus. Thanks for the maven-genapp plugin pointer, I hadnt noticed all the examples before.
As for as Maven Cactus goes, we had problems with the Ant tasks, not the Maven plugin. The Cactus Ant scripts are very powerful but we needed more flexibility. For example, we needed to be able to start the server or connect to an existing running server, or either run the full integration cycle (start-compile-deploy-test-undeploy-stop) or perform each step manually. Breaking out the Cactus functionality into Ant individual targets gave us this flexibility. Finally, JAM supports other test frameworks that dont have all the cool Cactus server handling, so we had to do it in Ant anyway.
|
|
Message #123274
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Incremental Release?
Can I do an incremental release using this JAM tool?
i.e Only updated files ( mostly JSP/property/Jar files ) needs to be created for distribution to different environments ( dev/test/production )
Thanks Murthy
|
|
Message #123280
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Incremental Release?
The short answer is not yet. However, JAM was built as a foundation for doing this sort of thing, so its in the works.
By the way, this is actually easy if youre working with a networked file system, you just use the copy task and it only copies newer files. Updating files to a remote server is another matter, you have to use SCP (SSH copy) and I dont know how you check individual file timestamps on the server. Anybody know?
JAM does supports incremental build and testing at the module level, you can look at the EJB module in the Petstore demo (http://www.javagen.com/petstoredemo.jsp) to see how its done.
|
|
Message #129805
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
javagen on OS X
Should the build.xml template work on OS X? I'm having problems getting the Javagen build.xml file to work under OS X 10.3.3, because of the Ant task <property>.
In the standard build.xml, Javagen makes use of an environment variable called JAM_HOME. From the User's Guide: ---> Must be defined in each build file before the import statements so Ant can find the JAM modules. To avoid hard-coding, the JAM location define JAM_HOME as an environmental variable pointing to the directory you installed JAM in. Then include the following two lines above your import statements: <property environment="env"/> <property name="jam.home" location="${env.JAM_HOME}"/> <---
Altough this works fine on WinXP, "env" doesn't seem to be doing the right thing for me on 10.3.3, so "jam.home" doesn't get set properly. Reading up on the <property> task for Ant, I see this note about the environment attribute for the property element:
---> ...the prefix to use when retrieving environment variables. Thus if you specify environment="myenv" you will be able to access OS-specific environment variables via property names "myenv.PATH" or "myenv.TERM"....This functionality is currently only implemented on select platforms. Feel free to send patches to increase the number of platforms this functionality is supported on ;). <---
I can't tell what the "select platforms" are, so I'm wondering if Javagen has been used on Mac yet. It's been very useful to me on XP for the last month, so thanks!
|
|
Message #131513
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
javagen on OS X - Patch
There are only a few references to the 'env' property, which can be overridden to easily solve this problem. Just hard-code the following property declarations early on in your build file (changing the values to match your setup):
<property name="jam.home" location="/dev-tools/jam"/> <property name="maven.home" location="/dev-tools/maven-1.0"/> <property name="jboss.dist" location="/dev-tools/jboss-3.2.3"/>
Hope this helps...
|
|
 |
New content on TheServerSide.comNew content on TheServerSide.comNew content on TheServerSide.com |
 |
 |
Reza Rahman explores the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6.
(November 2, Article)
SAML is an XML-based standard for exchanging authentication and authorization data between security domains. The single most important problem that SAML was created to solve is the Web browser Single Sign-On problem. Many organizations are debating whether to stay with version 1.1 or move to 2.0. This article makes observations about both options.
(September 28, Article)
Joe Ottinger takes a look at how people learn, and applies it to the practice of programming. He notes that understanding how people learn is an essential part of working in a programming team.
(September 22, Article)
Stephen Maryka gave us an article about the Asynchronous Web and posed a number of questions that get examined like an approach to delivering Asynchronous Web capabilities through extensions to existing Java EE technologies.
(July 14, Article)
JavaServer Faces Flex goal is to provide users capability in creating standard Flex components, part of flexSDK which is open sourced through MPL license, as normal JSF components. This article by Ji Hoon Kim will provide an overview of creating a simple multilingual JSF page consisting of JSF Flex tags.
(June 29, Article)
In this session Jeff explores the key characteristics of successful SOA projects. He covers some of the patterns, and anti-patterns, tool sets, and strategies that he himself learned the hard way. Last, he provides a strategy and blueprint for achieving a high likelihood of success in your SOA project.
(June 23, Tech Talk)
Ari Zilka, CTO of Terracotta, Inc., talks about the new features in Terracotta 3.1, announced during JavaOne and available now.
(June 15, Tech Talk)
In this Tech Talk, Josh Long explores an integration challenge using Spring Integration and walks through the implementation, employing and expanding on the basic patterns of Enterprise Application Integration to tie together components into a function integration solution, and then demonstrates how Spring Integration helps address the integration requirements.
(June 15, Tech Talk)
In this Tech Talk, David Geary teaches you: The basics of Google Web Toolkit; How to implement Ajax-enabled applications in Java; Internationalization; Hooking into the browser history mechanism; Remote procedure calls.
(June 4, Tech Talk)
Jon Kern discusses the best architecture/technical solutions and ensure that they are repeated by all developers. By tackling the architecture up-front in a serial manner, subsequent parallel development will be much more manageable and predictable.
(May 28, Tech Talk)
This keynote describes the frustrations of modern knowledge workers in their quest to actually get some work done, and solutions for how to guard yourself against all those distractions. Neal Ford talks about environments, coding, acceleration, automation, and avoiding repetition as ways to defeat the misguided attempts to sap your ability to produce good work.
(May 26, Tech Talk)
Gil demonstrates how new, aggressive uses of already abundant compute capacity by common applications offer competitive value for application designers.
(May 21, Tech Talk)
Chris Keene introduces WaveMaker as a new way to automate the ability to generate Hibernate classes in order to more quickly bring OR mapping into an application.
(May 19, Article)
In this session Nati Shalom demonstrates how to take a standard Java EE web application and scale it out or down dynamically without changes to the application code. Seeing as most web applications are over-provisioned to meet infrequent peak loads, this is a dramatic change because it enables growing your application as needed, when needed, without paying for unutilized resources.
(May 19, Tech Talk)
Mastering EJB was one of the original and most influential EJB books in the industry. Mastering EJB III now returns with two new expert co-authors, updated for EJB 2.1 and 30% new chapters including security, integration, best practices, open source, and more.
(Book PDF Download)
The Application Server Matrix is a detailed listing of J2EE vendors and their application server products, with information on latest version numbers, J2EE spec support and licensing, pricing, platform support, and links to product downloads and reviews.
(Application Server Comparison Matrix)
|
|