public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Miroslav Šulc" <fordfrog@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/java-ebuilder:master commit in: src/main/java/org/gentoo/java/ebuilder/maven/
Date: Wed, 27 Nov 2019 09:50:17 +0000 (UTC)	[thread overview]
Message-ID: <1574848165.ca925dfbe04523d44329cd4f9233f763bf8974da.fordfrog@gentoo> (raw)

commit:     ca925dfbe04523d44329cd4f9233f763bf8974da
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 27 09:46:30 2019 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Wed Nov 27 09:49:25 2019 +0000
URL:        https://gitweb.gentoo.org/proj/java-ebuilder.git/commit/?id=ca925dfb

reformatted

Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 .../gentoo/java/ebuilder/maven/MavenEbuilder.java  | 49 ++++++++++++----------
 1 file changed, 26 insertions(+), 23 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 c9ec5b9..4becd69 100644
--- a/src/main/java/org/gentoo/java/ebuilder/maven/MavenEbuilder.java
+++ b/src/main/java/org/gentoo/java/ebuilder/maven/MavenEbuilder.java
@@ -88,18 +88,21 @@ public class MavenEbuilder {
                         sbCP.append(',');
                     }
 
-		    String[] parts = dependency.getSystemDependency().
-			replaceAll(".*/", "").
-			replaceAll("\\[.*\\]", "").
-			split(":");
-		    String PN = parts[0].replaceAll("-r\\d+$", "");
-		    if (parts.length == 2) {
-			PN = PN.substring(0, PN.lastIndexOf('-'));
-			if (!parts[1].equals("0")) {
-			    PN += "-" + parts[1];
-			}
-		    }
-                    sbCP.append(PN);
+                    final String[] parts = dependency.getSystemDependency().
+                            replaceAll(".*/", "").
+                            replaceAll("\\[.*\\]", "").
+                            split(":");
+                    String pn = parts[0].replaceAll("-r\\d+$", "");
+
+                    if (parts.length == 2) {
+                        pn = pn.substring(0, pn.lastIndexOf('-'));
+
+                        if (!parts[1].equals("0")) {
+                            pn += "-" + parts[1];
+                        }
+                    }
+
+                    sbCP.append(pn);
                 });
 
         return sbCP.toString();
@@ -155,7 +158,7 @@ public class MavenEbuilder {
     /**
      * Retrieves minimum source version from the maven projects.
      *
-     * @param mavenProjects list of maven projects
+     * @param mavenProjects   list of maven projects
      * @param forceMinVersion optional minimum version to force
      *
      * @return minimum source version
@@ -182,7 +185,7 @@ public class MavenEbuilder {
     /**
      * Retrieves minimum target version from the maven projects.
      *
-     * @param mavenProjects list of maven projects
+     * @param mavenProjects   list of maven projects
      * @param forceMinVersion optional minimum version to force
      *
      * @return minimum target version
@@ -371,7 +374,7 @@ public class MavenEbuilder {
 
             mavenProjects.stream().
                     filter((mavenProject)
-                    -> !mavenProject.getCommonDependencies().isEmpty()).
+                            -> !mavenProject.getCommonDependencies().isEmpty()).
                     forEach((mavenProject) -> {
                         writeDependenciesInfo(config, writer,
                                 mavenProject.getPomFile(),
@@ -395,8 +398,8 @@ public class MavenEbuilder {
             writer.println("# Compile dependencies");
 
             mavenProjects.stream().
-                    filter((mavenProject) ->
-                    !mavenProject.getCompileDependencies().isEmpty()
+                    filter((mavenProject)
+                            -> !mavenProject.getCompileDependencies().isEmpty()
                     || !mavenProject.getTestDependencies().isEmpty())
                     .forEach((mavenProject) -> {
                         if (!mavenProject.getCompileDependencies().isEmpty()) {
@@ -546,7 +549,7 @@ public class MavenEbuilder {
      * @param writer ebuild writer
      */
     private void writeInherit(final MavenProject mavenProject,
-                              final PrintWriter writer) {
+            final PrintWriter writer) {
         writer.println();
         writer.print("JAVA_PKG_IUSE=\"doc source");
 
@@ -764,11 +767,11 @@ public class MavenEbuilder {
 
                 mavenProject.getTestResourceDirectories().
                         forEach((directory) -> {
-                    writer.print("\t\"");
-                    writer.print(replaceWithVars(config.getWorkdir().
-                            relativize(directory).toString(), config));
-                    writer.println('"');
-                });
+                            writer.print("\t\"");
+                            writer.print(replaceWithVars(config.getWorkdir().
+                                    relativize(directory).toString(), config));
+                            writer.println('"');
+                        });
 
                 writer.println(')');
             }


             reply	other threads:[~2019-11-27  9:50 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-27  9:50 Miroslav Šulc [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-12-02 16:38 [gentoo-commits] proj/java-ebuilder:master commit in: src/main/java/org/gentoo/java/ebuilder/maven/ Miroslav Šulc
2021-07-01 13:13 Miroslav Šulc
2021-06-15  7:40 Miroslav Šulc
2021-06-03  8:38 Miroslav Šulc
2020-10-02  7:43 Miroslav Šulc
2020-08-30 18:22 Miroslav Šulc
2020-08-30 18:22 Miroslav Šulc
2020-08-27 17:24 Miroslav Šulc
2020-08-27 17:24 Miroslav Šulc
2020-08-18  8:11 Miroslav Šulc
2020-08-18  8:11 Miroslav Šulc
2020-08-05 14:31 Miroslav Šulc
2020-08-05 14:31 Miroslav Šulc
2020-08-05 14:31 Miroslav Šulc
2020-08-05 14:31 Miroslav Šulc
2020-08-05 14:31 Miroslav Šulc
2020-08-05 14:31 Miroslav Šulc
2020-07-24  6:41 Miroslav Šulc
2020-07-24  6:41 Miroslav Šulc
2020-07-06 10:56 Miroslav Šulc
2020-07-06 10:56 Miroslav Šulc
2020-07-06 10:56 Miroslav Šulc
2020-07-06 10:56 Miroslav Šulc
2020-07-06 10:56 Miroslav Šulc
2019-11-27  9:50 Miroslav Šulc
2019-11-03 15:14 Miroslav Šulc
2019-11-03 12:17 Miroslav Šulc
2019-11-03 12:17 Miroslav Šulc
2019-11-03 11:26 Miroslav Šulc
2019-11-03 10:37 Miroslav Šulc
2019-11-03 10:14 Miroslav Šulc
2019-11-03 10:12 Miroslav Šulc
2019-11-03 10:12 Miroslav Šulc
2019-11-02 22:27 Miroslav Šulc
2019-11-02 21:54 Miroslav Šulc
2019-11-02 21:42 Miroslav Šulc
2019-11-02 21:42 Miroslav Šulc
2019-11-01 18:43 Miroslav Šulc
2019-11-01 18:43 Miroslav Šulc
2019-11-01 18:43 Miroslav Šulc
2019-11-01 18:43 Miroslav Šulc
2019-11-01 18:43 Miroslav Šulc
2019-10-30 17:43 Miroslav Šulc
2019-10-30 17:35 Michał Górny
2019-10-30 17:35 Michał Górny
2019-10-30 17:35 Michał Górny
2019-10-30 17:35 Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1574848165.ca925dfbe04523d44329cd4f9233f763bf8974da.fordfrog@gentoo \
    --to=fordfrog@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox