Skip to content

- logging configuration now no longer overwrites the default log level - #22

Closed
a-horst wants to merge 1 commit into
apache:masterfrom
a-horst:master
Closed

a-horst wants to merge 1 commit into
apache:masterfrom
a-horst:master

Conversation

@a-horst

@a-horst a-horst commented Jun 16, 2014

Copy link
Copy Markdown
Contributor
  • logging configuration now no longer overwrites the default log level as specified in conf/logging/simplelogger.properties (see MNG-2570 (related)); the default log level was always set to "info" unless either option "debug" or "quiet" were used; this made it effectively impossible to change the default log level to something other than "debug", "error" or "info"

as specified in conf/logging/simplelogger.properties (see MNG-2570)
@jvanzyl

jvanzyl commented Jun 16, 2014

Copy link
Copy Markdown
Contributor

You may want to try running the script described in here just to make sure the Maven ITs are not affected by the change. We have several ITs that specifically look at log output. Thanks for the pull request! If I can integrate it into the 3.2.2 release I will, but I'm about to cut it.

@jvanzyl

jvanzyl commented Jun 17, 2014

Copy link
Copy Markdown
Contributor

I will push this in right after I cut the 3.2.2.

@a-horst

a-horst commented Jun 17, 2014

Copy link
Copy Markdown
Contributor Author

Just to get it right: for the ITs I have to clone https://git-wip-us.apache.org/repos/asf/maven-integration-testing.git and then use my local SNAPSHOT build (maven-3.2.2-SNAPSHOT) with the patch/fix to build (mvn install -Prun-its) the maven-integration-test project?

@a-horst

a-horst commented Jun 17, 2014

Copy link
Copy Markdown
Contributor Author

Ok, so I executed the ITs and faced two problems:

  1. We use our own dedicated Nexus OSS and hence have custom user settings (with mirror etc.). A lot of ITs fail because of that; they all pass without custom user settings. I might have missed it but it should be documented somewhere.
  2. Only IT MNG-4625 is failing but I doubt this is related to the change above.

I'll give it another try to make sure it's not caused by encoding issues and I will also run the ITs with maven-3.2.1.

@a-horst

a-horst commented Jun 17, 2014

Copy link
Copy Markdown
Contributor Author

So, executing ITs with maven-3.2.1 also fails MNG-4625. mng-5591-workspace-reader-module-a also fails but I assume that's a different issue. This is the stack (sorry for the German message):

testit(org.apache.maven.it.MavenITmng4625SettingsXmlInterpolationWithXmlMarkupTest)  Time elapsed: 0.01 sec  <<< ERROR!
org.apache.maven.it.VerificationException: Exit code was non-zero: 1; command line and log =
C:\Program Files\Apache\apache-maven-3.2.1\bin\mvn --global-settings C:\Users\ahorst\git\maven-integration-testing\core-it-suite\target\test-classes\settings.xml --settings settings.xml -e --batch-mode -Dtest.prop=&x=y<> -Dmaven.repo.local=C:\Users\ahorst\.m2\repository validate
">" kann syntaktisch an dieser Stelle nicht verarbeitet werden.

        at org.apache.maven.it.Verifier.executeGoals(Verifier.java:1359)
        at org.apache.maven.it.Verifier.executeGoal(Verifier.java:1235)
        at org.apache.maven.it.Verifier.executeGoal(Verifier.java:1229)
        at org.apache.maven.it.MavenITmng4625SettingsXmlInterpolationWithXmlMarkupTest.testit(MavenITmng4625SettingsXmlInterpolationWithXmlMarkupTest.java:57)

@jvanzyl

jvanzyl commented Jun 17, 2014

Copy link
Copy Markdown
Contributor

They should all be passing. Happy to help you once I cut the 3.2.2 release. Also, if you happen to use Eclipse I can show you how to do this all from within Eclipse which is much simpler. I'm thinking of demoing these tools tomorrow at our hangout: https://plus.google.com/u/0/b/113247990055413254822/events/cvbjktccvtp8cj9pru9u7r511fs

But no pressure to show up to the hangout, I can show you how to use the tools in a 1:1 hangout. At any rate I will help you with the ITs later this week.

@a-horst

a-horst commented Jun 17, 2014

Copy link
Copy Markdown
Contributor Author

I already got it running in Eclipse (pretty straight forward with m2e etc.). Actually the failed test MNG-4625 never seemed to have passed: see the respective job history of core-it-maven-3-win.

I could narrow down the problem to the use of the special characters in the command which are the actual subject of the test (the property test.prop=&x=y<>). However they seem to break the eventual execution of the Maven build for the IT. While the CmdShell (the concrete Shell for Windows; see maven-shared-utils) correctly quotes the shell invocation it seems like for the Maven execution (on Windows) the special characters need to be quoted as well.

I adjusted the IT to use a quoted assignment and the IT succeeds:

verifier.setSystemProperty( "test.prop", "\"&x=y<>\"" );

instead of

verifier.setSystemProperty( "test.prop", "&x=y<>" );

Taking into account that MNG-4625 apparently never succeeded on Windows, I guess we can say that ITs succeeded with the proposed changes (I just simply didn't run ITs on Unix).

@rfscholte

Copy link
Copy Markdown
Contributor

Works fine on my system:

Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T18:37:52+01:00)
Maven home: D:\apache-maven-3.2.1\bin\..
Java version: 1.7.0_45, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_45\jre
Default locale: nl_NL, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"

What's yours?

@a-horst

a-horst commented Jun 18, 2014

Copy link
Copy Markdown
Contributor Author

This is mine:

Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T18:37:52+01:00)
Maven home: C:\Program Files\Apache\apache-maven-3.2.1
Java version: 1.7.0_55, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_55\jre
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 8", version: "6.2", arch: "amd64", family: "windows"

As mentioned above, I have the same behavior as the Maven CI Job.

@rfscholte

Copy link
Copy Markdown
Contributor

I read about the failing test. I'm looking for the differences. I've tried it with 1.7.0_55 as well, still that test succeeds. So it failure is either caused by the OS, the default locale or the way Maven is started. For instance, I use the cmd.exe

@a-horst

a-horst commented Jul 6, 2014

Copy link
Copy Markdown
Contributor Author

Any news on this? FYI: I used cmd.exe and cygwin.

I see that you fixed the IT on Jenkins. I'll pull the respective changes and run ITs again. I'll come back with the results.

@a-horst

a-horst commented Jul 6, 2014

Copy link
Copy Markdown
Contributor Author

Alright, so with Robert's fix of the IT eventually all ITs succeed with the changes of this pull request:

[INFO] Maven ITs .......................................... SUCCESS [21:37 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22:04 min
[INFO] Finished at: 2014-07-06T17:30:14+02:00
[INFO] Final Memory: 69M/421M
[INFO] ------------------------------------------------------------------------

@jvanzyl

jvanzyl commented Jul 19, 2014

Copy link
Copy Markdown
Contributor

This went in on d8fd65a. Can you close the pull request please? I keep forgetting to do it with the commit message.

@a-horst a-horst closed this Jul 21, 2014
asfgit pushed a commit that referenced this pull request Aug 3, 2017
 o Upgraded to new release of plexus-utils which contains
   the fix for #22 in plexus-utils.
asfgit pushed a commit that referenced this pull request Aug 27, 2017
 o Upgraded to new release of plexus-utils which contains
   the fix for #22 in plexus-utils.
asfgit pushed a commit that referenced this pull request Aug 29, 2017
 o Upgraded to new release of plexus-utils which contains
   the fix for #22 in plexus-utils.
asfgit pushed a commit that referenced this pull request Aug 31, 2017
 o Upgraded to new release of plexus-utils which contains
   the fix for #22 in plexus-utils.
asfgit pushed a commit that referenced this pull request May 2, 2020
asfgit pushed a commit that referenced this pull request May 23, 2020
asfgit pushed a commit that referenced this pull request Jun 21, 2020
@jira-importer

Copy link
Copy Markdown

Resolve #7640

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants