A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/4446 below:

Circular dependencies between pmd-designer, pmd-core, pmd-cli · Issue #4446 · pmd/pmd · GitHub

Is your feature request related to a problem? Please describe.

We have a workaround for this problem (#4445), but I'd like to explore, whether we can make a real solution instead of allowing snapshot dependencies (and make the build not repeatable) for release candidates. Also, for the final release 7.0.0, we would need a pmd-designer, that depends on e.g. 7.0.0-rc3.

So, the dependencies look like this:

If we could release pmd-core separately first, then we could release pmd-ui second, and the rest of pmd as last.

pmd-core uses pmd as the parent project, so that would be needed to be released as well. Currently, we use our parent project as parent project and additionally as aggregator. That would need to change.

Describe the solution you'd like

I don't think, I have a favorite yet...

Describe alternatives you've considered a) No change

We could just accept, that we need snapshot dependencies for the first release of a major version. However, the same problem will occur again for 8.0.0.

b) Release pmd-core first, then the rest

So, maybe we can have the following structure:

pmd/pom.xml (artifactId=pmd-aggregator): Just an aggregator to easily build everything at once. 
                                         Won't be released.
pmd/parent/pom.xml (pmd): the parent pom, without modules. So, not an aggregator anymore.
pmd/pmd-core/pom.xml (pmd-core): no changes - uses the same parent

We could then release parent and pmd-core first. That could be done by just setting the version of parent to a non-SNAPSHOT version, updating the reference in pmd-core and in other modules to the new parent. Commit this as "prepare release pmd-core x.y.z", and tag this as "pmd-core-x.y.z". Pushing that tag would build the aggregator pom, which would build all modules, while parent and core a released versions, all other are still SNAPSHOT. Not sure, how the nexus-staging-maven-plugin handles this situation (deploying a mix of SNAPSHOT and non-SNAPSHOT artifacts). If that causes a problem, we could create a separate build-script/workflow, that runs only on these tags (pmd-core-*) - since pmd-core is just a library, we don't need to do anything else (like creating release notes, etc.). The script can be very simple (just run "mvn deploy -f parent/pom.xml && mvn deploy -f pmd-core/pom.xml").
Once pmd-core is available in maven-central, we can simply update pmd-designer to use this new pmd-core version and release pmd-designer.
Once pmd-designer is available in maven-central, we can update the other modules and set everything to the same version, commit this as "prepare release x.y.z", and tag this as usual as "pmd_releases/x.y.z". Push the tag and let it build. We need to make sure, we don't build/deploy pmd-core again, as it is already in maven-central - redeploying it will definitively result in failure. The build script however would do all the magic we currently do (create documentation, upload binaries, publish release with release notes).

This as definitively an impact on reproducible builds - as reproducing a pmd release is then not anymore a single build.

What I don't like here is: it looks very complicated, we don't have a single tag, but two tags. The release process might take a while, because we need to wait between the steps.

c) Move pmd-core into its own repository

Maybe we should separate pmd-core into its own repository. That would solve the tagging issue and makes the build scripts simpler. However, it might have an impact on the developer experience - but you can e.g. import an additional module in IntelliJ, so that you have pmd-core integrated during development.

d) Move pmd-designer back into pmd

Move pmd-designer back into the main repository. That way, we have all the moving parts in one place and can simply release everything in one go. Affects issues (designer bugs are separate), raises the question, why pmd-eclipse-plugin is separate, etc.

e) Use git submodules

Alternatively we could use git submodules

f) Consider pmd-designer a separate product g) pmd-designer as a separate product, soft dependency only

That kind of a compromise:

h) pmd-cli/pmd-dist in separate repository

Dependency hierarchy now:

Dependency hierarchy after:

Consequences:

Additional context

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4