Remove the transformed output directory before executing JakartaTransformer

Closes #30086

Signed-off-by: rmartinc <rmartinc@redhat.com>
This commit is contained in:
rmartinc 2024-06-03 13:21:26 +02:00 committed by Marek Posolda
parent 56c955df20
commit 536534dd25
5 changed files with 9 additions and 26 deletions

View file

@ -94,8 +94,8 @@
<configuration> <configuration>
<target> <target>
<property name="plugin_classpath" refid="maven.plugin.classpath" /> <property name="plugin_classpath" refid="maven.plugin.classpath" />
<delete dir="${jakarta-transformer-target}"/>
<java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true"> <java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true">
<arg value="-o" />
<arg value="${jakarta-transformer-sources}" /> <arg value="${jakarta-transformer-sources}" />
<arg value="${jakarta-transformer-target}" /> <arg value="${jakarta-transformer-target}" />
<classpath> <classpath>

View file

@ -115,8 +115,8 @@
<configuration> <configuration>
<target> <target>
<property name="plugin_classpath" refid="maven.plugin.classpath" /> <property name="plugin_classpath" refid="maven.plugin.classpath" />
<delete dir="${jakarta-transformer-target}"/>
<java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true"> <java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true">
<arg value="-o" />
<arg value="${jakarta-transformer-sources}" /> <arg value="${jakarta-transformer-sources}" />
<arg value="${jakarta-transformer-target}" /> <arg value="${jakarta-transformer-target}" />
<classpath> <classpath>

View file

@ -55,8 +55,8 @@
<configuration> <configuration>
<target> <target>
<property name="plugin_classpath" refid="maven.plugin.classpath" /> <property name="plugin_classpath" refid="maven.plugin.classpath" />
<delete dir="${jakarta-transformer-target}"/>
<java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true"> <java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true">
<arg value="-o" />
<arg value="${jakarta-transformer-sources}" /> <arg value="${jakarta-transformer-sources}" />
<arg value="${jakarta-transformer-target}" /> <arg value="${jakarta-transformer-target}" />
<classpath> <classpath>

View file

@ -93,24 +93,14 @@
<configuration> <configuration>
<target> <target>
<property name="plugin_classpath" refid="maven.plugin.classpath"/> <property name="plugin_classpath" refid="maven.plugin.classpath"/>
<delete dir="${jakarta-transformer-target}"/>
<java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true"> <java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true">
<arg value="-o"/>
<arg value="${jakarta-transformer-sources}"/> <arg value="${jakarta-transformer-sources}"/>
<arg value="${jakarta-transformer-target}"/> <arg value="${jakarta-transformer-target}"/>
<classpath> <classpath>
<pathelement path="${plugin_classpath}"/> <pathelement path="${plugin_classpath}"/>
</classpath> </classpath>
</java> </java>
<!-- Possibility to override classes for admin-client-jee -->
<!-- Remove this comment in that case
<touch>
<fileset dir="${jakarta-transformer-target}"/>
</touch>
<copy todir="${jakarta-transformer-target}" overwrite="false">
<fileset dir="${jakarta-transformer-target}/tmp"/>
</copy>
<delete dir="${jakarta-transformer-target}/tmp"/>
-->
</target> </target>
</configuration> </configuration>
</execution> </execution>

View file

@ -16,8 +16,8 @@
<maven.compiler.target>17</maven.compiler.target> <maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jakarta-transformer-sources>${project.basedir}/../servlets</jakarta-transformer-sources> <jakarta-transformer-sources>${project.basedir}/../servlets/src</jakarta-transformer-sources>
<jakarta-transformer-target>${project.basedir}</jakarta-transformer-target> <jakarta-transformer-target>${project.basedir}/src</jakarta-transformer-target>
</properties> </properties>
<dependencies> <dependencies>
@ -96,21 +96,14 @@
<configuration> <configuration>
<target> <target>
<property name="plugin_classpath" refid="maven.plugin.classpath"/> <property name="plugin_classpath" refid="maven.plugin.classpath"/>
<delete dir="${jakarta-transformer-target}"/>
<java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true"> <java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true">
<arg value="-o"/>
<arg value="${jakarta-transformer-sources}"/> <arg value="${jakarta-transformer-sources}"/>
<arg value="${jakarta-transformer-target}/tmp"/> <arg value="${jakarta-transformer-target}"/>
<classpath> <classpath>
<pathelement path="${plugin_classpath}"/> <pathelement path="${plugin_classpath}"/>
</classpath> </classpath>
</java> </java>
<touch>
<fileset dir="${jakarta-transformer-target}"/>
</touch>
<copy todir="${jakarta-transformer-target}" overwrite="false">
<fileset dir="${jakarta-transformer-target}/tmp"/>
</copy>
<delete dir="${jakarta-transformer-target}/tmp"/>
</target> </target>
</configuration> </configuration>
</execution> </execution>