• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Eclipse - executing automatically

 
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Suppose I have created a project in my workspace and have placed the build file under it.

Can I automatically execute the build file , say, after every hour ?

Is it possible in Eclipse ? Or in any other way ? The build file is in the workspace of the project.

Regards,
Arijit
 
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I get it right you need a way to define automatic builds at fixed intervals. There is no such action available in Eclipse (afaik). But you can write a quick plugin (using the templates) and the Quartz Scheduler.

./pope
 
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should be used another program/tool outside Eclipse IDE such as Cruise Control, System Schedule, crontab .. etc.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another thing you can do is execute an Ant script as part of a regular build. Just add an Ant builder to the Builders section of the projects properties.

You can even configure it to be executed every time a specific set of files changes!
 
Arijit Ghosh
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks everyone.

If I have got it right Ilja.. your method will not require any external tool.

But can you kindly explain it in more detail ?

Code or something maybe !

Thanks,
Arijit
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right click on the project => Properties -> Builders -> New -> Ant build.

Now when you are gonna build your project from inside Eclipse will lauch also the Ant build. But this will not be done automatically at specified times ;-).

./pope
 
Arijit Ghosh
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well that's interesting...but actually want the BACKUP target of the build file to be executed automatically after every hour maybe....

Any solutions please ? Not very keen for any external scheduler!!

Regards,
Arijit
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The sole solution I see for the moment is to extend the ant execution action (available in Eclipse) with an scheduled execution action which makes use of a scheduler library (Quartz maybe). I guess that developing this small plugin is not so hard to be done (even if you are a beginner - I do not intend to insult ;-) ).

./pope
 
Arijit Ghosh
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ali. As a beginner, where do I start ?

Regards,
Arijit
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can start directly creating a plugin using the available templates (new plugin project -> action template). As a start for documentation you can use those available from Eclipse downloads (which describes the PDE needs).
I wish you good luck!

./pope

ps: if help is needed you can contact (you will figure out how ;-) ).
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Arijit Ghosh:
Any solutions please ? Not very keen for any external scheduler!!



Well, if you don't care about spending some money, you could purchase CodePro, which comes with a scheduler: http://www.instantiations.com/codepro/ws/docs/features/scheduler/
 
author
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Well, if you don't care about spending some money, you could purchase CodePro

The NC version of CodePro costs $99. In addition to the task scheduler (which would , BTW, directly solve the problem originally posed), CodePro NC includes >500 audit rules and metrics, a dependency analyzer, a javadoc repair tool, a design patterns tool (with all 23 standard GOF patterns), collaboration tools, and dozens of ergonomic enhancements. A complete list of features and docs can be seen here. Almost everything we leared about writing Eclipse plugins came from working on CodePro the last 3 1/2 years.
 
Ranch Hand
Posts: 374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Eric Clayberg:
The NC version of CodePro costs $99.



Maybe a bit OT, but can the NC version be purchased for the use by a group of developers such as on a sourceforge dev project -- i.e. one license covers all developers? Or is it as I expect that each developer would need to buy their own license?
 
Eric Clayberg
author
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Maybe a bit OT, but can the NC version be purchased for the use by a group of developers such as on a sourceforge dev project -- i.e. one license covers all developers? Or is it as I expect that each developer would need to buy their own license?

It is licensed per developer. Sorry.
 
Arijit Ghosh
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

Thanks for all the replies.

Well when it comes to searching for solutions outside Eclipse and ANT, there are a lot. But I was hoping to keep myself happy with ANT and Eclipse.

Regards,
Arijit
 
I just had the craziest dream. This tiny ad was in it.
Enterprise-grade Excel API for Java
https://products.aspose.com/cells/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!