@Test public void run() throws Exception { final PrintStream ps = System.out; final ByteArrayOutputStream out = new ByteArrayOutputStream(); System.setOut(new PrintStream(out)); try { final File filePath = new File(jarLocation(EffectiveTomEEXmlTest.class), getClass().getSimpleName() + ".xml"); EffectiveTomEEXml.main(new String[]{ "-p", filePath.getAbsolutePath() }); } finally { System.setOut(ps); } assertTrue(new String(out.toByteArray()).contains("JdbcDriver=org.hsqldb.jdbcDriver")); }
public static void main(final String[] args) throws Exception { final CommandLine line = parseCommand(args); if (line == null) { return; } final Openejb openejb = JaxbOpenejb.readConfig(findXml(line).getCanonicalPath()); final ConfigurationFactory configFact = new ConfigurationFactory(); for (final Resource r : openejb.getResource()) { final ResourceInfo ri = configFact.configureService(r, ResourceInfo.class); if (!ri.properties.containsKey("SkipImplicitAttributes")) { ri.properties.put("SkipImplicitAttributes", "false"); } r.getProperties().clear(); r.getProperties().putAll(ri.properties); } final Marshaller marshaller = JaxbOpenejb.getContext(Openejb.class).createMarshaller(); marshaller.setProperty("jaxb.formatted.output", true); marshaller.marshal(openejb, System.out); }
EffectiveTomEEXml { public static void main(final String[] args) throws Exception { final CommandLine line = parseCommand(args); if (line == null) { return; } final Openejb openejb = JaxbOpenejb.readConfig(findXml(line).getCanonicalPath()); final ConfigurationFactory configFact = new ConfigurationFactory(); for (final Resource r : openejb.getResource()) { final ResourceInfo ri = configFact.configureService(r, ResourceInfo.class); if (!ri.properties.containsKey("SkipImplicitAttributes")) { ri.properties.put("SkipImplicitAttributes", "false"); } r.getProperties().clear(); r.getProperties().putAll(ri.properties); } final Marshaller marshaller = JaxbOpenejb.getContext(Openejb.class).createMarshaller(); marshaller.setProperty("jaxb.formatted.output", true); marshaller.marshal(openejb, System.out); } }
EffectiveTomEEXml { public static void main(final String[] args) throws Exception { final CommandLine line = parseCommand(args); if (line == null) { return; } final Openejb openejb = JaxbOpenejb.readConfig(findXml(line).getCanonicalPath()); final ConfigurationFactory configFact = new ConfigurationFactory(); for (final Resource r : openejb.getResource()) { final ResourceInfo ri = configFact.configureService(r, ResourceInfo.class); if (!ri.properties.containsKey("SkipImplicitAttributes")) { ri.properties.put("SkipImplicitAttributes", "false"); } r.getProperties().clear(); r.getProperties().putAll(ri.properties); } final Marshaller marshaller = JaxbOpenejb.getContext(Openejb.class).createMarshaller(); marshaller.setProperty("jaxb.formatted.output", true); marshaller.marshal(openejb, System.out); } private  EffectiveTomEEXml(); }
EffectiveTomEEXml { public static void main(final String[] args) throws Exception { final CommandLine line = parseCommand(args); if (line == null) { return; } final Openejb openejb = JaxbOpenejb.readConfig(findXml(line).getCanonicalPath()); final ConfigurationFactory configFact = new ConfigurationFactory(); for (final Resource r : openejb.getResource()) { final ResourceInfo ri = configFact.configureService(r, ResourceInfo.class); if (!ri.properties.containsKey("SkipImplicitAttributes")) { ri.properties.put("SkipImplicitAttributes", "false"); } r.getProperties().clear(); r.getProperties().putAll(ri.properties); } final Marshaller marshaller = JaxbOpenejb.getContext(Openejb.class).createMarshaller(); marshaller.setProperty("jaxb.formatted.output", true); marshaller.marshal(openejb, System.out); } private  EffectiveTomEEXml(); static void main(final String[] args); }
EffectiveTomEEXml { public static void main(final String[] args) throws Exception { final CommandLine line = parseCommand(args); if (line == null) { return; } final Openejb openejb = JaxbOpenejb.readConfig(findXml(line).getCanonicalPath()); final ConfigurationFactory configFact = new ConfigurationFactory(); for (final Resource r : openejb.getResource()) { final ResourceInfo ri = configFact.configureService(r, ResourceInfo.class); if (!ri.properties.containsKey("SkipImplicitAttributes")) { ri.properties.put("SkipImplicitAttributes", "false"); } r.getProperties().clear(); r.getProperties().putAll(ri.properties); } final Marshaller marshaller = JaxbOpenejb.getContext(Openejb.class).createMarshaller(); marshaller.setProperty("jaxb.formatted.output", true); marshaller.marshal(openejb, System.out); } private  EffectiveTomEEXml(); static void main(final String[] args);  }