congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
ArtifactRepository.pathOf
Code IndexAdd Tabnine to your IDE (free)

How to use
pathOf
method
in
org.apache.maven.artifact.repository.ArtifactRepository

Best Java code snippets using org.apache.maven.artifact.repository.ArtifactRepository.pathOf (Showing top 20 results out of 477)

origin: apache/maven

@Override
public String pathOf( Artifact artifact )
{
  return userLocalArtifactRepository.pathOf( artifact );
}
origin: apache/maven

@Override
public String pathOf( Artifact artifact )
{
  return localRepository.pathOf( artifact );
}
origin: apache/maven

@Override
public void putArtifact( File source, Artifact artifact, ArtifactRepository deploymentRepository,
             TransferListener downloadMonitor )
  throws TransferFailedException
{
  putRemoteFile( deploymentRepository, source, deploymentRepository.pathOf( artifact ), downloadMonitor );
}
origin: apache/maven

public String getPathForRemoteArtifact( Artifact artifact, RemoteRepository repository, String context )
{
  return delegate.pathOf( RepositoryUtils.toArtifact( artifact ) );
}
origin: apache/maven

public String getPathForLocalArtifact( Artifact artifact )
{
  if ( realLocalRepo )
  {
    return delegate.pathOf( RepositoryUtils.toArtifact( artifact.setVersion( artifact.getBaseVersion() ) ) );
  }
  return delegate.pathOf( RepositoryUtils.toArtifact( artifact ) );
}
origin: org.apache.maven/maven-artifact

public void updateVersion( String version, ArtifactRepository localRepository )
{
  setResolvedVersion( version );
  setFile( new File( localRepository.getBasedir(), localRepository.pathOf( this ) ) );
}
origin: apache/maven

public void updateVersion( String version, ArtifactRepository localRepository )
{
  setResolvedVersion( version );
  setFile( new File( localRepository.getBasedir(), localRepository.pathOf( this ) ) );
}
origin: fabric8io/docker-maven-plugin

private File getLocalMavenRepoFile(MavenSession session, File source) {
  ArtifactRepository localRepo = session.getLocalRepository();
  if (localRepo == null) {
    log.warn("No local repo found so not adding any extra watches in the local repository");
    return null;
  }
  Artifact artifact = getArtifactFromJar(source);
  if (artifact != null) {
    try {
      return new File(localRepo.getBasedir(), localRepo.pathOf(artifact));
    } catch (InvalidArtifactRTException e) {
      log.warn("Cannot get the local repository path for %s in base dir %s : %s",
           artifact, localRepo.getBasedir(), e.getMessage());
    }
  }
  return null;
}
origin: apache/maven

throws TransferFailedException, ResourceDoesNotExistException
String remotePath = repository.pathOf( artifact );
origin: jenkinsci/maven-plugin

public String pathOf( Artifact artifact )
{
  return artifactRepository.pathOf( artifact );
}
public String pathOfRemoteRepositoryMetadata( ArtifactMetadata artifactMetadata )
origin: org.jvnet.hudson.main/maven-plugin

public String pathOf( Artifact artifact )
{
  return artifactRepository.pathOf( artifact );
}
public String pathOfRemoteRepositoryMetadata( ArtifactMetadata artifactMetadata )
origin: org.apache.maven.plugins/maven-gpg-plugin

/**
 * Gets the path of the specified artifact within the local repository. Note that the returned path need not exist
 * (yet).
 * 
 * @param artifact The artifact whose local repo path should be determined, must not be <code>null</code>.
 * @return The absolute path to the artifact when installed, never <code>null</code>.
 */
private File getLocalRepoFile( Artifact artifact )
{
  String path = localRepository.pathOf( artifact );
  return new File( localRepository.getBasedir(), path );
}
origin: org.apache.maven.plugins/maven-install-plugin

/**
 * Gets the path of the specified artifact within the local repository. Note that the returned path need not exist
 * (yet).
 *
 * @param artifact The artifact whose local repo path should be determined, must not be <code>null</code>.
 * @return The absolute path to the artifact when installed, never <code>null</code>.
 */
protected File getLocalRepoFile( Artifact artifact )
{
  String path = localRepository.pathOf( artifact );
  return new File( localRepository.getBasedir(), path );
}
origin: Spirals-Team/repairnator

private String classpath(List<URL> dependencies) {
  StringBuilder sb = new StringBuilder();
  for (int i = 0; i < dependencies.size(); i++) {
    URL s = dependencies.get(i);
    sb.append(s.getPath()).append(File.pathSeparatorChar);
  }
  final Artifact artifact =artifactFactory.createArtifact("fr.inria.spirals","npefix", HARDCODED_NPEFIX_VERSION, null, "jar");
  File file = new File(localRepository.getBasedir() + "/" + localRepository.pathOf(artifact));
  sb.append(file.getAbsoluteFile());
  System.out.println(sb);
  return sb.toString();
}
origin: jenkins-infra/update-center2

protected File resolve(ArtifactInfo a, String type, String classifier) throws AbstractArtifactResolutionException {
  Artifact artifact = af.createArtifactWithClassifier(a.groupId, a.artifactId, a.version, type, classifier);
  if (!new File(localRepo, local.pathOf(artifact)).isFile()) {
    System.err.println("Downloading " + artifact);
  }
  try {
    ar.resolve(artifact, remoteRepositories, local);
  } catch (RuntimeException e) {
    throw new ArtifactResolutionException(e.getMessage(), artifact);
  }
  return artifact.getFile();
}
origin: Spirals-Team/repairnator

private List<URL> getAstorClasspath() {
  List<URL> classpath = new ArrayList<>();
  Artifact artifactPom = artifactFactory.createArtifact("org.inria.sacha.automaticRepair","astor", HARDCODED_ASTOR_VERSION, null, "pom");
  Artifact artifactJar = artifactFactory.createArtifact("org.inria.sacha.automaticRepair","astor", HARDCODED_ASTOR_VERSION, null, "jar");
  File filePom = new File(localRepository.getBasedir() + "/" + localRepository.pathOf(artifactPom));
  File fileJar = new File(localRepository.getBasedir() + "/" + localRepository.pathOf(artifactJar));
  classpath.addAll(getClassPathFromPom(filePom, fileJar));
  return classpath;
}
origin: Spirals-Team/repairnator

private List<URL> getNopolClasspath() {
  List<URL> classpath = new ArrayList<>();
  Artifact artifactPom = artifactFactory.createArtifact("fr.inria.gforge.spirals","nopol", HARDCODED_NOPOL_VERSION, null, "pom");
  Artifact artifactJar = artifactFactory.createArtifact("fr.inria.gforge.spirals","nopol", HARDCODED_NOPOL_VERSION, null, "jar");
  File filePom = new File(localRepository.getBasedir() + "/" + localRepository.pathOf(artifactPom));
  File fileJar = new File(localRepository.getBasedir() + "/" + localRepository.pathOf(artifactJar));
  classpath.addAll(getClassPathFromPom(filePom, fileJar));
  return classpath;
}
origin: org.codehaus.mevenide/nb-project

public String getArtifactRelativeRepositoryPath(Artifact artifact) {
  //        embedder.setLocalRepositoryDirectory(FileUtil.toFile(getRepositoryRoot()));
  String toRet = getEmbedder().getLocalRepository().pathOf(artifact);
  return toRet;
}
origin: org.apache.felix/maven-bundle-plugin

/**
 * @param repository maven repository
 * @param artifact maven artifact
 * @return file URI pointing to artifact in repository
 */
public static URI getArtifactURI( ArtifactRepository repository, Artifact artifact )
{
  String baseDir = repository.getBasedir();
  String artifactPath = repository.pathOf( artifact );
  return toFileURI( baseDir + '/' + artifactPath );
}
origin: org.eclipse.tycho/tycho-p2-director-plugin

  private File getDirectorRepositoryZip(ArtifactRepository localMavenRepository) {
    // this artifact is a dependency of the Mojo, so we expect it in the local Maven repo
    Artifact artifact = repositorySystem.createArtifact("org.eclipse.tycho", "tycho-standalone-p2-director",
        TychoVersion.getTychoVersion(), "eclipse-repository");
    return new File(localMavenRepository.getBasedir(), localMavenRepository.pathOf(artifact));
  }
}
org.apache.maven.artifact.repositoryArtifactRepositorypathOf

Popular methods of ArtifactRepository

  • getBasedir
  • getUrl
  • getId
  • getLayout
  • getSnapshots
  • getReleases
  • find
  • pathOfLocalRepositoryMetadata
  • getAuthentication
  • getProtocol
  • pathOfRemoteRepositoryMetadata
  • setAuthentication
  • pathOfRemoteRepositoryMetadata,
  • setAuthentication,
  • getProxy,
  • setProxy,
  • setUrl,
  • isBlacklisted,
  • setId,
  • setLayout,
  • findVersions

Popular in Java

  • Making http requests using okhttp
  • getSystemService (Context)
  • getSharedPreferences (Context)
  • requestLocationUpdates (LocationManager)
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • BoxLayout (javax.swing)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now