Class MavenRepository


  • public class MavenRepository
    extends Object
    • Field Detail

      • defaultMavenRepository

        public static MavenRepository defaultMavenRepository
    • Constructor Detail

      • MavenRepository

        protected MavenRepository​(Aether aether)
    • Method Detail

      • getMavenRepository

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

        public org.eclipse.aether.artifact.Artifact resolveArtifact​(org.appformer.maven.support.AFReleaseId 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.appformer.maven.support.AFReleaseId 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.appformer.maven.support.AFReleaseId releaseId,
                                   byte[] bytes,
                                   String extension)
      • installArtifact

        public void installArtifact​(org.appformer.maven.support.AFReleaseId 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.appformer.maven.support.AFReleaseId 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.appformer.maven.support.AFReleaseId releaseId,
                                        String classifier)
      • removeLocalArtifact

        public void removeLocalArtifact​(org.appformer.maven.support.AFReleaseId releaseId)
        Utility method specifically suggested for testing purposes only.