jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Mod4j: Modeling for Java using Domain Specific Languages
  • Mod4j: Modeling for Java using Domain Specific Languages
  • MODFORJ-88

Incremental cascading builds

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: Wish List
  • Component/s: Eclipse integration
  • Labels:
    None
  • Number of attachments :
    0

Description

When running a incremental build in Eclipse, you can easily run into compile problems in the generated code. For instance if you have modeled the following domain class and dto class

class Product [
    string productNumber;
    decimal price;
]

class FullProductDto represents Product

The following code is generated into generated-sources folder of the service module:
../generated-sources/org/company/recordshop.service.dto.translators

public class FullProductDtoTranslator {
...
    if (target == null) {
            if (source.getId() != null) {
                throw new TranslatorException(
                        "Can not translate a dto with existng id to a new domain object.");
            }
            target = new Product(source.getProductNumnber(), source.getPrice());
        }
...

Problem:
When you remove or rename a attribute element from the Product class in the model-file and save it, an incremental build will be executed by the Mod4jBuilder. This will regenerate sources into the domain and data layers, but not for the dependent sources in the service layer. Resulting into compile errors at the last code-line in the code example above. The constructor of Product was changed.

Workaround: Perform a full build (Project > Clean).

Solution:
The Mod4jBuilder should be able to perform incremental cascading builds. Meaning that if a model-file is changed, all other model-files that uses references to classes from that model-file, should participate in the build.

BusinessDomain model A    used-by>  DataContract model H   used-by> Service model X
                          used-by>  DataContract model I   used-by> Service model Y

BusinessDomain model B    used-by>  DataContract model J

If BusinessDomain model A changes, also DataContract models H and I must participate in the build.
If DataContract model H changes, also Service model X must participate in the build.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
There are no comments yet on this issue.

People

  • Assignee:
    Jos Warmer
    Reporter:
    Johan Vogelzang
Vote (0)
Watch (0)

Dates

  • Created:
    17/Mar/09 1:57 AM
    Updated:
    30/Jul/09 5:57 AM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.