Examples of Artifact


Examples of net.sf.collabreview.core.Artifact

   * @param repository the Repository for reading the Artifact from
   * @param ai     identifier of the artifact to analyze
   * @return the number of non-empty lines in the Artifacts content
   */
  public static int countNonEmptyLines(Repository repository, ArtifactIdentifier ai) {
    Artifact artifact = repository.getArtifact(ai);
    String source = artifact.getContent();
    String[] lines = source.split("[\n\r]");
    int count = 0;
    for (String line : lines) {
      Matcher m = emptyLine.matcher(line);
      if (!m.matches()) {
View Full Code Here

Examples of org.activiti.bpmn.model.Artifact

    boolean isForCompensation = parseForCompensation(xtr);
   
    BaseElement parsedElement = convertXMLToElement(xtr, model);
   
    if (parsedElement instanceof Artifact) {
      Artifact currentArtifact = (Artifact) parsedElement;
      currentArtifact.setId(elementId);

      if (isInSubProcess(activeSubProcessList)) {
        final SubProcess currentSubProcess = activeSubProcessList.get(activeSubProcessList.size() - 2);
        currentSubProcess.addArtifact(currentArtifact);
View Full Code Here

Examples of org.apache.archiva.maven2.model.Artifact

    public void deleteArtifactKarmaFailed()
        throws Exception
    {
        try
        {
            Artifact artifact = new Artifact();
            artifact.setGroupId( "commons-logging" );
            artifact.setArtifactId( "commons-logging" );
            artifact.setVersion( "1.0.1" );
            artifact.setPackaging( "jar" );
            artifact.setContext( SOURCE_REPO_ID );

            RepositoriesService repositoriesService = getRepositoriesService( null );

            repositoriesService.deleteArtifact( artifact );
        }
View Full Code Here

Examples of org.apache.archiva.rest.api.model.Artifact

            if ( hit.getVersions().size() > 0 )
            {
                for ( String version : hit.getVersions() )
                {

                    Artifact versionned = new BeanReplicator().replicateBean( hit, Artifact.class );

                    if ( StringUtils.isNotBlank( version ) )
                    {
                        versionned.setVersion( version );
                        versionned.setUrl( getArtifactUrl( versionned ) );

                        artifacts.add( versionned );

                    }
                }
View Full Code Here

Examples of org.apache.archiva.web.xmlrpc.api.beans.Artifact

                List<String> resultHitVersions = resultHit.getVersions();
                if ( resultHitVersions != null )
                {
                    for ( String version : resultHitVersions )
                    {
                        Artifact artifact = null;
                        for ( String repoId : observableRepos )
                        {
                            // slight behaviour change to previous implementation: instead of allocating "jar" when not
                            // found in the database, we can rely on the metadata repository to create it on the fly. We
                            // just allocate the default packaging if the Maven facet is not found.
                            FacetedMetadata model = metadataResolver.resolveProjectVersion( repositorySession, repoId,
                                                                                            resultHit.getGroupId(),
                                                                                            resultHit.getArtifactId(),
                                                                                            version );

                            if ( model != null )
                            {
                                String packaging = "jar";

                                MavenProjectFacet facet = (MavenProjectFacet) model.getFacet(
                                    MavenProjectFacet.FACET_ID );
                                if ( facet != null && facet.getPackaging() != null )
                                {
                                    packaging = facet.getPackaging();
                                }
                                artifact = new Artifact( repoId, resultHit.getGroupId(), resultHit.getArtifactId(),
                                                         version, packaging );
                                break;
                            }
                        }
View Full Code Here

Examples of org.apache.avalon.repository.Artifact

        Properties avalonWork =
          getLocalProperties( m_base, AVALON_PROPERTIES );
        m_cache = setupCache( cache, avalonSystem, avalonHome, avalonWork );
        m_hosts = setupHosts( hosts, avalonSystem, avalonHome, avalonWork );

        Artifact implementation = setupImplementation( artifact );
        ClassLoader parent = setupClassLoader( loader );

        //
        // Create the temporary directory to pull down files into
        //
View Full Code Here

Examples of org.apache.geronimo.deployment.service.jsr88.Artifact

        ConnectorDCB connector = (ConnectorDCB) dcbRoot.getDConfigBean(root.getChildBean(dcbRoot.getXpaths()[0])[0]);
        assertNotNull(connector);
        assertNull(connector.getEnvironment());
        EnvironmentData environment = new EnvironmentData();
        connector.setEnvironment(environment);
        Artifact configId = new Artifact();
        environment.setConfigId(configId);
        assertNull(configId.getArtifactId());
        assertNull(configId.getGroupId());
        assertNull(configId.getType());
        assertNull(configId.getVersion());
        configId.setGroupId("test");
        configId.setArtifactId("product");
        configId.setType("rar");
        configId.setVersion("1.0");
        Artifact parent = new Artifact();
        Artifact dependency = new Artifact();
        environment.setDependencies(new Artifact[]{parent, dependency});
        assertNull(parent.getArtifactId());
        assertNull(parent.getGroupId());
        assertNull(parent.getType());
        assertNull(parent.getVersion());
        assertNull(dependency.getArtifactId());
        assertNull(dependency.getGroupId());
        assertNull(dependency.getType());
        assertNull(dependency.getVersion());
        parent.setGroupId("org.apache.geronimo.configs");
        parent.setArtifactId("j2ee-server");
        parent.setType("car");
        assertNull(parent.getVersion());
        dependency.setGroupId("postgresql");
        dependency.setArtifactId("postgresql-8.0");
        dependency.setType("jar");
        dependency.setVersion("313.jdbc3");
        // todo: Try the /connector/environment/hidden-classes element
        // todo: Try the /connector/environment/non-overridable-classes element
        // Try the /connector/resourceadapter element
        assertNotNull(connector.getResourceAdapter());
        assertEquals(1, connector.getResourceAdapter().length);
View Full Code Here

Examples of org.apache.geronimo.jee.deployment.Artifact

            if (moduleDeltaKind != ServerBehaviourDelegate.REMOVED) {
              //GERONIMODEVTOOLS-361
              for (IModule singleModule:module){
                Environment environment = getEnvironment(singleModule);
                  if (environment != null) {
                      Artifact child = environment.getModuleId();
                      Dependencies dependencies = environment.getDependencies();
                      if (dependencies != null) {
                          List<Dependency> depList = dependencies.getDependency();
                          for ( Dependency dep : depList) {
                              Artifact parent = deploymentFactory.createArtifact();
                              parent.setGroupId( dep.getGroupId() );
                              parent.setArtifactId( dep.getArtifactId() );
                              parent.setVersion( dep.getVersion() );
                              parent.setType( dep.getType() );
                             
                              StringBuilder configId = new StringBuilder();
                              if (dep.getGroupId()!=null)
                                configId.append(dep.getGroupId());
                              configId.append("/");
                              if (dep.getArtifactId()!=null)
                                configId.append(dep.getArtifactId());
                              configId.append("/");
                              if (dep.getVersion()!=null)
                                configId.append(dep.getVersion());
                              configId.append("/");
                              if (dep.getType()!=null)
                                configId.append(dep.getType());
                             
                              if (!DeploymentUtils.isInstalledModule(server,configId.toString()))
                                   dm.addDependency( child, parent );
                          }
                      }
                  }
              }
            }
        }

        //
        // Iterate through all the modules again and reorder as necessary
        //
        for (int ii=0; ii<modules.size(); ii++) {
            IModule[] module = (IModule[]) modules.get(ii);
            int moduleDeltaKind = ((Integer)deltaKind.get(ii)).intValue();
            if (module!=null && !reorderedModules.contains(module)) {
                // Not already moved
                if (moduleDeltaKind == ServerBehaviourDelegate.REMOVED) {
                    // Move module if going to be removed
                    reorderedModules.add(module);
                    reorderedKinds.add(moduleDeltaKind);
                }
                else {
                    Environment environment = getEnvironment(module[0]);
                    if (environment != null) {
                        Artifact artifact = environment.getModuleId();
                        if (artifact == null) {
                            // Move if null (nothing can be done)
                            if (!reorderedModules.contains(module)) {
                                reorderedModules.add(module);
                                reorderedKinds.add(moduleDeltaKind);
View Full Code Here

Examples of org.apache.geronimo.kernel.repository.Artifact

    public Artifact[] getInstalled(Artifact query) {
        Artifact[] all = artifactResolver.queryArtifacts(query);
        List configs = new ArrayList();
        for (int i = 0; i < all.length; i++) {
            Artifact artifact = all[i];
            if(isConfiguration(artifact)) {
                configs.add(artifact);
            }
        }
        if(configs.size() == all.length) {
View Full Code Here

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

    }

    public void addArtifacts(DefaultModuleDescriptor moduleDescriptor, Set<Configuration> configurations) {
        for (Configuration configuration : configurations) {
            for (PublishArtifact publishArtifact : configuration.getArtifacts()) {
                Artifact ivyArtifact = createIvyArtifact(publishArtifact, moduleDescriptor.getModuleRevisionId());
                moduleDescriptor.addArtifact(configuration.getName(), ivyArtifact);
            }
        }
    }
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.