Skip to content
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

Gradle support: Refactor configuration #295

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Gradle support: Refactor configuration #295

wants to merge 9 commits into from

Conversation

tburny
Copy link

@tburny tburny commented Jan 2, 2019

Refactors the configuratio to be more maven-independent by splitting things apart. I added some explanations in the commits to make things easier, where a typically a commit is the result of one or two refactorings at most.

I tried to do small steps which can be verified easily. Each increment still passes all tests from mvn test.

tburny added 8 commits January 2, 2019 00:38
…rom general logic

The only parametric dependency was the project base directory, which is now an explicit parameter to the method.
Additionally the Maven setup by pom file was also seperated.
This prepares for extracting a common configuration interface / base class that can be reused for tests and gradle
…eries" logic to new MavenDefaultConfig class

Seperate the Maven-specific parts of the configuration from the more general default configuration.
Previously we turned the static getters/setters into instance methods and the static getters/setters are delegating to their instance counterpart. Now we can override these instance methods with Maven-specific logic without any problems.
…rites

- Extract ConfigSource interface which is implemented by DefaultConfig, MavenDefaultConfig and the Mojo
- MavenDefaultConfig: Replace usages of SpringMvcEndpointGeneratorMojo with ConfigSource, so we can still overlay properties from DefaultConfig
…into gradle-support

# Conflicts:
#	src/main/java/com/phoenixnap/oss/ramlplugin/raml2code/plugin/Config.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant