axion-release-plugin
axion-release-plugin copied to clipboard
verifyRelease leads to ClassCastException on MultiProject
I'm trying to setup the release plugin for a larger project (~80 modules). cV and nextRelease works fine, if I'm ignoring the org.eclipse.jgit.errors.RepositoryNotFoundException.
The project is structured as:
project
.git/
product
build.product
modules/
module1/
submodule1/
....
module2/
...
tools/
etc/
...
The source to build are located within "product". So I set the
scmVersion {
repository {
type = 'git'
directory = project.rootProject.file('..') // repository location
}
}
running gradle within project/product.
Thats issue 1) Whats wrong?
Next point: running gradle verifyRelease breaks with
:verifyRelease
Looking for uncommitted changes..
Checking if branch is ahead of remote..
:modules:verifyRelease
Failed top open repository, trying to work without it org.eclipse.jgit.errors.RepositoryNotFoundException: repository not found: ~project/product
:modules:verifyRelease FAILED
* What went wrong:
Execution failed for task ':modules:verifyRelease'.
> Cannot cast object 'pl.allegro.tech.build.axion.release.infrastructure.DummyRepository@1632465d' with class 'pl.allegro.tech.build.axion.release.infrastructure.DummyRepository' to class 'pl.allegro.tech.build.axion.release.infrastructure.git.GitRepository'
Note that the folder "modules" does not contain reals source, just a folder for the sub modules...
Thanks for any hint in advance.
Hi, i will take a closer look at it in few hours, just wanted to give you ACK :)
Looks like the whole problem is in invalid Git root - the cV is working fine on DummyRepository, which his loaded when no Git can be found, but it does nothing actually, won't read tags etc etc. Thus don't ignore the RepositoryNotFound exception :)
I would start with printing the results of project.rootProject.file("..") to stdout sowmewhere in Gradle to see it it points to the right place.