Examples of Archetypes


Examples of io.fabric8.tooling.archetype.catalog.Archetypes

public class ArchetypeXmlTest {

    @Test
    public void testMarshalArchetypes() throws JAXBException {
        Archetypes archetypes = new Archetypes();
        archetypes.add(new Archetype("foo", "bar", "1.1", "Some name", "Some description"));
        archetypes.add(new Archetype("xyz", "whatever", "2.3", "Some other name", "Docs..."));

        StringWriter buffer = new StringWriter();
        Archetypes.newMarshaller().marshal(archetypes, buffer);

        System.out.println("Generated XML: " + buffer);
View Full Code Here

Examples of io.fabric8.tooling.archetype.catalog.Archetypes

        if (mbeanServer != null) {
            JMXUtils.registerMBean(this, mbeanServer, OBJECT_NAME);
        }

        URL catalog = componentContext.getBundleContext().getBundle().getResource("archetype-catalog.xml");
        Archetypes archetypes = (Archetypes) Archetypes.newUnmarshaller().unmarshal(new StreamSource(catalog.openStream()));
        for (Archetype arch : archetypes.getArchetypes()) {
            this.archetypes.put(String.format("%s:%s:%s", arch.groupId, arch.artifactId, arch.version), arch);
        }
    }
View Full Code Here

Examples of org.fusesource.ide.commons.camel.tools.Archetypes

          object = unmarshaller.unmarshal(new StringReader(catalog));
        } catch (Exception e) {
          Activator.getLogger().warning(e);
        }
        if (object instanceof Archetypes) {
          Archetypes archetypesDTO = (Archetypes) object;
          List<Archetype> list = archetypesDTO.getArchetypes();
          for (Archetype archetype : list) {
            ArchetypeDetails details = new ArchetypeDetails(archetype);
            URL resource = bundle.getResource("/archetypes/" + details.getFullName());
            details.setResource(resource);
            answer.add(details);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.