avoid apache libs version conflict for aether module: use httpclient and commons-codec implementations from the IDE distribution

This commit is contained in:
Eugene Zhuravlev
2017-04-01 15:54:06 +02:00
parent 3cfe62d28b
commit ebee317896
4 changed files with 15 additions and 0 deletions

View File

@@ -26,5 +26,8 @@
<SOURCES />
</library>
</orderEntry>
<orderEntry type="library" exported="" name="http-client" level="project" />
<orderEntry type="library" exported="" name="commons-codec" level="project" />
<orderEntry type="library" exported="" name="commons-logging" level="project" />
</component>
</module>

View File

@@ -106,6 +106,10 @@ class CommunityStandaloneJpsBuilder {
include(name: "snappy-in-java-*.jar")
include(name: "aether-*.jar")
include(name: "maven-aether-provider-*.jar")
include(name: "commons-codec-*.jar")
include(name: "commons-logging-*.jar")
include(name: "httpclient-*.jar")
include(name: "httpcore-*.jar")
}
ant.fileset(dir: "$home/jps/lib") {
include(name: "optimizedFileManager.jar")

View File

@@ -27,6 +27,8 @@ import com.intellij.util.containers.ContainerUtil;
import com.jgoodies.forms.layout.CellConstraints;
import io.netty.util.NetUtil;
import net.n3.nanoxml.IXMLBuilder;
import org.apache.http.HttpConnection;
import org.apache.http.client.HttpClient;
import org.eclipse.aether.artifact.Artifact;
import org.jetbrains.idea.maven.aether.ArtifactRepositoryManager;
import org.jetbrains.jps.builders.impl.java.EclipseCompilerTool;
@@ -79,6 +81,12 @@ public class ClasspathBootstrap {
final String aetherPath = getResourcePath(Artifact.class); // aether-1.1.0-all.jar
cp.add(aetherPath);
cp.add(FileUtil.toSystemIndependentName(new File(new File(aetherPath).getParentFile(), "maven-aether-provider-3.3.9-all.jar").getAbsolutePath())); // aether-1.1.0-all.jar
cp.add(getResourcePath(HttpClient.class)); // httpclient
cp.add(getResourcePath(HttpConnection.class)); // httpcore
//noinspection UnnecessaryFullyQualifiedName
cp.add(getResourcePath(org.apache.commons.codec.binary.Base64.class)); // commons-codec
//noinspection UnnecessaryFullyQualifiedName
cp.add(getResourcePath(org.apache.commons.logging.LogFactory.class)); // commons-logging
cp.addAll(getJavac8RefScannerClasspath());
//don't forget to update CommunityStandaloneJpsBuilder.layoutJps accordingly

Binary file not shown.