私のプラグインでは、システムコンフィグレーション「Artifactory credentials」にアクセスしました。 1)pom.xmlにartifactory依存関係を追加します。 即ち
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>artifactory</artifactId>
<version>2.9.0</version>
<type>jar</type>
</dependency>
2)は、正確な加工へのglobal.jellyの設定を見つけます。 I設定を適用するために使用されるクラスを識別)org.jfrog.hudson.ArtifactoryBuilder に
<table style="width: 100%" id="legacyDeployerCredentials${server.url}">
<f:entry title="Username"
help="/plugin/artifactory/help/common/help-deployerUserName.html">
<f:textbox name="username" field="username"
value="${server.deployerCredentialsConfig.username}"/>
</f:entry>
<f:entry title="Password"
help="/plugin/artifactory/help/common/help-deployerPassword.html">
<f:password name="password" field="password"
value="${server.deployerCredentialsConfig.password}"/>
</f:entry>
</table>
</f:block>
</f:section>
3を発見しました。 org.jfrog.hudson.ArtifactoryBuilder.java 4)jenkinsインスタンスを作成し、プラグイン記述子のget user credentialにアクセスします。
ArtifactoryBuilder.DescriptorImpl ab = (ArtifactoryBuilder.DescriptorImpl) jenkins.model.Jenkins.getInstance().getDescriptor(ArtifactoryBuilder.class);
ArtifactoryServer server = ab.getArtifactoryServers().iterator().next();
this.userName = server.getDeployerCredentialsConfig().getUsername();
this.password = server.getDeployerCredentialsConfig().getPassword();
同様の質問http://stackoverflow.com/questions/7064119/expose-hudson-system-info-to-remote-api –