This Question is Answered

2 "helpful" answers available (2 pts)
15 Replies Last post: Oct 17, 2011 3:51 PM by Geir-Tore Lindsve  
Eric Bram Newbie 10 posts since
Sep 21, 2011
Currently Being Moderated

Sep 23, 2011 4:29 PM

Notificator Plugin not running

I'm sorry that this post is going to be a bit open-ended, but I'm not sure where to go from here.  I'm trying to make a Campfire plugin for TeamCity.  I initially wrote my own from scratch but after no luck, I modified my sources to use some of the code from:  https://github.com/radamant/Team-City-Campfire-Notifier-Plugin.

 

The code builds fine, the web server shows that the plugin has been found, but nothing happens.  I look in the logs for the log messages that my code produces and they aren't there which leads me to believe my plugin is never called.  I don't see any values to fill in under "My Settings and Tools" either.  I thought maybe I needed some jsp pages, but it doesn't look like other Notificator plugins require them.  I'm not sure what I'm missing and am about out of guesses.

 

Info:

I'm using Eclipse Indigo to build the jar.

I've attached the zipped plugin.

 

Any help/pointers would be appreaciated!

Attachments:
Maxim Podkolzine JetBrains 202 posts since
Dec 17, 2008
Currently Being Moderated
Sep 26, 2011 2:12 PM in response to: Eric Bram
Re: Notificator Plugin not running

Hi Eric,

 

My guess is that your plugin was built against pretty old API jar.

Could you please check the versions of the API and the system you start with. Unfortunately the notifications API is changing quite often (in 6.5 as well).

And in order to make your plugin more robust I'd suggest you not to implement "Notificator" interface, but extend from "NotificatorAdapter". It will also simplify your code a little.

 

--

Thanks you,

Maxim

Maxim Podkolzine JetBrains 202 posts since
Dec 17, 2008
Currently Being Moderated
Sep 26, 2011 2:52 PM in response to: Maxim Podkolzine
Re: Notificator Plugin not running

Eric,

 

There is one more idea: please put your build-server-plugin-campfire.xml inside META-INF directory.

The plugin worked for me when I did it (see attachment).

 

 

---

Maxim

Geir-Tore Lindsve Newbie 22 posts since
Nov 6, 2007
Currently Being Moderated
Oct 14, 2011 12:07 PM in response to: Eric Bram
Re: Notificator Plugin not running

Any chance you'll release your plugin when you're "done"?

Geir-Tore Lindsve Newbie 22 posts since
Nov 6, 2007
Currently Being Moderated
Oct 14, 2011 4:00 PM in response to: Eric Bram
Re: Notificator Plugin not running

Thanks. I found his code the other day, but I was hoping to avoid having to setup a Java environment just to build this plugin :S

 

Tried to just use the one you added to the first post here, but it fails with "java.lang.NoClassDefFoundError: org/apache/http/auth/Credentials"

Geir-Tore Lindsve Newbie 22 posts since
Nov 6, 2007
Currently Being Moderated
Oct 14, 2011 4:11 PM in response to: Eric Bram
Re: Notificator Plugin not running

Awesome, it's much appreciated!

Geir-Tore Lindsve Newbie 22 posts since
Nov 6, 2007
Currently Being Moderated
Oct 14, 2011 10:00 PM in response to: Eric Bram
Re: Notificator Plugin not running

Nice, I'll give it a shot this weekend. Thanks

Geir-Tore Lindsve Newbie 22 posts since
Nov 6, 2007
Currently Being Moderated
Oct 17, 2011 10:15 AM in response to: Eric Bram
Re: Notificator Plugin not running

Gave it a try now, but it looks like I'm missing something on our build server. I keep getting "java.lang.NoClassDefFoundError: org/apache/http/auth/Credentials at com.SDS.CampfirePlugin.doNotifications(CampfirePlugin.java:49)" when it tries to post a message.

 

I only have the JRE installed on the build server. Do I need the JDK instead? Something else missing?

Geir-Tore Lindsve Newbie 22 posts since
Nov 6, 2007
Currently Being Moderated
Oct 17, 2011 3:51 PM in response to: Eric Bram
Re: Notificator Plugin not running

Got it working now

 

It was just a matter of RTFM. I took the archive and copied the whole thing to the plugins folder instead putting just the jar files in the lib folder.

 

Thanks again, btw

More Like This

  • Retrieving data ...