Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Issues with self-referencing projects #8

Open
metlos opened this issue Mar 31, 2017 · 1 comment
Open

Issues with self-referencing projects #8

metlos opened this issue Mar 31, 2017 · 1 comment

Comments

@metlos
Copy link

metlos commented Mar 31, 2017

I have this rather peculiar setup of my project, where a previously released version of a module is used during the build.

I think this is why srcdeps fails to build projects that depend on any of the artifacts from my peculiar project ;)

See the reproducer https://github.com/metlos/srcdeps-bug-cycle-introduction.

@ppalaga
Copy link
Contributor

ppalaga commented Apr 28, 2017

Thanks for the report, @metlos

Apparently, the broken state in the srcdeps build directory is the result of the set:versions command issued by srcdeps:

mvn org.codehaus.mojo:versions-maven-plugin:2.3:set -DnewVersion=0.14.1-SRC-revision-8e13254682a1b79ac49b10f8cecb2401725c522e -DartifactId=* -DgroupId=* -DoldVersion=* -DgenerateBackupPoms=false --quiet

I am not quite sure what the correct args for the versions:set commands should be in your case, mostly due to the peculiar setup in your source tree. Looks like you have several components in one repo that have independent release cycles. Srcdeps (read: me) assumed so far that no real person would want to do that. Your existence, that I cannot doubt, breaks that assumption and I am ready to discuss how to make srcdeps able to build your revapi too ;)

I can think of three options:

(1) If you are able to manually construct a versions:set command that transforms a revapi source tree into a state that will produce everything needed by srcdeps-bug-cycle-introduction or any similar project, then I am ready to consider adding a new option to srcdeps.yaml that will allow to override the default versions:set arguments.

(2) Perhaps it would suffice that srcdeps performs both versions:set and clean install in a subdirectory of your source tree. If you can confirm this, I could add an option to srcdeps.yaml to cd before versions:set and clean install. Can you confirm this?

(3) If (1) and (2) does not work, then the only thing I can think of is that you split revapi into several independent source repositories keeping only those parts together that have common release cycle. Once you do that, I believe you will not have multiple generations of the modules in the reactor and versions:set will work correctly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants