Problem in the development of a plugin

Hello,
I have a problem. I am trying to develop a plugin for TeamCity, but I am facing some problems in this process. At first I tried developing using the "samplePlugin" in DevPackage. Following the instructions I've found in http://confluence.jetbrains.net/display/TCD7/Bundled+Development+Package, I managed to make it run, but unfortunately using Ant (ant dist and ant deploy). As a programme, I am using the latest version of IntelljIdea (12.0.1) and, unfortunately I cannot find the option that allows me to set up the server. According to a guide I've found on the internet, the programme I am using includes the "setting Application Server", but I cannot find it and I've searched anywhere on the programme! Could it be due to the fact that I am using the "free" version of the programme?
Moreover, in my new plugin which I have downloaded from http://confluence.jetbrains.net/display/TCD7/Plugins+Packaging 
I have been forced to use ant, I decided to write "hello world" in a file to see if anything worked; it worked at first, but then it stopped after having made a few changes which I then commented. I tried the ant clean command etc... but it really seems there is no error in the project.
I am completely stuck and I really do not know what else to do! If somebody could help I would be extremely grateful! Thank you!

10 comments
Comment actions Permalink

Hi Alessandro,

It would be easier to help you if you can ask a specific question and supply all the relevant details.

simplePlugin bundled with TeamCity distribution is meant to be assembled into a plugin zip package with Ant and then deployed to a stand-alone TeamCity server just like any pluign.

> it worked at first, but then it stopped after having made a few changes which I then commented

You should probably ensure there is only one version of the plugin deployed and follow a usual route in debugging isues: investigate the server logs, use debug logging in your plugins, etc.
If you cannot figure the isue yourself you can share the plugin and it's sources so that we can look into it and help.

0
Comment actions Permalink

Thank you for the reply,
My plugin is now working again, I had done a small mistake.
Anyway, I'm developing from an empty plugin which I downloaded from http://svn.jetbrains.org/teamcity/plugins/template-plugin/templateProject/, but, at the moment, this plugin is simply writing in a file to see if it's working.
However, I was wondering whether there is any other way to check a change I make, I really find very uncomfortable that, each time,  I have to type "ant dist, ant deploy" in the command line and then  to reboot the server. Could you please tell me if there actually are any other methods? I thank you in advance for replying

0
Comment actions Permalink

Thank you for the reply,
My plugin is now working again, I had done a small mistake.
Anyway, I'm developing from an empty plugin which I downloaded from http://svn.jetbrains.org/teamcity/plugins/template-plugin/templateProject/, but, at the moment, this plugin is simply writing in a file to see if it's working.
However, I was wondering whether there is any other way to check a change I make, I really find very uncomfortable that, each time,  I have to type "ant dist, ant deploy" in the command line and then  to reboot the server. Could you please tell me if there actually are any other methods? I thank you in advance for replying

0
Comment actions Permalink

Alessandro,

You can configure "External Tools" in IDEA (e.g. see in Settings and in Tools menu) to invoke any external commands.
Also, you can try to configure the IDEA project like in this sample, which reportedly has a run configuration configured to start Tomcat

0
Comment actions Permalink

Alessandro,

If still actual, I've updated the project at http://svn.jetbrains.org/teamcity/plugins/template-plugin/templateProject to have a run configuration which starts a TeamCity server from IDEA.



Feedback is welcome!
0
Comment actions Permalink

thank you very much! I'll have a look and, should I have any problem, I'll write you back

0
Comment actions Permalink

Dear MR Yegor,

I've tried the configuration you sent me, but, unfortunately it does not work. I have followed the same procedure and what is written in the readme.txt file, inserting the path into the directory of teamcity. The application renders several errors in .xml files and, so, it fails in executing "ant dist"
Moreover, in my version of intelljidea i cannot find the "run application server" option. However, this last point is not crucial, i can always use the previous version of the programme and execute it with ant. I thank you in advance for replying


0
Comment actions Permalink

Alessandro,

Strange, it mostly works for me in a clean environment. There was an issue in build.properties - you only need to set the first property and not the second, but othervise I see no issues there.

Anyway, I've committed a smal improvement.

If still no luck, I would appreciate exact error message/output and archived copy of your project so that I can reproduce the issue.

0
Comment actions Permalink

Dear Yegor,
I have tried to run again the new version of the programme  and in the beginning it showed no problems. It executed  the "ant" and "ant dist" command without errors. However, as when using the previous version, I added the operations to write in a file, in the "serverStartup" method, but when executing the "ant dist" command the following error appears:
/home/alessandro/prova/templateProject/templateprj.xml:365: @NotNull instrumentation failed for /home/alessandro/prova/templateProject/out/production/templatePrj-server/templatePrj/server/ServerListener.class: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class not found: java/io/IOException

The SDK has been added correctly, as in the previous version. Moreover, I cannot find the "run application server" option in the version of the IntelljIdea programme I have.
However, fortunately, the previous version of the programme works properly. I thank you in advance for your reply

0
Comment actions Permalink

Alessandro,

Thank you for reporting "Class not found: java/io/IOException". To get rid of it please use the latest version which I updated or regenerate Ant buld script from IDEA with "Enable UI forms" option off (option in off disables @NotNull/@Nullable annotations processing).

You might not see "Run TeamCity server with plugin" run configuration if you are using IntelliJ iDEA Community edition. This would only be avaialble in Ultimate edition (as this depends on Tomcat).
In Community edition you can still run Ant target - either from the Ant tool window or as configured external tool.

0

Please sign in to leave a comment.