Class ExtensionMojoHelper

    • Constructor Detail

      • ExtensionMojoHelper

        public ExtensionMojoHelper()
        Public for technical reason, create(MavenProject, File) should be used instead.
    • Method Detail

      • create

        public static ExtensionMojoHelper create​(org.apache.maven.project.MavenProject project,
                                                 File permanentDirectory)
                                          throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • disableComponents

        public void disableComponents​(List<ComponentRepresentation> componentList)
                               throws org.apache.maven.plugin.MojoExecutionException
        Allow to unregister the components given in the list.
        Parameters:
        componentList - the list of components to unregister.
        Throws:
        org.apache.maven.plugin.MojoExecutionException - in case of error when deserializing the component types.
        Since:
        12.2
      • initalize

        public void initalize​(org.apache.maven.execution.MavenSession session,
                              org.apache.maven.artifact.repository.ArtifactRepository localRepository,
                              org.codehaus.plexus.PlexusContainer plexusContainer)
                       throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • setExtensionOverrides

        public void setExtensionOverrides​(List<ExtensionOverride> extensionOverrides)
      • getComponentManager

        public org.xwiki.component.manager.ComponentManager getComponentManager()
      • getPermanentDirectory

        public File getPermanentDirectory()
      • getLocalExtensionRepository

        public org.xwiki.extension.repository.LocalExtensionRepository getLocalExtensionRepository()
                                                                                            throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • getInstalledExtensionRepository

        public org.xwiki.extension.repository.InstalledExtensionRepository getInstalledExtensionRepository()
                                                                                                    throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • getExtensionMojoCoreExtensionRepository

        public org.xwiki.tool.extension.internal.ExtensionMojoCoreExtensionRepository getExtensionMojoCoreExtensionRepository()
      • getMavenProject

        public org.apache.maven.project.MavenProject getMavenProject​(org.apache.maven.artifact.Artifact artifact)
                                                              throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • getExtension

        public org.xwiki.extension.Extension getExtension​(org.apache.maven.artifact.Artifact artifact)
                                                   throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • toExtension

        public org.xwiki.extension.Extension toExtension​(org.xwiki.extension.maven.ArtifactModel model)
      • storeExtension

        public org.xwiki.extension.LocalExtension storeExtension​(org.apache.maven.artifact.Artifact artifact)
                                                          throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • storeExtension

        public org.xwiki.extension.LocalExtension storeExtension​(org.xwiki.extension.Extension extension)
                                                          throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • storeExtensionDependencies

        public void storeExtensionDependencies()
                                        throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • storeExtensionDependencies

        public void storeExtensionDependencies​(boolean isolate)
                                        throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • createInstallPlan

        public org.xwiki.extension.job.plan.ExtensionPlan createInstallPlan​(org.xwiki.extension.maven.ArtifactModel model)
                                                                     throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • resolveDependencies

        public List<org.xwiki.extension.job.plan.ExtensionPlan> resolveDependencies​(org.apache.maven.project.MavenProject project,
                                                                                    boolean isolate)
                                                                             throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • resolveDependencies

        public org.xwiki.extension.job.plan.ExtensionPlan resolveDependencies​(org.apache.maven.project.MavenProject project)
                                                                       throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • registerInstalledExtension

        public org.xwiki.extension.InstalledExtension registerInstalledExtension​(org.apache.maven.artifact.Artifact artifact,
                                                                                 String namespace,
                                                                                 boolean dependency,
                                                                                 Map<String,​Object> properties)
                                                                          throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • install

        public org.xwiki.job.Job install​(Collection<ExtensionArtifact> artifacts,
                                         String namespace,
                                         Map<String,​Object> properties)
                                  throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • install

        public org.xwiki.job.Job install​(Collection<ExtensionArtifact> artifacts,
                                         org.xwiki.extension.job.InstallRequest installRequest,
                                         String namespace,
                                         Map<String,​Object> properties)
                                  throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • install

        public org.xwiki.job.Job install​(org.apache.maven.artifact.Artifact artifact,
                                         String namespace,
                                         Map<String,​Object> properties)
                                  throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • install

        public org.xwiki.job.Job install​(org.xwiki.extension.job.InstallRequest installRequest,
                                         String namespace,
                                         Map<String,​Object> properties)
                                  throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • toArtifactModel

        public org.xwiki.extension.maven.ArtifactModel toArtifactModel​(org.apache.maven.artifact.Artifact artifact,
                                                                       org.apache.maven.model.Model model)
      • override

        public void override​(org.xwiki.extension.MutableExtension extension)
      • serializeExtension

        public void serializeExtension​(org.apache.maven.artifact.Artifact artifact,
                                       File directory)
                                throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • serializeExtensions

        public void serializeExtensions​(Collection<org.apache.maven.artifact.Artifact> artifacts,
                                        File directory,
                                        String type)
                                 throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • getMavenBuildConfigurationSource

        public org.xwiki.tool.extension.internal.MavenBuildConfigurationSource getMavenBuildConfigurationSource()
      • collectMavenArtifacts

        public Set<org.apache.maven.artifact.Artifact> collectMavenArtifacts​(List<ExtensionArtifact> input)
                                                                      throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException