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 344797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:01:26+00:00 2026-05-12T11:01:26+00:00

The Grails framework has a lot of constructs/features that allows for adhering to the

  • 0

The Grails framework has a lot of constructs/features that allows for adhering to the DRY principle (“don’t repeat yourself”) within a project. That is: within a specific project you’re seldom required to repeat identical blocks of settings or code. So far so good.

However, the more I’ve worked with Grails the more of I’ve observed that I repeat code not within the same project but between projects. That is project A has controllers, GSP:s and images that overlaps with project B. This is a maintenance nightmare since bug fixes in project A must also be fixed in project B, etc.

I’d like to take DRY to the next level by not duplicating code between my projects.

My question: How do you tackle this problem (violated “inter-projects DRY”) in your own internal Grails projects?

Please be very specific/concrete. If possible try to include specific code examples on how you solve it in practice.

  • 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-12T11:01:26+00:00Added an answer on May 12, 2026 at 11:01 am

    I agree with Lee, Using common/shared plugins is probably the best way to go. At one place that I worked we had quite a few internal plugins for this very reason.

    The most common pattern is to put your common domain objects into their own plugin. This works really well for domain classes or services. We didn’t end up refactoring the controllers, views, and static resources into a plugin, but the same principle should apply.

    Long story short: Reuse of Grails artifacts = use a plugin.

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

Sidebar

Related Questions

I am creating one web application in GRAILS framework.In that I want to implement
I have a WAR file that was built using grails framework and OSGi plugin.
I plan to build a database management system using Grails as the main framework.
Grails tends to write out the URL for everything that uses its tags as
Grails is great. Yet, sometimes, we just need a quick, lightweight web framework. Is
I have been working Quartz framework in my grails project with lib called quartz-all-1.7.3.
I'm developing application using Grails framework and I'm having problems with hasErrors when invoked
I would like to view the source of the Grails framework to check the
I am a beginner in Grails 2.0 framework and I am trying to follow
Using Play or Grails or any other JVM framework; Is there a way (or

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.