Welcome!

Java IoT Authors: Liz McMillan, Elizabeth White, Yeshim Deniz, Pat Romanski, Zakia Bouachraoui

Related Topics: Java IoT

Java IoT: Article

Managing a Standardized Build Process Outside of the Eclipse IDE

Point-and-click solutions won't cut it

Post-Processing Steps
As with the pre-processing tasks, the post-processing tasks should avoid items such as copying and renaming files. If an archive has to be given a specific name then that name should be handled on the archive task instead of doing a copy or rename. The use of multiple task dependencies should also be minimized to ensure easy traceability and IT compliance.

Testing
One of the common items to do in the post-processing phase is to test. These tests are usually unit tests such as Junit. But these tests can also include some basic tests about the archive itself, such as checking to see if the correct deployment descriptor and properties files have been used or checking the number of files in the archive to verify at a basic level if all of the source was compiled. Another useful test is to check to see if the archive contains the correct manifest and directory structure. Validating these items before deployment can save you the embarrassment of a production failure. It's best if these items are extracted and e-mailed to a tester to verify their accuracy before deployment.

Deployment
The deployment task should be one of the last steps in the build process. It should be dependent on the Testing task and the Testing task dependent on the Build task. But it shouldn't be the default task that gets executed. You want to give the user the option of just building and testing or building, testing and deploying. This lets someone just deploy.

Variable
Beyond the pre-processing, compiling, and post-processing steps in your Ant/XML scripts, managing variables is also critical in creating a more standardized manual process.

Using variables lets an Ant/XML script be written to execute on multiple machines. This is a cautionary tale, however, because using too many variables makes an Ant/XML script hard to read and debug. It's best to use variables for the directory path on the Jar files in the CLASSPATH and for the source code locations. For example, instead of using:

    c:\jdk2\lib\rt.jar you would use ${JAVAHOME}\lib\rt.jar

This reference will let different users have different working locations. Again, the directory structure of the source code and libraries should be laid out efficiently for builds.

Machine-Specific Variables
If there are any machine-specific items referenced in the Ant/XML script then they should be referenced through a variable and abstracted out. When you write the Ant/XML script assume that you won't be the only one using the script.

By following a standard guideline, your Ant/XML scripts can become easier for another developer in your organization to follow and so more traceable. This is ultimately what you're striving for. Traceability in your build process can only be achieved if someone else can follow the build steps. By maintaining some standard sections such as pre-processing, compiling, and post-processing, your scripts should follow a basic structure that can be easily identified and traced.

Commercial Eclipse plug-ins are available that can substantially minimize the need for Ant/XML scripting. These tools provide a reusable build framework through a standardized interface.

Commercial build tools that simply execute your Ant/XML scripts may be helpful in managing the many scripts that are created over time; however, tools that minimize your scripting effort are preferable because they create a solid reusable framework once that can be reused over and over.

The inherent problem of Ant/XML scripting is that the scripts are written for one jar and one application at a time. This creates a lot of redundancy. Redundancy equates to higher cost and lower quality. Just as you strive for reuse when developing applications, you should strive for reuse in your application build framework. Using scripts to do this is close to impossible because manual Ant/XML scripts contain hard-coded application references.

Commercial tools such as Openmake by Catalyst Systems Corporation, Perfect Build by CodeFast, and Builder by Serena address the scripting issue directly by providing a reusable framework in your build process. Open Source tools such as Maven will also assist you in minimizing the amount of scripting necessary for each jar file you create.

As upper management demands more accountability from the development process, the build component will be scrutinized more closely. A point-and-click process from the Eclipse IDE won't meet the new IT mandates. Neither will overly complicated nor non-standardized build scripts. Eventually you'll be forced out of the comfort of your point-and-click IDE and into a more standardized method. Your choices will be to rely on Open Source languages such as Ant/XML and a lot of hard work or a commercial tool to help you with the job. Regardless of your future build requirements, the effort in creating standards for the build is critical and well worth the effort.

