Skip to content

Commit

Permalink
kie-issues#1506: Use per-package local Maven repositories for depende…
Browse files Browse the repository at this point in the history
…ncy declaration correctness on `kie-tools` (#2635)
  • Loading branch information
tiagobento authored Oct 9, 2024
1 parent b53193a commit 8756ef6
Show file tree
Hide file tree
Showing 250 changed files with 2,900 additions and 1,301 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ repo
.vscode
.idea
.ci
./_intellij-project
.github/CODEOWNERS
22 changes: 14 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ packages/sonataflow-operator/e2e-test-report.xml
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

/.idea

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
Expand Down Expand Up @@ -265,14 +267,14 @@ packages/sonataflow-operator/e2e-test-report.xml
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
.idea/artifacts
.idea/compiler.xml
.idea/jarRepositories.xml
.idea/modules.xml
.idea/*.iml
.idea/modules
*.iml
*.ipr
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/
Expand Down Expand Up @@ -340,3 +342,7 @@ packages/python-venv/venv
# turbo
.turbo
turbo.json

# IntelliJ projects should be on _intellij-projects folder, never on specific packages.
packages/*/.idea
examples/*/.idea
9 changes: 0 additions & 9 deletions .idea/copyright/Red_Hat.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/copyright/profiles_settings.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/inspectionProfiles/Project_Default.xml

This file was deleted.

24 changes: 0 additions & 24 deletions .idea/jsLinters/eslint.xml

This file was deleted.

4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ pnpm-lock.yaml
packages/xml-parser-ts-codegen/src/schemas/xsd/HFP.xsd
packages/xml-parser-ts-codegen/src/schemas/xsd-incomplete--manually-written/HFP.xsd
packages/xml-parser-ts-codegen/src/schemas/xsd-incomplete--manually-written/XSD.xsd

# @prettier/parser-xml shouldn't mess with auto-generated IntelliJ files
_intellij-project
*.iml
5 changes: 5 additions & 0 deletions _intellij-project/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions _intellij-project/.idea/eclipseCodeFormatter.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions _intellij-project/.idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions _intellij-project/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions _intellij-project/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions _intellij-project/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 53 additions & 0 deletions _intellij-project/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

# KIE Tools @ IntelliJ IDEA

To make it easier for developing Java-, Maven-based packages, this folder contains an IntelliJ IDEA project configured for select packages. It currently includes all Maven-based packages of KIE Tools. Two additional IntelliJ IDEA project modules are included too, given their "global" nature on the KIE Tools repository -- `scripts` and `root-env`.

### Importing this project on IntelliJ IDEA

After cloning `kie-tools` locally:
1. Bootstrap the repository with `pnpm bootstrap [pnpm-filter?]` command to wire everything together and configure `.mvn/maven.config` files for all packages. You only need to do it once per clone or when you change the dependency graph on `package.json` files.
2. Build the repository in development mode with `pnpm [pnpm-filter?] build:dev` to make sure your local Maven repository (Usually `~/.m2/repository`) is populated.

It's recommended to that before opening IntelliJ IDEA to make indexing faster once you do.

Once prompted by IntelliJ IDEA, select "Open" and choose this folder.

<img src="docs/intellij-open.png" alt="Open" style="max-width:600px; display:block" />
<img src="docs/intellij-select-folder.png" alt="Select folder" style="max-width:600px; display:block" />

---

After you're done importing the project, please also configure the code formatter (or Code Style, in IntelliJ IDEA terminology.)

Apache KIE Tools uses an Eclipse Formatter XML, so please install https://plugins.jetbrains.com/plugin/6546-adapter-for-eclipse-code-formatter and configure it like in the screenshot below:

<img src="docs/intellij-eclipse-formatter-config.png" alt="Configure Eclipse formatter" style="width:600px" />


---

You should now be able to develop all Java- and Maven-based projects normally.

---

> For more information on Maven-based packages on KIE Tools, please refere to the [KIE Tools :: Manual](../repo/docs/MANUAL.md).


Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _intellij-project/docs/intellij-open.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8756ef6

Please sign in to comment.