Class MavenRepository

java.lang.Object
org.kie.maven.integration.MavenRepository

public class MavenRepository extends Object
  • Field Details

    • defaultMavenRepository

      public static MavenRepository defaultMavenRepository
  • Constructor Details

    • MavenRepository

      protected MavenRepository(Aether aether)
  • Method Details

    • getMavenRepositoryConfiguration

      protected MavenRepositoryConfiguration getMavenRepositoryConfiguration()
    • getMavenRepository

      public static MavenRepository getMavenRepository()
    • getMavenRepository

      public static MavenRepository getMavenRepository(org.apache.maven.project.MavenProject mavenProject)
    • getArtifactDependecies

      public List<DependencyDescriptor> getArtifactDependecies(String artifactName)
    • resolveArtifact

      public org.eclipse.aether.artifact.Artifact resolveArtifact(org.kie.api.builder.ReleaseId releaseId)
    • resolveArtifact

      public org.eclipse.aether.artifact.Artifact resolveArtifact(String artifactName)
    • resolveArtifact

      public org.eclipse.aether.artifact.Artifact resolveArtifact(String artifactName, boolean logUnresolvedArtifact)
    • resolveVersion

      public org.eclipse.aether.version.Version resolveVersion(String artifactName)
    • getRemoteRepositoryFromDistributionManagement

      protected org.eclipse.aether.repository.RemoteRepository getRemoteRepositoryFromDistributionManagement(File pomfile)
    • deployArtifact

      public void deployArtifact(org.eclipse.aether.repository.RemoteRepository repository, org.kie.api.builder.ReleaseId releaseId, File jar, File pomfile)
      Deploys a jar on a remote repository.
      Parameters:
      repository - The remote repository where the kjar will be deployed
      releaseId - The releaseId with which the deployment will be made
      jar - The jar to be deployed
      pomfile - The pom file to be deployed together with the kjar
    • bytesToFile

      protected File bytesToFile(org.kie.api.builder.ReleaseId releaseId, byte[] bytes, String extension)
    • installArtifact

      public void installArtifact(org.kie.api.builder.ReleaseId releaseId, byte[] jarContent, byte[] pomContent)
      Installs the given jar into the local repository.
      Parameters:
      releaseId - The releaseId with which the kjar will be installed
      jarContent - A byte array containing the kjar to be installed
      pomContent - A byte array containing the pom file to be installed together with the kjar
    • installArtifact

      public void installArtifact(org.kie.api.builder.ReleaseId releaseId, File jar, File pomfile)
      Installs the given jar into the local repository.
      Parameters:
      releaseId - The releaseId with which the kjar will be installed
      jar - The jar to be installed
      pomfile - The pom file to be installed together with the kjar
    • deployPomArtifact

      public void deployPomArtifact(String groupId, String artifactId, String version, File pomfile)
    • toFileName

      public static String toFileName(org.kie.api.builder.ReleaseId releaseId, String classifier)
    • removeLocalArtifact

      public void removeLocalArtifact(org.kie.api.builder.ReleaseId releaseId)
      Utility method specifically suggested for testing purposes only.