Skip to content
Snippets Groups Projects
Commit e1e9a8de authored by Thomas Mortagne's avatar Thomas Mortagne
Browse files

XWIKI-20133: The Packager Maven plugin should rely on xwiki-platform-minimaldependencies

parent b533494d
No related branches found
No related tags found
No related merge requests found
...@@ -107,44 +107,12 @@ ...@@ -107,44 +107,12 @@
<artifactId>xwiki-commons-component-default</artifactId> <artifactId>xwiki-commons-component-default</artifactId>
<version>${commons.version}</version> <version>${commons.version}</version>
</dependency> </dependency>
<!-- We need the Servlet API dep since it's used by the Packager and since it has
a provided scope in XWiki core it's not inherited as part of transitive deps --> <!-- Make sure artifacts included in the built Jetty package are built before the plugin -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>runtime</scope>
</dependency>
<!-- Needed to unpack the Flamingo skin resourced into the custom WAR -->
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-flamingo-skin-resources</artifactId>
<version>${project.version}</version>
<!-- Using provided even though it's not strictly required but in case some other module depend on this one, to
stop the chain -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-tool-jetty-resources</artifactId>
<version>${project.version}</version>
<type>zip</type>
<!-- Using provided even though it's not strictly required but in case some other module depend on this one, to
stop the chain -->
<scope>provided</scope>
</dependency>
<!-- These dependencies are needed at runtime when this plugin executes. We list them here to be sure that any
pom.xml that uses this packager plugin is built after those deps are built -->
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-tool-configuration-resources</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency> <dependency>
<groupId>org.xwiki.platform</groupId> <groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-web-war</artifactId> <artifactId>xwiki-platform-minimaldependencies</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>war</type>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
<dependency> <dependency>
...@@ -154,142 +122,6 @@ ...@@ -154,142 +122,6 @@
<type>war</type> <type>war</type>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-lesscss-default</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-lesscss-script</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-webjars-api</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-skin-skinx</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-wysiwyg-api</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-rest-server</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-localization-script</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-localization-source-legacy</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-security-authorization-bridge</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-uiextension-api</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-configuration-default</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-icon-default</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-resource-servlet</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-rendering-configuration-default</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-rendering-transformation-icon</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-xar-script</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<!-- We need to pick a URL implementation @ runtime -->
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-url-scheme-standard</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<!-- Wiki API + Wiki Script Services are core modules -->
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-wiki-default</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-wiki-script</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<!-- Delete/Copy/Rename/Move actions are now in the Refactoring module -->
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-refactoring-default</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<!-- Default implementation for the edit API -->
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-edit-default</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<!-- Use Logback as the logging implementation -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<scope>runtime</scope>
</dependency>
<!-- PR Test checker --> <!-- PR Test checker -->
<dependency> <dependency>
<groupId>org.xwiki.platform</groupId> <groupId>org.xwiki.platform</groupId>
...@@ -297,88 +129,30 @@ ...@@ -297,88 +129,30 @@
<version>${project.version}</version> <version>${project.version}</version>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
<!-- Filesystem attachment storage --> <!-- We need the Servlet API dep since it's used by the Packager and since it has
<dependency> a provided scope in XWiki core it's not inherited as part of transitive deps -->
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-store-filesystem-oldcore</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<!-- CAPTCHA API used by oldcore in CommentsAdd and RegisterAction -->
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-captcha-api</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<!-- CAPTCHA Default module used to avoid cyclic dependency on oldcore but needed to access the configuration -->
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-captcha-default</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<!-- Authentication Default Module -->
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-security-authentication-default</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-security-authentication-script</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<!-- The default name strategies components to enable checks and transformation on page names -->
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-model-validation-default</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<!-- The default User API + script implementations, needed by oldcore, platform web and more -->
<dependency> <dependency>
<groupId>org.xwiki.platform</groupId> <groupId>javax.servlet</groupId>
<artifactId>xwiki-platform-user-default</artifactId> <artifactId>javax.servlet-api</artifactId>
<version>${project.version}</version>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
<!-- Needed to unpack the Flamingo skin resourced into the custom WAR -->
<dependency> <dependency>
<groupId>org.xwiki.platform</groupId> <groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-user-script</artifactId> <artifactId>xwiki-platform-flamingo-skin-resources</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<!-- Using provided even though it's not strictly required but in case some other module depend on this one, to
stop the chain -->
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
<!-- Needed for Jobs components -->
<dependency>
<groupId>org.xwiki.commons</groupId>
<artifactId>xwiki-commons-job-default</artifactId>
<version>${commons.version}</version>
<scope>runtime</scope>
</dependency>
<!-- Needed to store links -->
<dependency> <dependency>
<groupId>org.xwiki.platform</groupId> <groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-search-solr-api</artifactId> <artifactId>xwiki-platform-tool-jetty-resources</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>zip</type>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
<!-- Expected by Needed to wait for document backlink indexation queue to be consumed. -->
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-index-api</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Dependencies not needed by the plugin itself but included in the WAR it generates,
listed to be sure it's built before the plugin -->
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-velocity-webapp</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<!-- Test Dependencies --> <!-- Test Dependencies -->
<dependency> <dependency>
<groupId>org.xwiki.commons</groupId> <groupId>org.xwiki.commons</groupId>
......
...@@ -51,7 +51,6 @@ ...@@ -51,7 +51,6 @@
import org.apache.maven.artifact.resolver.filter.AndArtifactFilter; import org.apache.maven.artifact.resolver.filter.AndArtifactFilter;
import org.apache.maven.artifact.resolver.filter.ExcludesArtifactFilter; import org.apache.maven.artifact.resolver.filter.ExcludesArtifactFilter;
import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter; import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
import org.apache.maven.model.Dependency;
import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Component; import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.LifecyclePhase;
...@@ -610,116 +609,7 @@ private Set<Artifact> getMandatoryJarArtifacts() throws MojoExecutionException ...@@ -610,116 +609,7 @@ private Set<Artifact> getMandatoryJarArtifacts() throws MojoExecutionException
Set<Artifact> mandatoryTopLevelArtifacts = new HashSet<>(); Set<Artifact> mandatoryTopLevelArtifacts = new HashSet<>();
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform", mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-oldcore", getXWikiPlatformVersion(), null, "jar")); "xwiki-platform-minimaldependencies", getXWikiPlatformVersion(), null, "jar"));
// Required to load macros.vm by default
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-velocity-webapp", getXWikiPlatformVersion(), null, "jar"));
// Required Plugins
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-skin-skinx", getXWikiPlatformVersion(), null, "jar"));
// We shouldn't need those but right now it's mandatory since they are defined in the default web.xml file we
// provide. We'll be able to remove them when we start using Servlet 3.0 -->
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-wysiwyg-api", getXWikiPlatformVersion(), null, "jar"));
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-rest-server", getXWikiPlatformVersion(), null, "jar"));
// Needed by platform-web but since we don't have any dep in platform-web's pom.xml at the moment (duplication
// issue with XE and platform-web) we need to include it here FTM... Solution: get a better maven WAR plugin
// with proper merge feature and then remove this...
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-uiextension-api", getXWikiPlatformVersion(), null, "jar"));
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-localization-script", getXWikiPlatformVersion(), null, "jar"));
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-localization-source-legacy", getXWikiPlatformVersion(), null, "jar"));
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-security-authorization-bridge", getXWikiPlatformVersion(), null, "jar"));
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-url-scheme-standard", getXWikiPlatformVersion(), null, "jar"));
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-wiki-default", getXWikiPlatformVersion(), null, "jar"));
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-lesscss-default", getXWikiPlatformVersion(), null, "jar"));
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-lesscss-script", getXWikiPlatformVersion(), null, "jar"));
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-webjars-api", getXWikiPlatformVersion(), null, "jar"));
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-configuration-default", getXWikiPlatformVersion(), null, "jar"));
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-icon-default", getXWikiPlatformVersion(), null, "jar"));
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-resource-servlet", getXWikiPlatformVersion(), null, "jar"));
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-xar-script", getXWikiPlatformVersion(), null, "jar"));
// Velocity Scripting for Model Modules is also core (it's used a bit everywhere in VMs, pages, etc).
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-wiki-script", getXWikiPlatformVersion(), null, "jar"));
// FIXME: $services.security is a replacement for $xwiki.hasAccessLevel() and we have started using it in the
// Velocity templates. Most of these templates are located in platform-web and currently we don't declare the
// dependencies of platform-web (they are declared in enterprise-web) thus we need to bundle this script service
// here. In the future we may want to create a separate module to hold the Velocity templates from platform-web
// and this module should have a dependency on platform-security-authorization-script.
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-security-authorization-script", getXWikiPlatformVersion(), null, "jar"));
// Copy/Delete/Rename/Move actions are currently in the Refactoring module and for now we consider them as
// core actions.
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-refactoring-default", getXWikiPlatformVersion(), null, "jar"));
// Editing wiki pages is a core action and so we need to provide an implementation for the edit API.
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-edit-default", getXWikiPlatformVersion(), null, "jar"));
// Rendering Script Service is used in several places and it requires a rendering configuration implementation
// to work. In addition WikiModel component implementation also requires a rendering configuration
// implementation to work.
// In addition, by default the Macro and Icon transformations are enabled and thus require configuration
// component implementations. The Macro one is drawn transitively from other dependencies but this is not the
// case for the Icon Transformation and thus we need to add it manually.
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-rendering-configuration-default", getXWikiPlatformVersion(), null, "jar"));
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-rendering-transformation-icon", getXWikiPlatformVersion(), null, "jar"));
// Most, if not all functional test modules have XAR dependencies and those are installed as extensions inside
// XWiki. Thus at XWiki initialization time, the Extension Manager initializes those extensions and need to
// have the AR Extension Handler available to do so.
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-extension-handler-xar", getXWikiPlatformVersion(), null, "jar"));
// Get the platform's pom.xml to get the versions of some needed externals dependencies, so that we do not
// hardcode them.
MavenProject platformPomProject = getPlatformPOMProject();
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.webjars", "bootstrap",
getDependencyManagementVersion(platformPomProject, "org.webjars", "bootstrap"), null, "jar"));
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.webjars", "requirejs",
getDependencyManagementVersion(platformPomProject, "org.webjars", "requirejs"), null, "jar"));
// Ensures all logging goes through SLF4J and Logback.
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.commons",
"xwiki-commons-logging-logback", this.getXWikiCommonsVersion(), "compile", "jar"));
// Get the logging artifact versions from the top level XWiki Commons POM
MavenProject pomProject = getTopLevelPOMProject();
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.slf4j", "jcl-over-slf4j",
getDependencyManagementVersion(pomProject, "org.slf4j", "jcl-over-slf4j"), null, "jar"));
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.slf4j", "log4j-over-slf4j",
getDependencyManagementVersion(pomProject, "org.slf4j", "log4j-over-slf4j"), null, "jar"));
// Filesystem store is the default so we want to test it as much as possible
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-store-filesystem-oldcore", getXWikiPlatformVersion(), null, "jar"));
// Components for executing Jobs.
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.commons",
"xwiki-commons-job-default", this.getXWikiCommonsVersion(), "compile", "jar"));
// Add a special JAR used for functional tests to discover if some scripts in some wiki page require Programming // Add a special JAR used for functional tests to discover if some scripts in some wiki page require Programming
// Rights. // Rights.
...@@ -731,37 +621,6 @@ private Set<Artifact> getMandatoryJarArtifacts() throws MojoExecutionException ...@@ -731,37 +621,6 @@ private Set<Artifact> getMandatoryJarArtifacts() throws MojoExecutionException
// Also add the skins artifacts, that may have JAR dependencies // Also add the skins artifacts, that may have JAR dependencies
mandatoryTopLevelArtifacts.addAll(getSkinArtifacts()); mandatoryTopLevelArtifacts.addAll(getSkinArtifacts());
// CAPTCHA API used by oldcore in CommentsAdd and RegisterAction.
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-captcha-api", getXWikiPlatformVersion(), null, "jar"));
// CAPTCHA Default module used to avoid cyclic dependency on oldcore but needed to access the configuration.
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-captcha-default", getXWikiPlatformVersion(), null, "jar"));
// Authentication default component used by oldcore in authenticators and script service used by login.vm
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-security-authentication-default", getXWikiPlatformVersion(), null, "jar"));
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-security-authentication-script", getXWikiPlatformVersion(), null, "jar"));
// Name strategies components
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-model-validation-default", getXWikiPlatformVersion(), null, "jar"));
// Default component for the merge operation used by oldcore.
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-store-merge-default", getXWikiPlatformVersion(), null, "jar"));
// User API implementation required by oldcore, platform web and others.
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-user-default", getXWikiPlatformVersion(), null, "jar"));
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-user-script", getXWikiPlatformVersion(), null, "jar"));
// Refactoring operation but also anything that manipulate document backlink need Solr
mandatoryTopLevelArtifacts.add(this.repositorySystem.createArtifact("org.xwiki.platform",
"xwiki-platform-search-solr-api", getXWikiPlatformVersion(), null, "jar"));
return mandatoryTopLevelArtifacts; return mandatoryTopLevelArtifacts;
} }
...@@ -804,27 +663,12 @@ private Map<String, Artifact> getManagedVersionMap() throws MojoExecutionExcepti ...@@ -804,27 +663,12 @@ private Map<String, Artifact> getManagedVersionMap() throws MojoExecutionExcepti
return dependencyManagementMap; return dependencyManagementMap;
} }
private MavenProject getTopLevelPOMProject() throws MojoExecutionException
{
return this.extensionHelper.getMavenProject(this.repositorySystem.createProjectArtifact("org.xwiki.commons",
"xwiki-commons", getXWikiCommonsVersion()));
}
private MavenProject getPlatformPOMProject() throws MojoExecutionException private MavenProject getPlatformPOMProject() throws MojoExecutionException
{ {
return this.extensionHelper.getMavenProject(this.repositorySystem.createProjectArtifact("org.xwiki.platform", return this.extensionHelper.getMavenProject(this.repositorySystem.createProjectArtifact("org.xwiki.platform",
"xwiki-platform-core", getXWikiPlatformVersion())); "xwiki-platform-core", getXWikiPlatformVersion()));
} }
/**
* @return the version of the XWiki Commons project, taken from the {@code commons.version} property, defaulting to
* the current project version of this property is not defined
*/
private String getXWikiCommonsVersion()
{
return normalizeVersion(this.commonsVersion);
}
/** /**
* @return the version of the XWiki Platform project, either configured in the project's pom using this plugin or * @return the version of the XWiki Platform project, either configured in the project's pom using this plugin or
* taken from the {@code platform.version} property if defined, defaulting to the current project version if * taken from the {@code platform.version} property if defined, defaulting to the current project version if
...@@ -844,20 +688,6 @@ private String normalizeVersion(String version) ...@@ -844,20 +688,6 @@ private String normalizeVersion(String version)
return normalizedVersion; return normalizedVersion;
} }
private String getDependencyManagementVersion(MavenProject project, String groupId, String artifactId)
throws MojoExecutionException
{
for (Object dependencyObject : project.getDependencyManagement().getDependencies()) {
Dependency dependency = (Dependency) dependencyObject;
if (dependency.getGroupId().equals(groupId) && dependency.getArtifactId().equals(artifactId)) {
return dependency.getVersion();
}
}
throw new MojoExecutionException(
String.format("Failed to find artifact [%s:%s] in dependency management " + "for [%s]", groupId, artifactId,
project.toString()));
}
/** /**
* Create the passed directory if it doesn't already exist. * Create the passed directory if it doesn't already exist.
* *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment