Skip to content

Commit

Permalink
The big ClassLoader change
Browse files Browse the repository at this point in the history
This changes the way Quarkus ClassLoading works,
to allow for isolated class loaders.

It also unifies how Quarkus is launched, so every
different mode we support uses the same mechanism
for both curation and launch.

Tests are now run in an isolated ClassLoader, which
means that a proxy is created that runs the tests
from within the isolated ClassLoader. This currently
has a quirk where @BeforeAll methods are run twice,
which will be fixed in the next JUnit release. This
can be worked around by using @QuarkusBeforeAll.
  • Loading branch information
stuartwdouglas authored and gsmet committed Jan 22, 2020
1 parent d26e5a0 commit 69a55d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.apache.tika.detect.EncodingDetector;
import org.apache.tika.parser.Parser;

import io.quarkus.arc.deployment.AdditionalBeanBuildItem;
import io.quarkus.arc.deployment.BeanContainerBuildItem;
import io.quarkus.deployment.Capabilities;
import io.quarkus.deployment.annotations.BuildProducer;
Expand All @@ -32,6 +33,7 @@
import io.quarkus.tika.TikaParseException;
import io.quarkus.tika.runtime.TikaConfiguration;
import io.quarkus.tika.runtime.TikaParserParameter;
import io.quarkus.tika.runtime.TikaParserProducer;
import io.quarkus.tika.runtime.TikaRecorder;

public class TikaProcessor {
Expand All @@ -52,6 +54,11 @@ public class TikaProcessor {

private TikaConfiguration config;

@BuildStep
AdditionalBeanBuildItem beans() {
return AdditionalBeanBuildItem.builder().addBeanClasses(TikaParserProducer.class).build();
}

@BuildStep
@Record(ExecutionTime.STATIC_INIT)
TikaParsersConfigBuildItem initializeTikaParser(BeanContainerBuildItem beanContainer, TikaRecorder recorder)
Expand Down
Empty file.

0 comments on commit 69a55d0

Please sign in to comment.