The Gluster Blog

Gluster blog stories provide high-level spotlights on our users all over the world

A couple of experiments with advanced maven projects.

Gluster
2013-08-24

Maven is increasingly being used to do more than build large, heterogenous projects: 

  • It provides idioms for the entire software development life cycle.
  • Its no longer java specific: See the ambari and bigtop projects as examples of maven powered builds which manage heterognous, non java projects.
  • Unlike RPMs, the integration with the maven’s repository framework makes it easy to release artifacts using the same tool that you use to build them. 

I’ve created a small example project to demonstrate some of the trickier/advanced maven features which become important in real-world projects, which I’ll update over time with more examples.  The code for this stuff is here: https://github.com/jayunit100/maven-examples.

Experiment 0: Super modules: Whats inherited? 

If you run the “mvn test” command, you’ll notice that two tests run.  These are in the submodule.  However, if you look closely, the submodule has no dependencies (missing junit) nor the build declaration to run surefire.  This tells us that inheritance of all the super module top level tags cascades into the submodule.  So the take home: If you have a family of related projects with common dependencies and system property configurations ~ you can use maven submodules to structure them.


Experiment 1: Environment Variables.

If we export an environment variable “X” before running “mvn test”, we find that it will be available in the submodule as “env.X” in the System.getProperties() function, but also available as “X” in the System.getenv() properties. 

BLOG

  • 06 Dec 2020
    Looking back at 2020 – with g...

    2020 has not been a year we would have been able to predict. With a worldwide pandemic and lives thrown out of gear, as we head into 2021, we are thankful that our community and project continued to receive new developers, users and make small gains. For that and a...

    Read more
  • 27 Apr 2020
    Update from the team

    It has been a while since we provided an update to the Gluster community. Across the world various nations, states and localities have put together sets of guidelines around shelter-in-place and quarantine. We request our community members to stay safe, to care for their loved ones, to continue to be...

    Read more
  • 03 Feb 2020
    Building a longer term focus for Gl...

    The initial rounds of conversation around the planning of content for release 8 has helped the project identify one key thing – the need to stagger out features and enhancements over multiple releases. Thus, while release 8 is unlikely to be feature heavy as previous releases, it will be the...

    Read more