1

Could you please help me out with the following issue.

I have installed Jenkins in my Windows 7 OS using Windows Installer.

  • My project has settings.xml and toolchains.xml, which are placed under conf directory of Maven.Neither.

  • settings.xml or toolchains.xml files are present under /usr_home/.m2/ directory.

  • I can successfully build project manually , but when tried to build with Jenkins , toolchains.xml file is not getting identified. I have been receiving error message

Please make sure you define the required toolchains in your ~/.m2/toochains.xml file.

  • I tried putting toolchain.xml file in /usr_home/.m2/ , but didn't work.

Any kind of help will be really appreciated.

Arulkumar
  • 12,966
  • 14
  • 47
  • 68
Jibi Makkar
  • 63
  • 1
  • 8
  • Possible duplicate of [Maven toolchains.xml location under Jenkins](http://stackoverflow.com/questions/11902652/maven-toolchains-xml-location-under-jenkins) – Prim Feb 09 '16 at 07:14

2 Answers2

1

When I experienced the problem, toolchains.xml were not read from the maven conf library, only settings.xml.

You would have to either place toolchains.xml in you ~/.m2 folder or use mvn -t <path> to point to a secondary toolchains file.

The -t option was not available initially, so you may have to be at mvn 3.2 I think or higher.

Mr Lister
  • 45,515
  • 15
  • 108
  • 150
Niels Bech Nielsen
  • 4,777
  • 1
  • 21
  • 44
0

Thanks Niels for the reply. I finally managed to fix the issue. It seems like an existing issue in maven3.3.3 with Jenkins in Window OS where -t option will not work with Jenkins.

https://issues.jenkins-ci.org/browse/JENKINS-28629

So I replaced it with maven3.0.5 and it did the wonder.

Regards, Jibi

Jibi Makkar
  • 63
  • 1
  • 8