If you're using eclipse, don't forget to call mvn clean hpi:run, and not mvn hpi:run (otherwise you're @Extension annotation is not picked up)
Vincent 2015-10-16 12:29 GMT+02:00 Jim SERRA <[email protected]>: > Hum strange I don't find my mistake. > Frustrating... > The logger doesn't return anything, It seems like it doesn't go in the > listener after the delete. > > On Thursday, October 15, 2015 at 11:45:38 AM UTC+2, Jim SERRA wrote: >> >> Hi, >> I'm trying to use ItemListener.java to do actions after a job is deleted. >> I'm testing it by creating a random new file but it's not working: >> >> >> @Extension >> public class UpdateTable extends ItemListener{ >> @Override >> public void onDeleted(Item deletedItem) { >> File file2 = new File("/var/lib/jenkins/the_test.txt"); >> try { >> file2.createNewFile(); >> } catch (IOException ex) { >> Logger.getLogger(UpdateTable.class.getName()).log(Level. >> SEVERE, null, ex); >> } >> } >> } >> >> Regards, >> >> Jim. >> > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/d8d64438-9102-43da-98af-e167810549f4%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-dev/d8d64438-9102-43da-98af-e167810549f4%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAH-zGChgJmLPo8m8OLC3jL5V-BTebCEXrZVHhT%2BwK7XTJKQ-Ug%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