References

More Stories By Steve Taylor

Steve Taylor is an experienced senior developer, bringing 17 years of expertise with client/server and mainframe application development and system integration. Prior to founding Catalyst Systems Corporation, he served as a lead technical consultant responsible for the successful implementation of applications into the production environment. Steve received his BS in computer science/mathematics from the University of Illinois-CU.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


IoT & Smart Cities Stories
SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5–7, 2018, at the Javits Center in New York City, NY. CrowdReviews.com is a transparent online platform for determining which products and services are the best based on the opinion of the crowd. The crowd consists of Internet users that have experienced products and services first-hand and have an interest in letting other potential buye...
In his general session at 19th Cloud Expo, Manish Dixit, VP of Product and Engineering at Dice, discussed how Dice leverages data insights and tools to help both tech professionals and recruiters better understand how skills relate to each other and which skills are in high demand using interactive visualizations and salary indicator tools to maximize earning potential. Manish Dixit is VP of Product and Engineering at Dice. As the leader of the Product, Engineering and Data Sciences team at D...
We are seeing a major migration of enterprises applications to the cloud. As cloud and business use of real time applications accelerate, legacy networks are no longer able to architecturally support cloud adoption and deliver the performance and security required by highly distributed enterprises. These outdated solutions have become more costly and complicated to implement, install, manage, and maintain.SD-WAN offers unlimited capabilities for accessing the benefits of the cloud and Internet. ...
"IBM is really all in on blockchain. We take a look at sort of the history of blockchain ledger technologies. It started out with bitcoin, Ethereum, and IBM evaluated these particular blockchain technologies and found they were anonymous and permissionless and that many companies were looking for permissioned blockchain," stated René Bostic, Technical VP of the IBM Cloud Unit in North America, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Conventi...
René Bostic is the Technical VP of the IBM Cloud Unit in North America. Enjoying her career with IBM during the modern millennial technological era, she is an expert in cloud computing, DevOps and emerging cloud technologies such as Blockchain. Her strengths and core competencies include a proven record of accomplishments in consensus building at all levels to assess, plan, and implement enterprise and cloud computing solutions. René is a member of the Society of Women Engineers (SWE) and a m...
DXWordEXPO New York 2018, colocated with CloudEXPO New York 2018 will be held November 11-13, 2018, in New York City and will bring together Cloud Computing, FinTech and Blockchain, Digital Transformation, Big Data, Internet of Things, DevOps, AI, Machine Learning and WebRTC to one location.
In an era of historic innovation fueled by unprecedented access to data and technology, the low cost and risk of entering new markets has leveled the playing field for business. Today, any ambitious innovator can easily introduce a new application or product that can reinvent business models and transform the client experience. In their Day 2 Keynote at 19th Cloud Expo, Mercer Rowe, IBM Vice President of Strategic Alliances, and Raejeanne Skillern, Intel Vice President of Data Center Group and G...
DXWorldEXPO LLC announced today that All in Mobile, a mobile app development company from Poland, will exhibit at the 22nd International CloudEXPO | DXWorldEXPO. All In Mobile is a mobile app development company from Poland. Since 2014, they maintain passion for developing mobile applications for enterprises and startups worldwide.
Founded in 2000, Chetu Inc. is a global provider of customized software development solutions and IT staff augmentation services for software technology providers. By providing clients with unparalleled niche technology expertise and industry experience, Chetu has become the premiere long-term, back-end software development partner for start-ups, SMBs, and Fortune 500 companies. Chetu is headquartered in Plantation, Florida, with thirteen offices throughout the U.S. and abroad.
DXWorldEXPO | CloudEXPO are the world's most influential, independent events where Cloud Computing was coined and where technology buyers and vendors meet to experience and discuss the big picture of Digital Transformation and all of the strategies, tactics, and tools they need to realize their goals. Sponsors of DXWorldEXPO | CloudEXPO benefit from unmatched branding, profile building and lead generation opportunities.