Skip to content

refact: adjust pom structure for directly compiling from root#2275

Merged
imbajin merged 9 commits intoapache:pd-storefrom
heiyan-2020:pd-store
Aug 11, 2023
Merged

refact: adjust pom structure for directly compiling from root#2275
imbajin merged 9 commits intoapache:pd-storefrom
heiyan-2020:pd-store

Conversation

@heiyan-2020
Copy link
Copy Markdown

@heiyan-2020 heiyan-2020 commented Aug 8, 2023

Purpose of the PR

subtask of #2265

Adjust the pom structure in order to directly build from root.

Main Changes

  • Remove some unused dependencies in hugegraph-pd module.
  • Modify pom files for compiling and building.
  • Manually compile the internal version of hugegraph-core and add it to the pom of store module as system dependencies.(temporal solution)
  • The dependencies of packages imported through system dependencies will not be passed down, so we need to manually add some dependencies in hugegraph-core to the pom file of hg-store-core.

Verifying these changes

  • Trivial rework / code cleanup without any test coverage. (No Need)
  • Already covered by existing tests, such as (please modify tests here).
  • Need tests and can be verified as follows:

Does this PR potentially affect the following parts?

  • Nope
  • Dependencies (add/update license info)
  • Modify configurations
  • The public API
  • Other affects

Documentation Status

  • Doc - TODO
  • Doc - Done
  • Doc - No Need

@heiyan-2020 heiyan-2020 changed the title chore: add compiled hugegraph-core.jar as dependency refact: merge store into hugegraph Aug 9, 2023
@heiyan-2020 heiyan-2020 changed the title refact: merge store into hugegraph refact: merge store into hugegraph (reopened) Aug 9, 2023
@heiyan-2020 heiyan-2020 changed the title refact: merge store into hugegraph (reopened) refact: adjust pom structure for directly compilation from root Aug 9, 2023
@heiyan-2020 heiyan-2020 changed the title refact: adjust pom structure for directly compilation from root refact: adjust pom structure for directly compiling from root Aug 9, 2023
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In accordance with the hierarchical structure, the parent of hugegraph-core should be hugegraph-server. However, due to existing discrepancies between the community version of hugegraph-server and the internal version (such as revision), a temporary adjustment has been made for the purpose of building.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In accordance with the hierarchical structure, the parent of hugegraph-core should be hugegraph-server. However, due to existing discrepancies between the community version of hugegraph-server and the internal version (such as revision), a temporary adjustment has been made for the purpose of building.

Update: miss the msg before, and we choose use a new version for all modules

<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<log4j2.version>2.15.0</log4j2.version>
<top.level.dir>${project.basedir}/..</top.level.dir>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARN: ensure we don't have multi top.level.dir in project (if we have & need use it, add a comment for it)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you suggesting that we should only retain the top.level.dir property in the root pom?

Additionally, provide all the occurrences of it:

image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THX, just for warning

Comment on lines +127 to +128
<!-- tinkerpop -->
<dependency>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we need add tinkerpop dependency here?

@VGalaxies any context?

Copy link
Copy Markdown
Author

@heiyan-2020 heiyan-2020 Aug 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in the last item of "Main change", tinkerpop is depended on by hg-store-core, and in internal version the dependency is passed on through hugegraph-core which imported as usal maven dependency. But the current temporary solution is that importing hugegraph-core jar package through system dependency. In this way, the dependencies in hugegraph-core cannot be passed on, so the dependencies need to be added again in hg-store-core

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we need add tinkerpop dependency here?

@VGalaxies any context?

As stated by @heiyan-2020, assuming there are projects A (hg-store-core) and B (hugegraph-core), where project A depends on project B, and project B is a system dependency, the dependencies within project B will not be automatically inherited by project A.

Copy link
Copy Markdown
Member

@imbajin imbajin Aug 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in the last item of "Main change", tinkerpop is depended on by hg-store-core, and in internal version the dependency is passed on through hugegraph-core which imported as usal maven dependency. But the current temporary solution is that importing hugegraph-core jar package through system dependency. In this way, the dependencies in hugegraph-core cannot be passed on, so the dependencies need to be added again in hg-store-core

@heiyan-2020 get it, but we need add comment/TODO mark here? (maybe in next PR)

so as other temporary changes, otherwise it's pretty easy to forget the context later

@imbajin imbajin merged commit b19aa30 into apache:pd-store Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants