-
Couldn't load subscription status.
- Fork 594
Working with the Code
See the CONTRIBUTING file in the repository for information on how to contribute issues and code changes to the project.
Spring Cloud Dataflow source can be built from the command line using Maven.
We include Maven’s wrapper scripts (./mvnw or mvnw.cmd) that you can run rather than needing to install Maven locally.
The source on the main branch should be built with JDK 8.
The project can be built from the root directory using the standard Maven command:
$ ./mvnw build
We use the "Fork and Branch" Git workflow. In a nutshell, the process is this:
Navigate to https://github.com/spring-cloud/spring-cloud-dataflow/fork and choose:
-
Owner: -
<YOUR_GITHUB_USERNAME> -
Repository name:
spring-cloud-dataflow
Clone your fork by executing the following command in the desired dev directory:
git clone https://github.com/<YOUR_GITHUB_USERNAME>/spring-cloud-dataflow.git
Create a "remote" to allow you to push changes back up to the forked repository by executing the following command in the repo directory:
git remote add upstream https://github.com/spring-cloud/spring-cloud-dataflow.git
Create a branch to work in w/ the following command:
git checkout -b <some-decent-description-of-branch>
Code up the changes, add the tests, etc.. by following the code-conventions-and-housekeeping from the CONTRIBUTING guide.
Commit the changes to the branch (again referring to the code-conventions-and-housekeeping from the CONTRIBUTING guide.
Navigate to your Fork repo in Github and create a PR by following this link:
https://github.com/spring-cloud/spring-cloud-dataflow/compare/main...<YOUR_GITHUB_USERNAME>:spring-cloud-dataflow:<BRANCH_NAME>
and clicking "Create pull request" button.
If you have performed a checkout of this repository already, use “File” → “Open” and then select the root pom.xml file to import the code.
Alternatively, you can let IntelliJ IDEA checkout the code for you. Use “File” → “New” → “Project from Version Control” and https://github.com/spring-cloud/spring-cloud-dataflow for the URL.
Once the checkout has completed, a pop-up will suggest to open the project.
The directory src/eclipse has two files for use with code formatting, eclipse-code-formatter.xml for the majority of the code formatting rules and eclipse.importorder to order the import statements.
In Eclipse you import these files by navigating Windows → Preferences and then the menu items Preferences > Java > Code Style > Formatter and Preferences > Java > Code Style > Organize Imports respectfully.
-
Install the plugin
Eclipse Code Formatter.-
You can find it by searching the "Browse Repositories" under the plugin option within
IntelliJ(Once installed you will need to reboot Intellij for it to take effect).
-
-
Navigate to
Intellij IDEA > Preferencesand select theEclipse Code Formatter.-
Select the
eclipse-code-formatter.xmlfile for the fieldEclipse Java Formatter config file -
Select the
eclipse.importorderfile for the fieldImport order.
-
-
Enable the
Eclipse code formatterby clickingUse the Eclipse code formatterthen click the OK button.
|
Note
|
If you configure the Eclipse Code Formatter from File > Other Settings > Default Settings it will set this policy across all of your Intellij projects.
|
Some files in the git repository may exceed the Windows maximum file path (260 characters), depending on where you clone the repository.
If you get Filename too long errors, set the core.longPaths=true git option:
git clone -c core.longPaths=true https://github.com/spring-cloud/spring-cloud-dataflow