Hi
Did you found some time to look at my proposition?
I'm waiting for your opinion.
Maybe you need some more explanations.

śr., 1 kwi 2020 o 17:58 Slawomir Jaranowski <s.jaranow...@gmail.com>
napisał(a):

> A.
> new parameters *streamLogsOnFailures* with boolean value - default false
> - don't change current behavior, eg. from IT test
>
> <plugin>
>  <groupId>org.apache.maven.plugins</groupId>
>  <artifactId>maven-invoker-plugin</artifactId>
>  <version>@pom.version@</version>
>  <configuration>
>    <writeJunitReport>true</writeJunitReport>
>    <debug>false</debug>
>    <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
>    <pomIncludes>
>      <pomInclude>*/pom.xml</pomInclude>
>    </pomIncludes>
>    *<streamLogsOnFailures>true</streamLogsOnFailures>*
>  </configuration>
>  ....
> </plugin>
>
> B.
> *output - run goal*
>
> [INFO] --- maven-invoker-plugin:3.2.2-SNAPSHOT:run (integration-test) @
> fail-build-streamLogsOnFailures ---
> [INFO]
> [INFO] Building: project/pom.xml
> [INFO]   The build exited with code 1. See
> ...../maven-invoker-plugin/target/it/fail-build-streamLogsOnFailures/target/it/project/build.log
> for details.
> [INFO]           project/pom.xml .................................. FAILED
> (1.6 s)
> [INFO] -------------------------------------------------
> [INFO] Build Summary:
> [INFO]   Passed: 0, Failed: 1, Errors: 0, Skipped: 0
> [INFO] -------------------------------------------------
> [ERROR] The following builds failed:
> [ERROR] *  project/pom.xml
> [INFO] -------------------------------------------------
> [ERROR] -------------------------------------------------
> [ERROR]
>
> *** begin build.log for: project/pom.xml ***
> [INFO] Scanning for projects...
> [ERROR] [ERROR] Some problems were encountered while processing the POMs:
> [ERROR] Malformed POM
> ......./maven-invoker-plugin/target/it/fail-build-streamLogsOnFailures/target/it/project/pom.xml:
> Unrecognised tag: 'invalidElementShouldFailBuild' (position: START_TAG seen
> ...</properties>\n\n  <invalidElementShouldFailBuild/>... @34:35)  @
> ......./maven-invoker-plugin/target/it/fail-build-streamLogsOnFailures/target/it/project/pom.xml,
> line 34, column 35
> [FATAL] 'modelVersion' of '99.0.0' is newer than the versions supported by
> this version of Maven: [4.0.0]. Building this project requires a newer
> version of Maven. @ line 24, column 17
>  @
> [ERROR] The build could not read 1 project -> [Help 1]
> [ERROR]
> [ERROR]   The project test:fail-build:0.1-SNAPSHOT
> (......./maven-invoker-plugin/target/it/fail-build-streamLogsOnFailures/target/it/project/pom.xml)
> has 2 errors
> [ERROR]     Malformed POM
> ......./maven-invoker-plugin/target/it/fail-build-streamLogsOnFailures/target/it/project/pom.xml:
> Unrecognised tag: 'invalidElementShouldFailBuild' (position: START_TAG seen
> ...</properties>\n\n  <invalidElementShouldFailBuild/>... @34:35)  @
> ......./maven-invoker-plugin/target/it/fail-build-streamLogsOnFailures/target/it/project/pom.xml,
> line 34, column 35 -> [Help 2]
> [ERROR]     'modelVersion' of '99.0.0' is newer than the versions
> supported by this version of Maven: [4.0.0]. Building this project requires
> a newer version of Maven. @ line 24, column 17
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the
> -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
> please read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
> [ERROR] [Help 2]
> http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException
> *** end build.log for: project/pom.xml ***
>
> [ERROR] -------------------------------------------------
> [ERROR]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time:  3.863 s
> [INFO] Finished at: 2020-04-01T17:47:55+02:00
> [INFO]
> ------------------------------------------------------------------------
>
>
> *goals - integration-test, verify*
>
> [INFO]
> [INFO] --- maven-invoker-plugin:3.2.2-SNAPSHOT:integration-test
> (integration-test) @ fail-build-with-verify-streamLogsOnFailures ---
> [INFO] Building: project/pom.xml
> [INFO]   The build exited with code 1. See
> ......./maven-invoker-plugin/target/it/fail-build-with-verify-streamLogsOnFailures/target/it/project/build.log
> for details.
> [INFO]           project/pom.xml .................................. FAILED
> (1.3 s)
> [INFO]
> [INFO] --- maven-invoker-plugin:3.2.2-SNAPSHOT:verify (integration-test) @
> fail-build-with-verify-streamLogsOnFailures ---
> [INFO] -------------------------------------------------
> [INFO] Build Summary:
> [INFO]   Passed: 0, Failed: 1, Errors: 0, Skipped: 0
> [INFO] -------------------------------------------------
> [ERROR] The following builds failed:
> [ERROR] *  project/pom.xml
> [INFO] -------------------------------------------------
> [ERROR] -------------------------------------------------
> [ERROR]
>
> *** begin build.log for: project/pom.xml ***
> [INFO] Scanning for projects...
> [ERROR] [ERROR] Some problems were encountered while processing the POMs:
> [ERROR] Malformed POM
> ......./maven-invoker-plugin/target/it/fail-build-with-verify-streamLogsOnFailures/target/it/project/pom.xml:
> Unrecognised tag: 'invalidElementShouldFailBuild' (position: START_TAG seen
> ...</properties>\n\n  <invalidElementShouldFailBuild/>... @34:35)  @
> ......./maven-invoker-plugin/target/it/fail-build-with-verify-streamLogsOnFailures/target/it/project/pom.xml,
> line 34, column 35
> [FATAL] 'modelVersion' of '99.0.0' is newer than the versions supported by
> this version of Maven: [4.0.0]. Building this project requires a newer
> version of Maven. @ line 24, column 17
>  @
> [ERROR] The build could not read 1 project -> [Help 1]
> [ERROR]
> [ERROR]   The project test:fail-build:0.1-SNAPSHOT
> (......./maven-invoker-plugin/target/it/fail-build-with-verify-streamLogsOnFailures/target/it/project/pom.xml)
> has 2 errors
> [ERROR]     Malformed POM
> ......./maven-invoker-plugin/target/it/fail-build-with-verify-streamLogsOnFailures/target/it/project/pom.xml:
> Unrecognised tag: 'invalidElementShouldFailBuild' (position: START_TAG seen
> ...</properties>\n\n  <invalidElementShouldFailBuild/>... @34:35)  @
> ......./maven-invoker-plugin/target/it/fail-build-with-verify-streamLogsOnFailures/target/it/project/pom.xml,
> line 34, column 35 -> [Help 2]
> [ERROR]     'modelVersion' of '99.0.0' is newer than the versions
> supported by this version of Maven: [4.0.0]. Building this project requires
> a newer version of Maven. @ line 24, column 17
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the
> -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
> please read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
> [ERROR] [Help 2]
> http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException
> *** end build.log for: project/pom.xml ***
>
> [ERROR] -------------------------------------------------
> [ERROR]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time:  2.316 s
> [INFO] Finished at: 2020-04-01T17:48:03+02:00
> [INFO]
> ------------------------------------------------------------------------
>
> śr., 1 kwi 2020 o 17:13 Elliotte Rusty Harold <elh...@ibiblio.org>
> napisał(a):
>
>> Can you show us:
>>
>> A. What the configuration for this looks like?
>> B. What the output looks like when this is turned on?
>>
>> Thanks.
>>
>> On Wed, Apr 1, 2020 at 10:56 AM Slawomir Jaranowski
>> <s.jaranow...@gmail.com> wrote:
>> >
>> > Hi,
>> >
>> > According to the issue
>> https://issues.apache.org/jira/browse/MINVOKER-250 I
>> > will take your opinion about new feature.
>> >
>> > My proposition is to add possibility to show build.log of failed job at
>> the
>> > end of all tests.
>> >
>> > I chose this way because printing log during execute tests can cause
>> mixed
>> > output of different tests in parallel mode.
>> >
>> > In order to meet this requirements
>> >  - I extend build-job.xml report about file name for logs
>> >  - stream build.log to mojo log in verify goal or in processResults
>> method
>> > in run goal.
>> >
>> > This feature will be very useful especially in problem in test.
>> > If everything is ok we don't need print build.log (it can have many
>> lines)
>> > but after test failed is difficult to examine what happened.
>> >
>> > PR is ready and waiting for your opinion.
>> >
>> > --
>> > Sławomir Jaranowski
>>
>>
>>
>> --
>> Elliotte Rusty Harold
>> elh...@ibiblio.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
>> For additional commands, e-mail: dev-h...@maven.apache.org
>>
>>
>
> --
> Sławomir Jaranowski
>


-- 
Sławomir Jaranowski

Reply via email to