-
Notifications
You must be signed in to change notification settings - Fork 13
#495 Add functionality for extending foundation-mda #505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
<version.buildnumber.plugin>3.2.1</version.buildnumber.plugin> | ||
<version.failsafe.plugin>${version.maven.surefire.plugin}</version.failsafe.plugin> | ||
<version.fermenter>2.10.3</version.fermenter> | ||
<version.fermenter>2.10.5</version.fermenter> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I: This version of fermenter will be released prior to merging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
@Given("a pipeline with metamodel extensions") | ||
public void a_pipeline_with_metamodel_extensions() { | ||
this.modelSource = new File("src/test/resources/models/model-extension.jar"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I: This jar file contains a pipeline with the new extension field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: Is this jar file typically generated by Maven?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. We're using it to mimic what maven would be providing the plugin in an actual execution
c7415e5
to
af7ae0b
Compare
|
||
Scenario Outline: Foundation-mda metamodel elements are extendable | ||
Given a class extending the "<type>" metamodel with new simple and complex fields | ||
When the "<profile>" profile is generated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A: This feels like it has the potential to clash and the profiles we've selected feel a little arbitrary. It's extra coverage so I'm OK leaving it, but I'd also be OK with just making this "When the extended models are read in" or something to that effect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason I added it was cause the error itself occurs when the generators are run, so felt like the tests we insufficient if we didn't include them.
af7ae0b
to
ec74d6a
Compare
ec74d6a
to
5bcef20
Compare
All the changes generator classes are an update to use the new Fermenter functionality for getting the metadata repository from the generation context. This is to avoid harcdoding our Metamodel Repository class name in, which was preventing downstream projects from extending
foundation-mda
.Old way:
New way:
Note in some metamodel classes (ex: RecordFieldTypeElement.java) we don't have access to the generation context as it hasn't been created yet, so we instead have to use the Fermenter
ModelInstanceRepositoryManager
with new functionality for handling class extensions: Fermenter PRUnit test files of interest:
foundation-mda
:mda-maven-plugin