workaround for MP FT TCK issue in TimeoutMetricTest
See
for more info. When that PR is merged, this commit shall be reverted.
@@ -26,6 +26,7 @@ import org.jboss.shrinkwrap.api.asset.EmptyAsset;
import org.jboss.shrinkwrap.api.container.ClassContainer;
import org.jboss.shrinkwrap.api.container.LibraryContainer;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
/**
*
@@ -63,6 +64,15 @@ public class FaultToleranceApplicationArchiveProcessor implements ApplicationArc
applicationArchive.add(EmptyAsset.INSTANCE, "META-INF/beans.xml");
}
+ if (applicationArchive instanceof WebArchive
+ && applicationArchive.contains("META-INF/microprofile-config.properties")
+ && !applicationArchive.contains("WEB-INF/classes/META-INF/microprofile-config.properties")) {
+ // workaround for https://github.com/eclipse/microprofile-fault-tolerance/pull/495
+ // this entire `if` should be removed when that PR is merged and MP FT released
+ applicationArchive.move("META-INF/microprofile-config.properties",
+ "WEB-INF/classes/META-INF/microprofile-config.properties");
+ }
+
LOGGER.info("Added additional resources to " + applicationArchive.toString(true));
}
}
