1 |
commit: ab5d26a990de18f3ec1f2166f39da7971c910e2b |
2 |
Author: zongyu <zzy2529420793 <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Aug 7 02:48:43 2020 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 7 03:14:36 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/java-ebuilder.git/commit/?id=ab5d26a9 |
7 |
|
8 |
minor bugfixes: |
9 |
|
10 |
1. ebuild for jsch-agent-proxy can be generated by hand, remove the related lines |
11 |
2. make java-pkg-binjar.eclass record dependencies of the pkg |
12 |
3. fix typo: juniper -> jupiter |
13 |
4. move the pre-process of maven's license name to MavenLicense |
14 |
|
15 |
Signed-off-by: zongyu <zzy2529420793 <AT> gmail.com> |
16 |
|
17 |
maven/eclass/java-pkg-binjar.eclass | 6 +++++- |
18 |
maven/eclass/java-pkg-maven.eclass | 2 +- |
19 |
.../java/org/gentoo/java/ebuilder/maven/MavenEbuilder.java | 10 +++++----- |
20 |
.../java/org/gentoo/java/ebuilder/maven/MavenLicenses.java | 6 ++++-- |
21 |
src/main/java/org/gentoo/java/ebuilder/maven/MavenParser.java | 10 +--------- |
22 |
5 files changed, 16 insertions(+), 18 deletions(-) |
23 |
|
24 |
diff --git a/maven/eclass/java-pkg-binjar.eclass b/maven/eclass/java-pkg-binjar.eclass |
25 |
index 79947e7..5406455 100644 |
26 |
--- a/maven/eclass/java-pkg-binjar.eclass |
27 |
+++ b/maven/eclass/java-pkg-binjar.eclass |
28 |
@@ -27,4 +27,8 @@ java-pkg-binjar_src_unpack() { |
29 |
# @FUNCTION: java-pkg-simple_src_compile |
30 |
# @DESCRIPTION: |
31 |
# Do nothing as we are doing binary install. |
32 |
-java-pkg-binjar_src_compile() { :; } |
33 |
+java-pkg-binjar_src_compile() { |
34 |
+ for dependency in ${JAVA_GENTOO_CLASSPATH//,/ }; do |
35 |
+ java-pkg_record-jar_ ${dependency} |
36 |
+ done |
37 |
+} |
38 |
|
39 |
diff --git a/maven/eclass/java-pkg-maven.eclass b/maven/eclass/java-pkg-maven.eclass |
40 |
index fb41bb2..68f6712 100644 |
41 |
--- a/maven/eclass/java-pkg-maven.eclass |
42 |
+++ b/maven/eclass/java-pkg-maven.eclass |
43 |
@@ -28,7 +28,7 @@ EXPORT_FUNCTIONS src_unpack |
44 |
# @DESCRIPTION: |
45 |
# A directory relative to ${S} which contains the resources of the |
46 |
# application. Give it a default value to handle src_unpack. |
47 |
-: ${JAVA_RESOURCE_DIRS:=src/main/resources} |
48 |
+: ${JAVA_RESOURCE_DIRS:=resources} |
49 |
|
50 |
# @ECLASS-VARIABLE: JAVA_RESOURCE_DIRS |
51 |
# @DEFAULT_UNSET |
52 |
|
53 |
diff --git a/src/main/java/org/gentoo/java/ebuilder/maven/MavenEbuilder.java b/src/main/java/org/gentoo/java/ebuilder/maven/MavenEbuilder.java |
54 |
index e73a1fd..bfedb68 100644 |
55 |
--- a/src/main/java/org/gentoo/java/ebuilder/maven/MavenEbuilder.java |
56 |
+++ b/src/main/java/org/gentoo/java/ebuilder/maven/MavenEbuilder.java |
57 |
@@ -223,15 +223,15 @@ public class MavenEbuilder { |
58 |
return "testng"; |
59 |
} else if ("org.junit.jupiter".equals(dependency.getGroupId()) |
60 |
&& "junit-jupiter-engine".equals(dependency.getArtifactId())) { |
61 |
- // java-pkg-simple do not support now |
62 |
- return "junit-juniper"; |
63 |
+ // java-pkg-simple does not support this framework |
64 |
+ return "junit-jupiter"; |
65 |
} else if ("org.junit.vintage".equals(dependency.getGroupId()) |
66 |
&& "junit-vintage-engine".equals(dependency.getArtifactId())) { |
67 |
- // java-pkg-simple do not support now |
68 |
+ // java-pkg-simple does not support this framework |
69 |
return "junit-vintage"; |
70 |
} else if ("io.cucumber".equals(dependency.getGroupId()) |
71 |
&& "cucumber-junit".equals(dependency.getArtifactId())) { |
72 |
- // java-pkg-simple do not support now |
73 |
+ // java-pkg-simple does not support this framework |
74 |
return "cucumber"; |
75 |
} else { |
76 |
return null; |
77 |
@@ -582,7 +582,7 @@ public class MavenEbuilder { |
78 |
writer.println(dependency); |
79 |
}); |
80 |
|
81 |
- // TODO: check whether amd64 is inside KEYWORDS |
82 |
+ // TODO: is it necessary to check whether amd64 is inside KEYWORDS? |
83 |
if (config.hasBinjarUri()) { |
84 |
writer.println(dependencyForPkgdiff); |
85 |
} |
86 |
|
87 |
diff --git a/src/main/java/org/gentoo/java/ebuilder/maven/MavenLicenses.java b/src/main/java/org/gentoo/java/ebuilder/maven/MavenLicenses.java |
88 |
index f2f4f9a..5309353 100644 |
89 |
--- a/src/main/java/org/gentoo/java/ebuilder/maven/MavenLicenses.java |
90 |
+++ b/src/main/java/org/gentoo/java/ebuilder/maven/MavenLicenses.java |
91 |
@@ -34,7 +34,7 @@ public class MavenLicenses { |
92 |
try { |
93 |
mapProperty.load( |
94 |
this.getClass().getResourceAsStream( |
95 |
- licenseMapFile)); |
96 |
+ licenseMapFile)); |
97 |
} catch (final IOException ex) { |
98 |
throw new RuntimeException( |
99 |
"Failed to read license map from resource", ex); |
100 |
@@ -52,7 +52,9 @@ public class MavenLicenses { |
101 |
*/ |
102 |
public String getEquivalentLicense(String licenseName) { |
103 |
final String portageLicense = |
104 |
- licenseMap.get(licenseName.toLowerCase()); |
105 |
+ licenseMap.get(licenseName.trim(). |
106 |
+ replaceAll("[\n ]+", " "). |
107 |
+ toLowerCase()); |
108 |
|
109 |
if (portageLicense == null) { |
110 |
return "!!!equivalentPortageLicenseName-not-found!!!"; |
111 |
|
112 |
diff --git a/src/main/java/org/gentoo/java/ebuilder/maven/MavenParser.java b/src/main/java/org/gentoo/java/ebuilder/maven/MavenParser.java |
113 |
index 73acd6e..4630350 100644 |
114 |
--- a/src/main/java/org/gentoo/java/ebuilder/maven/MavenParser.java |
115 |
+++ b/src/main/java/org/gentoo/java/ebuilder/maven/MavenParser.java |
116 |
@@ -544,12 +544,6 @@ public class MavenParser { |
117 |
switch (reader.getLocalName()) { |
118 |
case "artifactId": |
119 |
artifactId = reader.getElementText(); |
120 |
- |
121 |
- /* jsch.agentproxy is an empty artifact. */ |
122 |
- // TODO: this should go to a config file to ignore some artifacts |
123 |
- if (artifactId.equals("jsch.agentproxy")) { |
124 |
- return; |
125 |
- } |
126 |
break; |
127 |
case "groupId": |
128 |
groupId = reader.getElementText(); |
129 |
@@ -632,9 +626,7 @@ public class MavenParser { |
130 |
case "name": |
131 |
mavenProject.addLicense( |
132 |
mavenLicenses.getEquivalentLicense( |
133 |
- reader.getElementText(). |
134 |
- trim(). |
135 |
- replaceAll("[\n ]+", " "))); |
136 |
+ reader.getElementText())); |
137 |
break; |
138 |
default: |
139 |
consumeElement(reader); |