aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzongyu <zzy2529420793@gmail.com>2020-07-29 14:13:04 +0800
committerzongyu <zzy2529420793@gmail.com>2020-07-29 14:19:25 +0800
commit970308e5d845b5da6818131c75f84c38691691c6 (patch)
tree9287ed6d0ce5acd01861f91429e1c3343cf82603 /src
parentreplace "\t" with spaces, enable test if --binjar-uri is set (diff)
downloadjava-ebuilder-970308e5d845b5da6818131c75f84c38691691c6.tar.gz
java-ebuilder-970308e5d845b5da6818131c75f84c38691691c6.tar.bz2
java-ebuilder-970308e5d845b5da6818131c75f84c38691691c6.zip
write src_unpack everytime is not elegant, use java-pkg-maven to handle it
Signed-off-by: zongyu <zzy2529420793@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/gentoo/java/ebuilder/maven/MavenEbuilder.java41
1 files changed, 7 insertions, 34 deletions
diff --git a/src/main/java/org/gentoo/java/ebuilder/maven/MavenEbuilder.java b/src/main/java/org/gentoo/java/ebuilder/maven/MavenEbuilder.java
index 3f74241..37d45a4 100644
--- a/src/main/java/org/gentoo/java/ebuilder/maven/MavenEbuilder.java
+++ b/src/main/java/org/gentoo/java/ebuilder/maven/MavenEbuilder.java
@@ -624,7 +624,13 @@ public class MavenEbuilder {
writer.println('"');
writer.println();
- writer.println("inherit java-pkg-2 java-pkg-simple");
+ writer.print("inherit java-pkg-2 java-pkg-simple");
+
+ if (config.isFromMavenCentral()) {
+ writer.print(" java-pkg-maven");
+ }
+
+ writer.println("");
}
/**
@@ -849,11 +855,6 @@ public class MavenEbuilder {
writer.println(')');
}
}
-
- if (config.isFromMavenCentral()) {
- writeMavenUnpack(mavenProject, writer);
- }
-
}
/**
@@ -865,32 +866,4 @@ public class MavenEbuilder {
writer.println();
writer.println("S=\"${WORKDIR}\"");
}
-
- /**
- * modify src_unpack() if we use Maven distributed source codes.
- *
- * @param writer ebuild writer
- */
- private void writeMavenUnpack(final MavenProject mavenProject,
- final PrintWriter writer) {
- writer.println();
- writer.println("src_unpack() {");
- writer.println("\tmkdir -p \"${S}\"/${JAVA_SRC_DIR}");
- writer.println(
- "\tunzip \"${DISTDIR}\"/${P}-sources.jar" +
- " -d \"${S}\"/${JAVA_SRC_DIR} || die");
-
- /**
- * unzip ${P}-test-sources.jar, uncomment it after the switch
- * --test-source-uri is supported
- if (mavenProject.hasTests()) {
- writer.println("\tmkdir -p \"${S}\"/${JAVA_TEST_SRC_DIR}");
- writer.println(
- "\tunzip \"${DISTDIR}\"/${P}-test-sources.jar" +
- " -d \"${S}\"/${JAVA_TEST_SRC_DIR} || die");
- }
- */
-
- writer.println("}");
- }
}