Examples of ModuleDescriptor


Examples of org.apache.ivy.core.module.descriptor.ModuleDescriptor

        File dest = new File("build/testFixDeps/testTransitivity.xml");
        fixDeps.setToFile(dest);
        fixDeps.execute();

        assertTrue(dest.exists());
        ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(
            new IvySettings(), dest.toURI().toURL(), true);
        assertEquals("apache", md.getModuleRevisionId().getOrganisation());
        assertEquals("resolve-simple", md.getModuleRevisionId().getName());
        assertEquals("1.0", md.getModuleRevisionId().getRevision());
        assertEquals("release", md.getStatus());

        assertEquals(2, md.getConfigurations().length);
        assertEquals("default", md.getConfigurations()[0].getName());
        assertEquals(0, md.getConfigurations()[0].getExtends().length);
        assertEquals("compile", md.getConfigurations()[1].getName());
        assertEquals(0, md.getConfigurations()[1].getExtends().length);

        assertEquals(3, md.getDependencies().length);

        assertEquals("org1", md.getDependencies()[0].getDependencyId().getOrganisation());
        assertEquals("mod1.2", md.getDependencies()[0].getDependencyId().getName());
        assertEquals(false, md.getDependencies()[0].isChanging());
        assertEquals(true, md.getDependencies()[0].isForce());
        assertEquals(false, md.getDependencies()[0].isTransitive());
        assertEquals("2.0", md.getDependencies()[0].getDependencyRevisionId().getRevision());
        assertEquals(1, md.getDependencies()[0].getModuleConfigurations().length);
        assertEquals("default", md.getDependencies()[0].getModuleConfigurations()[0]);
        assertEquals(1, md.getDependencies()[0].getDependencyConfigurations("default").length);
        assertEquals("default", md.getDependencies()[0].getDependencyConfigurations("default")[0]);

        assertEquals("org1", md.getDependencies()[1].getDependencyId().getOrganisation());
        assertEquals("mod1.1", md.getDependencies()[1].getDependencyId().getName());
        assertEquals(false, md.getDependencies()[1].isChanging());
        assertEquals(true, md.getDependencies()[1].isForce());
        assertEquals(false, md.getDependencies()[1].isTransitive());
        assertEquals("2.0", md.getDependencies()[1].getDependencyRevisionId().getRevision());
        assertEquals(1, md.getDependencies()[1].getModuleConfigurations().length);
        assertEquals("compile", md.getDependencies()[1].getModuleConfigurations()[0]);
        assertEquals(1, md.getDependencies()[1].getDependencyConfigurations("compile").length);
        assertEquals("default", md.getDependencies()[1].getDependencyConfigurations("compile")[0]);

        assertEquals("org1", md.getDependencies()[2].getDependencyId().getOrganisation());
        assertEquals("mod1.2", md.getDependencies()[2].getDependencyId().getName());
        assertEquals(false, md.getDependencies()[2].isChanging());
        assertEquals(true, md.getDependencies()[2].isForce());
        assertEquals(false, md.getDependencies()[2].isTransitive());
        assertEquals("2.1", md.getDependencies()[2].getDependencyRevisionId().getRevision());
        assertEquals(1, md.getDependencies()[2].getModuleConfigurations().length);
        assertEquals("compile", md.getDependencies()[2].getModuleConfigurations()[0]);
        assertEquals(1, md.getDependencies()[2].getDependencyConfigurations("compile").length);
        assertEquals("*", md.getDependencies()[2].getDependencyConfigurations("compile")[0]);
    }
View Full Code Here

Examples of org.apache.ivy.core.module.descriptor.ModuleDescriptor

                new File(testObr, "sources.xml")));
        assertNotNull(repo);
        assertEquals(2, CollectionUtils.toList(repo.getModules()).size());
        Iterator<ModuleDescriptorWrapper> itModule = repo.getModules();
        while (itModule.hasNext()) {
            ModuleDescriptor md = itModule.next().getModuleDescriptor();
            if (md.getModuleRevisionId().getName().equals("org.apache.felix.eventadmin")) {
                assertEquals(1, md.getAllArtifacts().length);
            } else {
                assertEquals("org.apache.felix.bundlerepository", md.getModuleRevisionId()
                        .getName());
                assertEquals(2, md.getAllArtifacts().length);
                String type0 = md.getAllArtifacts()[0].getType();
                String url0 = md.getAllArtifacts()[0].getUrl().toExternalForm();
                String type1 = md.getAllArtifacts()[1].getType();
                String url1 = md.getAllArtifacts()[1].getUrl().toExternalForm();
                String jarUrl = "http://repo1.maven.org/maven2/org/apache/felix/"
                        + "org.apache.felix.bundlerepository/1.0.3/org.apache.felix.bundlerepository-1.0.3.jar";
                String srcUrl = "http://oscar-osgi.sf.net/obr2/org.apache.felix.bundlerepository/"
                        + "org.apache.felix.bundlerepository-1.0.3-src.jar";
                if (type0.equals("jar")) {
View Full Code Here

Examples of org.apache.ivy.core.module.descriptor.ModuleDescriptor

        project.setProperty("ivy.dep.file", dest.getAbsolutePath());
        File dest2 = new File("build/testFixDeps/testTransitivity2.xml");
        fixDeps.setToFile(dest2);
        fixDeps.execute();

        ModuleDescriptor md1 = XmlModuleDescriptorParser.getInstance().parseDescriptor(
            new IvySettings(), dest.toURI().toURL(), true);
        ModuleDescriptor md2 = XmlModuleDescriptorParser.getInstance().parseDescriptor(
            new IvySettings(), dest2.toURI().toURL(), true);
        assertEquals(md1, md2);
        assertEquals(Arrays.asList(md1.getConfigurations()), Arrays.asList(md2.getConfigurations()));
        assertEquals(toString(Arrays.asList(md1.getDependencies())),
            toString(Arrays.asList(md2.getDependencies())));
    }
View Full Code Here

Examples of org.apache.ivy.core.module.descriptor.ModuleDescriptor

    public static ResolvedModuleRevision toSystem(ResolvedModuleRevision rmr, Namespace ns) {
        if (ns.getToSystemTransformer().isIdentity()) {
            return rmr;
        }
        ModuleDescriptor md = toSystem(rmr.getDescriptor(), ns);
        if (md.equals(rmr.getDescriptor())) {
            return rmr;
        }
        return new ResolvedModuleRevision(rmr.getResolver(), rmr.getArtifactResolver(), md,
                transform(rmr.getReport(), ns.getToSystemTransformer()), rmr.isForce());
    }
View Full Code Here

Examples of org.apache.ivy.core.module.descriptor.ModuleDescriptor

        // mod1.1 depends on mod1.2
        ResolveReport report = ivy.resolve(new File(
                "test/repositories/1/org1/mod1.1/ivys/ivy-1.0.xml").toURL(),
            getResolveOptions(new String[] {"*"}));
        assertNotNull(report);
        ModuleDescriptor md = report.getModuleDescriptor();
        assertNotNull(md);

        String pattern = "build/test/retrieve/[module]/[conf]/[artifact]-[revision].[ext]";

        // we create a fake old file to see if it is overwritten
        File file = new File(IvyPatternHelper.substitute(pattern, "org1", "mod1.2", "2.0",
            "mod1.2", "jar", "jar", "default")).getCanonicalFile();
        file.getParentFile().mkdirs();
        file.createNewFile();
        ivy.retrieve(md.getModuleRevisionId(), pattern,
            getRetrieveOptions().setOverwriteMode("always"));
        assertEquals(
            new File("test/repositories/1/org1/mod1.2/jars/mod1.2-2.0.jar").lastModified(),
            file.lastModified());
    }
View Full Code Here

Examples of org.apache.maven.archetype.metadata.ModuleDescriptor

            setParentArtifactId( context, StringUtils.replace( artifactId, "${rootArtifactId}", rootArtifactId ) );
        }

        while ( subprojects.hasNext() )
        {
            ModuleDescriptor project = subprojects.next();

            File moduleOutputDirectoryFile = new File( outputDirectoryFile,
                                                       StringUtils.replace( project.getDir(), "__rootArtifactId__",
                                                                            rootArtifactId ) );

            context.put( Constants.ARTIFACT_ID,
                         StringUtils.replace( project.getId(), "${rootArtifactId}", rootArtifactId ) );

            processFilesetModule( rootArtifactId,
                                  StringUtils.replace( project.getDir(), "__rootArtifactId__", rootArtifactId ),
                                  archetypeResources, new File( moduleOutputDirectoryFile, Constants.ARCHETYPE_POM ),
                                  archetypeZipFile,
                                  ( StringUtils.isEmpty( moduleOffset ) ? "" : ( moduleOffset + "/" ) )
                                      + StringUtils.replace( project.getDir(), "${rootArtifactId}", rootArtifactId ),
                                  pom, moduleOutputDirectoryFile, packageName, project, context );
        }

        restoreParentArtifactId( context, parentArtifactId );
