Khalid Azam
Khalid Azam

Reputation: 1643

Maven Tycho: is there any way to delete "eclipsec.exe" during build?

After the successful build in window environment "eclipsec.exe" is getting created under "/products//Win32/{x86 |x86_64}/../", is there any way to delete "eclipsec.exe" during build?

Upvotes: 0

Views: 543

Answers (3)

I have successfully used a p2.inf advice file for this purpose. I have added instructions that delete the undesirable files when the product is installed. I have not experienced a failure of this yet, but P2 is not well documented, so if the p2.inf is applied to early, the files may still appear...

Upvotes: 0

jsievers
jsievers

Reputation: 1853

as of now there is only a workaround

http://dev.eclipse.org/mhonarc/lists/tycho-user/msg03071.html

which relies on unspecified order of p2 touchpoint execution.

Upvotes: 1

Constantine
Constantine

Reputation: 424

You can either setup maven-clean-plugin to wipe it out during "clean" lifecycle. But that will only execute when you run "mvm clean":

  <plugin>
    <artifactId>maven-clean-plugin</artifactId>
    <version>2.5</version>
    <configuration>
      <filesets>
        <fileset>
          <directory>/products//Win32/{x86 |x86_64}/../</directory>
          <includes>
            <include>eclipsec.exe</include>
          </includes>
        </fileset>
      </filesets>
    </configuration>
  </plugin>

http://maven.apache.org/plugins/maven-clean-plugin/examples/delete_additional_files.html

Another option is to use maven-antrun-plugin:

<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
  <execution>
    <phase>package</phase>
    <configuration>
      <target>
        <delete file="/products//Win32/{x86 |x86_64}/../eclipsec.exe"/>
      </target>
    </configuration>
    <goals>
      <goal>run</goal>
    </goals>
  </execution>
</executions>

This is attached to "package" phase and will delete file after the project is compiled. More info on plugin usage here: http://maven.apache.org/plugins/maven-antrun-plugin/usage.html

Upvotes: 0

Related Questions