diff --git a/pom.xml b/pom.xml
index d85a3824..2d0762dc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -18,7 +18,7 @@
${java.version}
3.3.9
- 3.5
+ 3.3
3.3
4.2.1
@@ -84,6 +84,53 @@
biz.aQute.bndlib
5.2.0
+
+
+
+ org.apache.maven
+ maven-compat
+ ${maven.version}
+
+
+
+ org.apache.maven
+ maven-core
+ ${maven.version}
+ provided
+
+
+
+ org.apache.maven
+ maven-settings
+ ${maven.version}
+ provided
+
+
+
+ org.apache.maven
+ maven-model
+ ${maven.version}
+
+
+
+ org.apache.maven
+ maven-plugin-api
+ ${maven.version}
+
+
+
+ org.apache.maven
+ maven-artifact
+ ${maven.version}
+
+
+
+
+ org.codehaus.plexus
+ plexus-component-annotations
+ 1.6
+ provided
+
@@ -92,26 +139,12 @@
org.apache.maven
maven-core
${maven.version}
- provided
-
-
- junit
- junit
-
-
-
-
- org.apache.maven
- maven-model
- ${maven.version}
- provided
org.apache.maven
maven-plugin-api
- ${maven.version}
- provided
+
org.apache.maven.plugin-tools
@@ -121,6 +154,10 @@
+
+ org.codehaus.plexus
+ plexus-component-annotations
+
@@ -148,25 +185,9 @@
${eclipse.aether.version}
-
- org.apache.maven
- maven-compat
- ${maven.version}
- provided
-
commons-io
commons-io
- 2.5
-
-
- commons-collections
- commons-collections
- 3.2.2
-
-
- commons-lang
- commons-lang
2.6
@@ -178,11 +199,6 @@
biz.aQute.bnd
biz.aQute.bndlib
-
- org.apache.commons
- commons-exec
- 1.3
-
org.twdata.maven
mojo-executor
@@ -199,17 +215,18 @@
+
- org.eclipse.tycho.extras
- tycho-p2-extras-plugin
+ org.eclipse.tycho
+ tycho-core
${tycho.version}
- org.eclipse.tycho
- tycho-packaging-plugin
- ${tycho.version}
- maven-plugin
+ org.eclipse.tycho
+ sisu-equinox-launching
+ ${tycho.version}
+
junit
junit
@@ -227,11 +244,6 @@
groovy
${groovy.version}
-
- com.cenqua.clover
- clover
- ${clover.version}
-
@@ -683,6 +695,31 @@
+
+ convergence
+
+
+
+ org.apache.maven.plugins
+ maven-enforcer-plugin
+ 3.0.0-M3
+
+
+ enforce
+
+
+
+
+
+
+ enforce
+
+
+
+
+
+
+
diff --git a/src/main/groovy/org/reficio/p2/resolver/maven/impl/AetherResolver.groovy b/src/main/groovy/org/reficio/p2/resolver/maven/impl/AetherResolver.groovy
index 45cb6a10..7db2e946 100644
--- a/src/main/groovy/org/reficio/p2/resolver/maven/impl/AetherResolver.groovy
+++ b/src/main/groovy/org/reficio/p2/resolver/maven/impl/AetherResolver.groovy
@@ -18,7 +18,6 @@
*/
package org.reficio.p2.resolver.maven.impl
-import org.apache.commons.lang.StringUtils
import org.reficio.p2.logger.Logger
import org.reficio.p2.resolver.maven.impl.facade.AetherFacade
import org.reficio.p2.resolver.maven.Artifact
@@ -128,7 +127,7 @@ class AetherResolver implements ArtifactResolver {
private static List transformExcludes(String artifact, List excludes) {
List transformedExcludes = []
for (String exclude : excludes) {
- if (StringUtils.isBlank(exclude)) {
+ if (exclude == null || exclude.trim().isEmpty()) {
// aether bug fix
Logger.getLog().warn("Empty exclude counts as exclude-all wildcard '*' [${artifact}]")
transformedExcludes += "*"
diff --git a/src/main/java/org/reficio/p2/FeatureBuilder.java b/src/main/java/org/reficio/p2/FeatureBuilder.java
index 1f2783ec..265edc52 100644
--- a/src/main/java/org/reficio/p2/FeatureBuilder.java
+++ b/src/main/java/org/reficio/p2/FeatureBuilder.java
@@ -26,7 +26,6 @@
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
-import org.apache.commons.lang.StringUtils;
import org.reficio.p2.bundler.ArtifactBundlerInstructions;
import org.reficio.p2.logger.Logger;
import org.reficio.p2.utils.JarUtils;
@@ -178,7 +177,7 @@ private void generateFeatureContent(Document xmlDoc, Element featureElement) {
if (generateSourceFeature) {
// 2015-05-12/RPr: A Source feature contains only sources.
id = abi.getSourceSymbolicName();
- if (StringUtils.isBlank(id)) {
+ if (id == null || id.trim().isEmpty()) {
log().info("\t [WARN] No source found for " + abi.getSymbolicName());
continue;
}
diff --git a/src/main/java/org/reficio/p2/P2Helper.java b/src/main/java/org/reficio/p2/P2Helper.java
index e5799717..219674c3 100644
--- a/src/main/java/org/reficio/p2/P2Helper.java
+++ b/src/main/java/org/reficio/p2/P2Helper.java
@@ -21,14 +21,12 @@
import aQute.bnd.osgi.Analyzer;
import aQute.bnd.osgi.Jar;
import org.apache.commons.io.FileUtils;
-import org.apache.commons.lang.StringUtils;
import org.reficio.p2.bundler.ArtifactBundlerInstructions;
import org.reficio.p2.bundler.ArtifactBundlerRequest;
import org.reficio.p2.bundler.impl.AquteHelper;
import org.reficio.p2.resolver.maven.Artifact;
import org.reficio.p2.resolver.maven.ResolvedArtifact;
import org.reficio.p2.utils.BundleUtils;
-import org.reficio.p2.utils.JarUtils;
import org.reficio.p2.utils.Utils;
import java.io.File;
@@ -151,7 +149,7 @@ private static String calculateFullSymbolicName(P2Artifact p2Artifact, ResolvedA
}
// bug28 - handle classifiers
String classifier = resolvedArtifact.getArtifact().getClassifier();
- if (StringUtils.isNotBlank(classifier)) {
+ if (classifier != null && !classifier.trim().equals("")) {
symbolicName += "." + classifier;
}
return symbolicName;
diff --git a/src/main/java/org/reficio/p2/P2Mojo.java b/src/main/java/org/reficio/p2/P2Mojo.java
index 3392a2d7..7d623f8f 100644
--- a/src/main/java/org/reficio/p2/P2Mojo.java
+++ b/src/main/java/org/reficio/p2/P2Mojo.java
@@ -24,7 +24,6 @@
import com.google.common.collect.Sets;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang.StringUtils;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.AbstractMojoExecutionException;
@@ -542,7 +541,7 @@ private void executeCategoryPublisher() throws AbstractMojoExecutionException, I
}
private void prepareCategoryLocationFile() throws IOException {
- if (StringUtils.isBlank(categoryFileURL)) {
+ if (categoryFileURL == null || categoryFileURL.trim().isEmpty()) {
InputStream is = getClass().getResourceAsStream(DEFAULT_CATEGORY_CLASSPATH_LOCATION + DEFAULT_CATEGORY_FILE);
File destinationFolder = new File(destinationDirectory);
destinationFolder.mkdirs();
diff --git a/src/main/java/org/reficio/p2/resolver/maven/Artifact.java b/src/main/java/org/reficio/p2/resolver/maven/Artifact.java
index 76262e09..e68d0925 100644
--- a/src/main/java/org/reficio/p2/resolver/maven/Artifact.java
+++ b/src/main/java/org/reficio/p2/resolver/maven/Artifact.java
@@ -19,8 +19,7 @@
package org.reficio.p2.resolver.maven;
import java.io.File;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
+import java.util.Objects;
import static java.util.Arrays.asList;
@@ -116,11 +115,14 @@ public String toString() {
@Override
public boolean equals(Object other) {
- return EqualsBuilder.reflectionEquals(this, other, asList("file"));
+ if (this == other) return true;
+ if (other == null || getClass() != other.getClass()) return false;
+ Artifact artifact = (Artifact) other;
+ return snapshot == artifact.snapshot && Objects.equals(groupId, artifact.groupId) && Objects.equals(artifactId, artifact.artifactId) && Objects.equals(baseVersion, artifact.baseVersion) && Objects.equals(extension, artifact.extension) && Objects.equals(classifier, artifact.classifier) && Objects.equals(version, artifact.version) && Objects.equals(file, artifact.file);
}
@Override
public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this, asList("file"));
+ return Objects.hash(groupId, artifactId, baseVersion, extension, classifier, snapshot, version, file);
}
}
diff --git a/src/test/integration/integration.xml b/src/test/integration/integration.xml
index 1c9e2ae2..7c0fadff 100644
--- a/src/test/integration/integration.xml
+++ b/src/test/integration/integration.xml
@@ -54,9 +54,6 @@
org.reficio
p2-maven-plugin
@project.version@
-
- 1.5
-
@@ -67,9 +64,9 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 2.5
+ 3.2.0
-
+