View Full Code Here

Examples of org.glassfish.deployment.common.ModuleDescriptor

            // Get portion of request uri representing location within a module
            String wsdlPath = endpoint.getWsdlContentPath(requestUri);

            if( wsdlPath != null) {
                ModuleDescriptor module =
                    webService.getBundleDescriptor().getModuleDescriptor();

                if( wsdlPath.equals(webService.getWsdlFileUri())){
                    // If the request is for the main wsdl document, return
                    // the final wsdl instead of the wsdl from the module.
View Full Code Here

Examples of org.jayasoft.woj.common.model.content.ModuleDescriptor

    result = (ModuleDescriptor[]) l.toArray(result);
        return result;
  }

  public ModuleDescriptor[] getAllModuleWithSameOrgModRev(String modId) {
    ModuleDescriptor mdesc =  (ModuleDescriptor) get(modId, getModuleDescriptorRowMapper());
    ModuleDescriptor[] result = new ModuleDescriptor[0];
    if (mdesc != null) {
      List l = getObjects("get.from.org.mod.rev",
          new Object[] {mdesc.getOrganisation(),
                  mdesc.getModule(),
                  mdesc.getRevision()}, getModuleDescriptorRowMapper());
      result = new ModuleDescriptor[l.size()];
      result = (ModuleDescriptor[]) l.toArray(result);
    }
        return result;
  }
View Full Code Here

Examples of org.meshcms.core.ModuleDescriptor

  public void writeTag() throws IOException, JspException {
    if (date == null) {
      date = DATE_NONE;
    }

    ModuleDescriptor md = getModuleDescriptor(location, name);
    boolean showAlt = true;

    if (md != null) {
      if (parameters != null) {
        md.parseParameters(parameters);
      }

      Path modulePath = webSite.getModulePath(md.getTemplate());

      if (modulePath != null) {
        md.setPagePath(pagePath);
        md.setModulePath(modulePath);
        md.setDateFormat(date);
        md.setStyle(style);

        String moduleCode = "meshcmsmodule_" + location;
        request.setAttribute(moduleCode, md);

        Path jspPath = modulePath.add(SiteMap.MODULE_INCLUDE_FILE);
View Full Code Here

Examples of org.qi4j.api.structure.ModuleDescriptor

                        server.registerMBean( mbean, objectName );
                        mbeans.add( objectName );
                    }
                    else if( visited instanceof ModuleDescriptor )
                    {
                        ModuleDescriptor moduleDescriptor = (ModuleDescriptor) visited;
                        module = application.findModule( layer.name(), moduleDescriptor.name() );
                        ObjectName objectName = new ObjectName( names.peek()
                                                                    .toString() + ",module=" + moduleDescriptor.name() );
                        names.push( objectName );
                        RequiredModelMBean mbean = new ModelMBeanBuilder( objectName, moduleDescriptor.name(), moduleDescriptor
                            .getClass()
                            .getName() ).
                            attribute( "name", "Module name", String.class.getName(), "Name of module", "name", null ).
                            newModelMBean();
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.