@Test public void testApplicationPathAnnotation_InWebInfLibArchive() throws Exception { JavaArchive subArchive = ShrinkWrap.create(JavaArchive.class, "mysubarchive.jar"); subArchive.addClass(MySampleApplication.class); JAXRSArchive archive = ShrinkWrap.create(JAXRSArchive.class); archive.addAsLibrary(subArchive); DefaultApplicationDeploymentProcessor processor = new DefaultApplicationDeploymentProcessor(archive); processor.process(); Node generated = archive.get(PATH); assertThat(generated).isNull(); }
@Override public void process() throws Exception { if (this.deploymentContext != null && this.deploymentContext.isImplicit()) { return; } if (!archive.getName().endsWith(".war")) { return; } if (hasApplicationPathOrServletMapping(archive)) { return; } if (applicationPath.isExplicit()) { addGeneratedApplication(archive.as(JAXRSArchive.class)); } }
DefaultApplicationDeploymentProcessor implements DeploymentProcessor { @Override public void process() throws Exception { if (this.deploymentContext != null && this.deploymentContext.isImplicit()) { return; } if (!archive.getName().endsWith(".war")) { return; } if (hasApplicationPathOrServletMapping(archive)) { return; } if (applicationPath.isExplicit()) { addGeneratedApplication(archive.as(JAXRSArchive.class)); } } }
DefaultApplicationDeploymentProcessor implements DeploymentProcessor { @Override public void process() throws Exception { if (this.deploymentContext != null && this.deploymentContext.isImplicit()) { return; } if (!archive.getName().endsWith(".war")) { return; } if (hasApplicationPathOrServletMapping(archive)) { return; } if (applicationPath.isExplicit()) { addGeneratedApplication(archive.as(JAXRSArchive.class)); } } @Inject  DefaultApplicationDeploymentProcessor(Archive archive); }
DefaultApplicationDeploymentProcessor implements DeploymentProcessor { @Override public void process() throws Exception { if (this.deploymentContext != null && this.deploymentContext.isImplicit()) { return; } if (!archive.getName().endsWith(".war")) { return; } if (hasApplicationPathOrServletMapping(archive)) { return; } if (applicationPath.isExplicit()) { addGeneratedApplication(archive.as(JAXRSArchive.class)); } } @Inject  DefaultApplicationDeploymentProcessor(Archive archive); @Override void process(); }
DefaultApplicationDeploymentProcessor implements DeploymentProcessor { @Override public void process() throws Exception { if (this.deploymentContext != null && this.deploymentContext.isImplicit()) { return; } if (!archive.getName().endsWith(".war")) { return; } if (hasApplicationPathOrServletMapping(archive)) { return; } if (applicationPath.isExplicit()) { addGeneratedApplication(archive.as(JAXRSArchive.class)); } } @Inject  DefaultApplicationDeploymentProcessor(Archive archive); @Override void process();  }