I've tried to reproduce the problem with something like:
@Dependent |
class PathProducer { |
|
@ApplicationScoped |
@Produces |
public static final Path DIR = new File(System.getProperty("java.home")).toPath().resolve("bin"); |
|
} |
|
@RunWith(Arquillian.class) |
class PathProducerTest { |
|
@Deployment |
public static Archive<?> getDeployment() { |
return ShrinkWrap.create(BeanArchive.class, Utils.getDeploymentNameAsHash(PathProducerTest.class)) |
.addClass(PathProducer.class); |
} |
|
@Inject |
Path path; |
|
@Test |
public void testProducer() throws IOException { |
Files.createDirectories(path.resolve("dummy")); |
} |
}
|
but without success (i.e. the dummy directory is created). It seems the generated proxy works fine. Could you debug your app and see what java.nio.file.Path.getFileSystem() of the injected path returns? This might give us clue to where to look next. |