Execute custom maven plugin through TeamCity API

Hi All,
I want to execute custom maven plugin through TeamCity API and want results of maven plugin in TeamCity,does anybody know which API can be used for this purpose?please help me.
Thanks in advance,
Mukesh

3 comments
Comment actions Permalink
Hi,
In TeamCity you can execute your maven build with any custom maven plugin.
Could you please describe more specifically what you want to achive?
0
Comment actions Permalink

Hi Sergey,
Thanks for response.I want to invoke custom TeamCity plugin on an event(event may be clicking on any custom button/tab),this TeamCity plugin(through TeamCity API) will invoke a custom maven plugin.The custom TeamCity plugin gets results of custom maven plugin and display them in TeamCity.
Thanks,
Mukesh

0
Comment actions Permalink

By "invoke a custom maven plugin" I assume executing your plugin via a command line, like "mvn my-custom-plugin:my-custom-goal". Otherwise I'm not sure what you mean because I don't know any other way of invoking maven plugins.

So, If you want to run a build defined by a specific command from you plugin, you can create programmatically a build configuration (see javadoc for interface ProjectManager) and configure it for running your command using Maven runner or simple command line runner. The results of your plugin execution could be trasferred to the server as a build artifact (again this can be configured in the build configuration), which then could be accessed by your TeamCity plugin using method SBuild.getArtifacts().

0

Please sign in to leave a comment.