7

I have a maven goal configured in the pom that is executed on compile phase. But also I need that goal to run after a specific file is changed to keep everything always up to date.

i.e I want to save the file "objects.xml" and run the goal "transform" to apply XSL every time a change is done.

Is there a way for doing that from inside Eclipse?

I've been reading about custom builders for the project, but that does not cover my case.

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
MRz
  • 83
  • 5

1 Answers1

1

You can add builders and custom ant scripts to your eclipse workspace.

Project->Preferences->Builders

These builders can be automatically be added to you project with

mvn eclipse:eclipse

By adding the folling config to your pom

            <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-eclipse-plugin</artifactId>
            <configuration>
                <additionalBuildcommands>
                    <buildcommand>your.custom.Builder</buildcommand>
                </additionalBuildcommands>

for more info how to do this see the maven-eclipse-plugin website

http://maven.apache.org/plugins/maven-eclipse-plugin/

Mark Bakker
  • 1,278
  • 8
  • 19