Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3759420
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T10:18:50+00:00 2026-05-19T10:18:50+00:00

I know there are some similar questions around in Stackoverflow, but they were either

  • 0

I know there are some similar questions around in Stackoverflow, but they were either .Net related or didn’t have any answer that helped us.

The case is as follows: with some friends we are starting an open source project. While setting the foundations of the hopefully successful project, a question arose: how to enforce the code conventions of the project?

The reasoning is that being an open source project, if people starts reformatting the code as they like, the patches will become cluttered with changes due to formatting that will hide the real “value” of the patch. So we want something that forces users to abide to a specific formatting, breaking the build if they don’t.

The project is using Struts 2 + Spring + Hibernate, using Maven 2 (thinking on moving to Maven 3). We know we can use “CheckStyle” to test the Java files, but this leaves some questions open that hopefully someone can answer:

  • There is some tool to check the style of XML and SQL files, breaking the build if they don’t abide to the rules?
  • There is some tool that automatically reformats the source files (Java, XML, SQL) to the desired convention? Can ti be integrated with Maven somehow?

We could find Jalopy for Java files, but we would prefer a free tool (as far as we know, the latest version is paid one). And we still couldn’t find anything for SQL/XML.

UPDATE: just to make it clear: I’m not asking about PMD, Checkstyle or these tools. I’m asking for tools that:

  • Automatically format SQL, XML and/or Java files to a desired coding convention (4 spaces, etc)
  • Detect SQL and XML files with the wrong format and break a build because of that.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T10:18:51+00:00Added an answer on May 19, 2026 at 10:18 am

    It sounds to me like you’re going along the route of creating an open source project and then giving commit access to all. I’d advise against this, whatever measures you try to put in place, someone stupid will come along at some point and sod the whole lot up.

    Instead, I’d advise taking a different approach with commit access and handing it out only to people that prove they pay attention to the rules and restrictions you’ve put in place. They can generate patches, submit them to you and eventually if they’re regular and trustworthy enough, you can hand out commit access.

    One other point, something like Hudson may be of use here (it has a checkstyle plugin as well.) It won’t prevent people committing crap code, but it can create a build and run checkstyle every so often, notifying people on a mailing list if someone screws up the code (either because it won’t build or because someone’s broken checkstyle rules.) Not foolproof, but this would enable you to keep an eye on things more easily.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know there have been some similar questions to this, but they haven't helped
There are some related questions here and here , but they didn't really give
I know there are already several similar questions here, but I need some recommendations
I know there's a million similar questions already, but I'm not sure they apply.
I know there are similar questions like mine, but they are pretty old. I
I know there are lots of similar questions floating around, but none of the
I know, there are some similar questions to the following out there, but I
I know there are some similar questions here but I am trying to get
I know there are already some similar questions here. But I do not want
I know that there are some similar questions, but the answers from there don't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.