Closed psiroky closed 8 years ago
What puts userSettingsFile
to test.properties
? If it's takari-lifecycle, what lifecycle version do you use? What version of maven do you use?
Thanks for a quick response!
It seems it is the takari-lifecycle-plugin
, version 1.10.2. I will try with the latest 1.11.11.
This is the POM I am using: https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-maven-plugin/pom.xml. Sorry, should have linked that one in the original report.
Unrelated, but you probably want to use takari-maven-plugin packaging type. You'll be able to cleanup pom.xml file of your plugin, also m2e will work much better for the plugin.
Thanks for the suggestion, I will look into that. I am still quite new to the Takari stuff.
I am using maven 3.2.3 to run the outer build and the test with 3.0.5 and 3.2.3 (forgot to add that to the previous comment).
Result is the same when using latest takari-lifecycle-plugin
version 1.11.11.
I think the fix should be in takari-lifecycle. The fix is quite simple but I don't know when I be able to implement it. Somebody else may be able/willing to review a quality pull request, however ;-)
In the mean time, you should be able to add empty settings.xml
in your project source tree and specify it via explicit userSettingsFile
property in src\test\test.properties
.
So if I understand correctly, the takari-lifecycle should put the default settings.xml path into the test.properties only if the setting file actually exists? If you could give me few pointers as to where to look, I should be able to find some time to fix it directly in takari-lifecycle.
About the workaround -- would that work if I then specified custom settings.xml via maven arg line, E.g. mvn clean install -s <custom-file>
? Would be the custom-file used instead of the default empty one?
Look at TestPropertiesMojo. The fix itself should be quite straightforward, but I am not sure about unit tests... probably can skip unit tests for this one.
If you specify userSettingsFile
property in src\test\test.properties
, -s <custom-file>
command line parameter will be ignored. Which I believe should be fine in your case since your tests appear to run without settings.xml
.
Thanks I will take a look at creating a PR with the fix.
We usually run the build without settings.xml, but when during releases we do need to add other staging repositories, so we need the ability to plug in custom settings file.
When there is no default user settings file (
~/.m2/settings.xml
) and no custom one is specified via-s
, the build will fail with.I am hitting this with version
2.8.0
. It seems the default path is saved intotest.properties
file even though the file does not exist.This obivously depends on the particular machine configuration and can be easily workarounded by putting empty settings.xml file into ~./m2. However, I think it would be nice if the tooling could cope with this corner case as well.