How to create an SArtifactDependency Follow
I am trying to create an artifact dependency to propogage build atrifacts up a dependency tree.
So far as I can see I need to do something like:
List<SArtifactDependency> dependencies = myBuild.getArtifactDependencies();
dependencies.add(new SArtifactDependency()); // I cant see any way to do this.
myBuild.setArtifactDependencies(artifactDependencies);
where myBuild is of type SBuildType
There was a previous post from 2011 which suggest the use of jetbrains.buildServer.serverSide.ArtifactDependencyFactory but I can't find any such named factory.
I can see how to create an ArtifactDependencyInfo but not how to coerce that into an SArtifactDependency.
Heres my runtime info:
Java version: 1.7.0_72 Java VM info: Java HotSpot(TM) Server VM (32 bit) Java Home path: D:\TeamCity\jre Server: Apache Tomcat/7.0.59 |
JVM arguments:-Djava.util.logging.config.file=D:\TeamCity\bin\..\conf\logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xrs -Xmx512m -XX:MaxPermSize=270m -Dlog4j.configuration=file:../conf/teamcity-server-log4j.xml -Dteamcity_logs=../logs/ -Djsse.enableSNIExtension=false -Djava.endorsed.dirs=D:\TeamCity\bin\..\endorsed -Dcatalina.base=D:\TeamCity\bin\.. -Dcatalina.home=D:\TeamCity\bin\.. -Djava.io.tmpdir=D:\TeamCity\bin\..\temp |
and I am running on v9
Thanks
Please sign in to leave a comment.
Unfortunately ArtifactDependencyFactory is still a part of closed API. You need to add server.jar to your classpath to get access to it. Here is a javadoc for a couple of methods of this factory for your convenience: