提交 04ab4b60 编写于 作者: K kohsuke

the field needs to be made accessible first.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@10778 71c3de6d-444a-0410-be80-ed276b4c234a
上级 c8459682
......@@ -736,6 +736,7 @@ public class MavenEmbedder
// for us. So we need to override this private field.
try {
Field field = settingsBuilder.getClass().getDeclaredField("globalSettingsFile");
field.setAccessible(true);
// getAbsoluteFile is probably not necessary, but just following what DefaultMavenSettingsBuilder does
field.set(settingsBuilder,new File(mavenHome,"conf/settings.xml").getAbsoluteFile());
} catch (NoSuchFieldException e) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册