Details
-
Task
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
4.5.0
-
None
-
Unknown
Description
causes that for example camel-main.jar contains test configurers like
org.apache.camel.main.MySecondBar, org.apache.camel.main.MySecondFoo|
As you can see herehttps://github.com/apache/camel/commit/0fb5aa31ae590eb042a1664ff18b6d5c44acc5c4
different method is called.
The original method was:
public static boolean updateResource(BuildContext buildContext, Path out, String data) { try { if (FileUtil.updateFile(out, data)) { refresh(buildContext, out); return true; } } catch (IOException e) { throw new IOError(e); } return false;
which can not create a test resource.
Newly called method
protected boolean updateResource(Path dir, String fileName, String data) { boolean updated; updated = updateResource(buildContext, dir.resolve(fileName), data); >>>> if (!fileName.endsWith(".java")) { >>>>> Path outputDir = Paths.get(project.getBuild().getOutputDirectory()); >>>>> updated |= updateResource(buildContext, outputDir.resolve(fileName), data); } return updated;
refreshes also resources in outputDiectorry. Therefore some test configurers are created during build of the artifact.