Mike
Mike

Reputation: 302

Hook into the Eclipse build process?

I'd like to be able to run a simple Java program when the build button is pressed in Eclipse. Currently when I click build, it runs some JRebel logging code. I have a program that parses the JRebel log file and stores statistics in a DB.

Is it possible to write a plugin or somehow hook into the build process of Eclipse, so that after the JRebel logging is done, it will run my program to parse the file automatically?

Any help would be appreciated, even if you could just point me in the right direction.

Thanks in advance.

Upvotes: 2

Views: 3991

Answers (2)

Alexander Pogrebnyak
Alexander Pogrebnyak

Reputation: 45576

You can add a custom Builder to your java project.

Right-click on your project. Select Properties.

In the tree on the left side choose 'Builders'.

alt text

You can either add an ant script or specific program. You also have ability to choose when this tool will be running ( before or after Java Builder ).

Upvotes: 10

Tom Crockett
Tom Crockett

Reputation: 31579

You can write an incremental project builder and register it via extension point: http://www.eclipse.org/articles/Article-Builders/builders.html

Upvotes: 1

Related Questions