Maven Surefire
  1. Maven Surefire
  2. SUREFIRE-1053

Suppress warning message if file.encoding is set using argLine

    Details

      Description

      As a followup to SUREFIRE-951...

      I am getting file.encoding cannot be set as system property, use <argLine>-Dfile.encoding=...<argLine> instead in spite of the fact that I set file.encoding as the warning recommends. If -Dfile.encoding is set as a system property, and it is also set using argLine then you should suppress this warning.

        Activity

        Hide
        Tibor Digana added a comment -

        Fixed in https://github.com/apache/maven-surefire/pull/63
        The misleading warning is suppressed if argLine is used, but another warning has to arise up saying that systemPropertyVariables declares same sys properties as in argLine.

        Show
        Tibor Digana added a comment - Fixed in https://github.com/apache/maven-surefire/pull/63 The misleading warning is suppressed if argLine is used, but another warning has to arise up saying that systemPropertyVariables declares same sys properties as in argLine.
        Hide
        Gili added a comment -

        @Tibor,

        Can you elaborate on that last part? "another warning has to arise up saying that systemPropertyVariables declares same sys properties as in argLine."

        What does that means?

        Show
        Gili added a comment - @Tibor, Can you elaborate on that last part? "another warning has to arise up saying that systemPropertyVariables declares same sys properties as in argLine." What does that means?
        Hide
        Andreas Gudian added a comment - - edited

        Can you elaborate on that last part? "another warning has to arise up saying that systemPropertyVariables declares same sys properties as in argLine."

        That means if you specify the same variables in systemPropertyVariables and in the argLine, you'll get a new warning message. I think that's pretty nice...

        Show
        Andreas Gudian added a comment - - edited Can you elaborate on that last part? "another warning has to arise up saying that systemPropertyVariables declares same sys properties as in argLine." That means if you specify the same variables in systemPropertyVariables and in the argLine, you'll get a new warning message. I think that's pretty nice...
        Hide
        Tibor Digana added a comment -

        @Gili
        Exactly as Andreas said.
        The changes was already committed. The release will be made public in few days.
        Thanks for reporting!

        Show
        Tibor Digana added a comment - @Gili Exactly as Andreas said. The changes was already committed. The release will be made public in few days. Thanks for reporting!
        Show
        Tibor Digana added a comment - Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/7b8b2ede
        Hide
        Gili added a comment -

        Andreas, Tibor,

        This might be the exact opposite of what I had requested.

        When Netbeans runs unit tests for a Maven project it specifies "-Dfile.encoding=...". I can't suppress that (it's hard-coded into the IDE). I followed Surefire's instructions and added "<argLine>-Dfile.encoding=...</argLine>".

        Now you're telling me I'm still going to get a warning. The point of this issue was to suppress an existing warning, not to change the message

        What now?

        Show
        Gili added a comment - Andreas, Tibor, This might be the exact opposite of what I had requested. When Netbeans runs unit tests for a Maven project it specifies "-Dfile.encoding=...". I can't suppress that (it's hard-coded into the IDE). I followed Surefire's instructions and added "<argLine>-Dfile.encoding=...</argLine>". Now you're telling me I'm still going to get a warning. The point of this issue was to suppress an existing warning, not to change the message What now?
        Hide
        Andreas Gudian added a comment -

        Tibor would have to say for sure, but as I understand it, passing -D... to mvn is not something that would cause the warning message. Only deliberate specification of system property variables in the surefire config section in the pom.

        Show
        Andreas Gudian added a comment - Tibor would have to say for sure, but as I understand it, passing -D... to mvn is not something that would cause the warning message. Only deliberate specification of system property variables in the surefire config section in the pom.
        Hide
        Andreas Gudian added a comment -

        OK, looking at the code more closely, it seems like if you pass file.encoding to mvn and use <argLine>-Dfile.encoding=..</argLine>, you will get that new warning.

        IMHO, printing a warning for those parameters that must be set via argLine should not be logged as warning. I'll make a quick adjustment...

        Tibor Digana, let me know if that's against what you had in mind so we can discuss it. For now I just wanted to let you alone to deal with SUREFIRE-1108

        Show
        Andreas Gudian added a comment - OK, looking at the code more closely, it seems like if you pass file.encoding to mvn and use <argLine>-Dfile.encoding=..</argLine>, you will get that new warning. IMHO, printing a warning for those parameters that must be set via argLine should not be logged as warning. I'll make a quick adjustment... Tibor Digana , let me know if that's against what you had in mind so we can discuss it. For now I just wanted to let you alone to deal with SUREFIRE-1108
        Hide
        Gili added a comment -

        Andreas,

        Can you please reopen this issue until it is closed to everyone's satisfaction? (As a side-note, I suggest leaving issues open until the reporter agrees with the resolution or does not respond for a month... otherwise some issues receive comments after they are resolved and those fall through the cracks)

        Show
        Gili added a comment - Andreas, Can you please reopen this issue until it is closed to everyone's satisfaction? (As a side-note, I suggest leaving issues open until the reporter agrees with the resolution or does not respond for a month... otherwise some issues receive comments after they are resolved and those fall through the cracks)
        Hide
        Andreas Gudian added a comment -

        I usually don't make any fuzz about the distinction of status "closed" or "open" - the resolution is what counts here, and everyone is welcome to just reopen the issue. As we have sometimes longer periods of doing nothing here, it's easier for us to keep track of what needs to be done and what not. Or at least that's the case for me . Btw, we receive email notifications on comments to closed issues as well, so there's nothing lost.

        My change is already committed to master, btw. We're a bit rushing here, because we want to get that release out finally. It's been way too long since the last one and there are many things that the users just wait for - so I'd like to get it off my plate...

        If you like, you can give the current snapshot a try (just wait for this build to finish: https://builds.apache.org/job/maven-surefire/1342/ ). Shout out if it doesn't do the trick for you.

        Show
        Andreas Gudian added a comment - I usually don't make any fuzz about the distinction of status "closed" or "open" - the resolution is what counts here, and everyone is welcome to just reopen the issue. As we have sometimes longer periods of doing nothing here, it's easier for us to keep track of what needs to be done and what not. Or at least that's the case for me . Btw, we receive email notifications on comments to closed issues as well, so there's nothing lost. My change is already committed to master, btw. We're a bit rushing here, because we want to get that release out finally. It's been way too long since the last one and there are many things that the users just wait for - so I'd like to get it off my plate... If you like, you can give the current snapshot a try (just wait for this build to finish: https://builds.apache.org/job/maven-surefire/1342/ ). Shout out if it doesn't do the trick for you.
        Hide
        Gili added a comment -

        Andreas,

        I tried (and failed) to manually deploy these artifacts. Can you please publish the SNAPSHOT to maven central's snapshot server? Once that's done I can run a test.

        Show
        Gili added a comment - Andreas, I tried (and failed) to manually deploy these artifacts. Can you please publish the SNAPSHOT to maven central's snapshot server? Once that's done I can run a test.
        Hide
        Andreas Gudian added a comment -

        That bild above pushes the snapshots to http://repository.apache.org/snapshots/

        Thanks for testing it out!

        Show
        Andreas Gudian added a comment - That bild above pushes the snapshots to http://repository.apache.org/snapshots/ Thanks for testing it out!
        Hide
        Gili added a comment -

        Confirmed. 2.18-SNAPSHOT fixes this issue for me. I no longer get a warning. Thank you very much gentlemen!

        Show
        Gili added a comment - Confirmed. 2.18-SNAPSHOT fixes this issue for me. I no longer get a warning. Thank you very much gentlemen!

          People

          • Assignee:
            Tibor Digana
            Reporter:
            Gili
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development