Class RuntimeSupport

java.lang.Object
eu.maveniverse.maven.mima.context.internal.RuntimeSupport
All Implemented Interfaces:
Runtime

public abstract class RuntimeSupport extends Object implements Runtime
Support class for Runtime implementations.
  • Field Details

    • UNKNOWN

      public static final String UNKNOWN
      See Also:
    • DEFAULT_BASEDIR

      public static final Path DEFAULT_BASEDIR
    • DEFAULT_USER_HOME

      public static final Path DEFAULT_USER_HOME
    • DEFAULT_MAVEN_USER_HOME

      public static final Path DEFAULT_MAVEN_USER_HOME
  • Constructor Details

    • RuntimeSupport

      protected RuntimeSupport(String name, String version, int priority, String mavenVersion)
  • Method Details

    • name

      public String name()
      Description copied from interface: Runtime
      The runtime name (mostly for keying purposes), never null.
      Specified by:
      name in interface Runtime
    • version

      public String version()
      Description copied from interface: Runtime
      The runtime version, never null.
      Specified by:
      version in interface Runtime
    • priority

      public int priority()
      Description copied from interface: Runtime
      The priority of runtime instance. Priorities use natural integer ordering.
      Specified by:
      priority in interface Runtime
    • mavenVersion

      public String mavenVersion()
      Description copied from interface: Runtime
      Returns a string representing Maven version this runtime uses, never null. This mostly stands for "maven models" version, except when MIMA runs inside of Maven, when it carries the "actual Maven version".
      Specified by:
      mavenVersion in interface Runtime
    • managedRepositorySystem

      public abstract boolean managedRepositorySystem()
      Description copied from interface: Runtime
      Returns true if this runtime creates managed repository system, that is opposite when MIMA runs in Maven (or any other environment providing resolver), where it does not manage it, as hosting Maven or app does. In general, you should always treat "root context" as explained in Context and your code will be portable.
      Specified by:
      managedRepositorySystem in interface Runtime
    • customizeContext

      public Context customizeContext(ContextOverrides overrides, Context context, boolean reset)
    • customizeContext

      protected Context customizeContext(RuntimeSupport runtime, ContextOverrides overrides, Context context, boolean reset)
    • customizeLocalRepositoryManager

      protected void customizeLocalRepositoryManager(Context context, org.eclipse.aether.DefaultRepositorySystemSession session)
    • newLocalRepositoryManager

      protected void newLocalRepositoryManager(Path localRepoPath, org.eclipse.aether.RepositorySystem repositorySystem, org.eclipse.aether.DefaultRepositorySystemSession session)
    • customizeChecksumPolicy

      protected void customizeChecksumPolicy(ContextOverrides overrides, org.eclipse.aether.DefaultRepositorySystemSession session)
    • customizeSnapshotUpdatePolicy

      protected void customizeSnapshotUpdatePolicy(ContextOverrides overrides, org.eclipse.aether.DefaultRepositorySystemSession session)
    • customizeRemoteRepositories

      protected List<org.eclipse.aether.repository.RemoteRepository> customizeRemoteRepositories(ContextOverrides contextOverrides, List<org.eclipse.aether.repository.RemoteRepository> remoteRepositories)
    • defaultMavenUserHome

      protected MavenUserHomeImpl defaultMavenUserHome()
    • discoverMavenVersion

      protected static String discoverMavenVersion()
    • discoverArtifactVersion

      protected static String discoverArtifactVersion(String groupId, String artifactId, String defVal)
    • loadPomProperties

      protected static Map<String,String> loadPomProperties(String groupId, String artifactId)
    • loadClasspathProperties

      protected static Map<String,String> loadClasspathProperties(String resource)
    • toString

      public String toString()
      Overrides:
      toString in class Object