Giter VIP home page Giter VIP logo

maven-buildtime-extension's Issues

Use version for tag and commit message

Current:

Uses the default from the release plugin.

[maven-release-plugin] copy for tag maven-buildtime-extension-2.0 

Preferred:

Tag: 2.0
Message: [maven-release-plugin] Release 2.0

[FR] per-plugin cumulative statistic

Would it be possible to add yet another summary - cumulative, per plugin statistic? Currently, your extension output more detailed times for each module. It would be great to have "totals" section, where times for each plugin for each module would be summed / accumulated (to have overview which plugin impacts the build the most in total)

Make ExecutionTimingExecutionListener compatible with existing ExecutionListener

Jenkins injects its own ExecutionListener to extract information about the build. Since MavenExecutionRequest supports only one ExecutionListener it is currently overwritten by ExecutionTimingExecutionListener.

We could either use a delegating pattern similar to
https://github.com/apache/maven/blob/master/maven-core/src/main/java/org/apache/maven/eventspy/internal/EventSpyExecutionListener.java or directly use the EventSpy mechanism https://github.com/apache/maven/blob/master/maven-core/src/main/java/org/apache/maven/eventspy/AbstractEventSpy.java

From what I've seen extending AbstractEventSpy is the right way to go.

plugin timestamp are not showing

I don't see the plugin timings like in the README.md example.
I'm doing a reactor build, and I see the time it took each project. No plugin-level timings.

maven.config

-Dbuildtime.output.log=true

extensions.xml

<extensions>
  <extension>
    <groupId>co.leantechniques</groupId>
    <artifactId>maven-buildtime-extension</artifactId>
    <version>3.0.3</version>
  </extension>
</extensions>

Output to File (csv)

It would be great if you could add an option to redirect the output to a file.
Maybe even in a simple csv format "Module";"Mojo";"Time" or something like that,
so that it can be analyzed easier.

Build time sorted by spended time

Could you add some ability to sort desceding goals by spended time?
I have a very big project and want to see most problematic items but now i need to expost data to CSV and then sort them in Excel.
For me looks that this feature will be useful.

CSV Fails to write if pom.xml does not make target

Steps to reproduce

  1. add .mvn/extensions.xml
  2. run build with -Dbuildtime.output.csv=true -Dbuildtime.output.csv.file=output.csv
  3. pom.xml does not run anything that creates target/ directory (for instance it's a parent pom)

Workaround 1:

Instead of -Dbuildtime.output.csv.file=output.csv provide the absolute path like -Dbuildtime.output.csv.file=/Users/joseph/my_project/output.csv

Workaround 2:

Create target directory, but ensure that your mvn command does not run clean phase.

Stacktrace

[ERROR] Could not write report
java.io.FileNotFoundException: target/output.csv (No such file or directory)
    at java.io.FileOutputStream.open0 (Native Method)
    at java.io.FileOutputStream.open (FileOutputStream.java:270)
    at java.io.FileOutputStream.<init> (FileOutputStream.java:213)
    at java.io.FileOutputStream.<init> (FileOutputStream.java:162)
    at java.io.PrintWriter.<init> (PrintWriter.java:263)
    at co.leantechniques.maven.buildtime.output.CsvReporter.performReport (CsvReporter.java:39)
    at org.apache.maven.cli.BuildTimeEventSpy.doReport (BuildTimeEventSpy.java:81)
    at org.apache.maven.cli.BuildTimeEventSpy.onEvent (BuildTimeEventSpy.java:65)
    at org.apache.maven.cli.BuildTimeEventSpy.onEvent (BuildTimeEventSpy.java:46)
    at org.apache.maven.eventspy.internal.EventSpyDispatcher.onEvent (EventSpyDispatcher.java:104)
    at org.apache.maven.eventspy.internal.EventSpyExecutionListener.sessionEnded (EventSpyExecutionListener.java:61)
    at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire (DefaultExecutionEventCatapult.java:64)
    at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire (DefaultExecutionEventCatapult.java:42)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:137)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

Add option to log only if build succeeds

#8 mentions the "spam" problem with all the timing output at the end of a build.

It would be useful to have an option to log the build times only when the build succeeds, so that important failure-related messages aren't pushed off the screen by subsequent build timing information.

Can you make logging configurable?

We're using your maven-buildtime-extension plugin where I'm working right now - very useful!

One issue we have is that we've a large multi-module build with lots of plugins, so when it reports at the end it spams our screens. Lots of people just want to se 'BUILD SUCCESS' and only a few need to know about all the plugin timings.

Can you add a configuration parameter to allow us to turn off logging, and/or allow us to specify thresholds we might be interested in reporting? Perhaps its also possible to report how long each module takes so we'd only be interested in reporting plugins if the entire module takes more than a certain time...

Right now we're suppressing the entire plugin using a build profile so would be great to have a bit of configuration built in.

Thanks

Incorrect timing when exception occurred

When a java process is locking a file in the background and I run the build again, the build fails and the extension reports a large negative number (possibly minimum integer value).

[INFO] maven-clean-plugin:clean ................................. [-1389029550.705s]

using this extension removes colorized output from maven

A couple of releases ago, Maven started supporting colorized ansi output, which makes the logs very easy to read. When I use this plugin to profile the times associated with the build (love it!), I lose the colorized output (do not love it).

Maven 3.2.x Compatibility

Running on 3.2.1 produced the following issue. Thanks!

constituent[39]: file:/c:/maven/conf/logging/

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.maven.executi
on.MavenExecutionRequest.isThreadConfigurationPresent()Z
at org.apache.maven.cli.ExecutionEventLogger.logStats(ExecutionEventLogg
er.java:205)

Generate report even though JVM is shutting down

When the Maven build is part of a Jenkins job and a timeout occurs, no report is written.
Having the report could help to understand why the built lasted for so long.

It would be great if the extension could try to write the information already available, even though the JVM is forcibly shutting down.
This probably means relying on java.lang.Runtime.addShutdownHook(Thread), i.e. this is on a best effort basis.

In case the build is successful, then there is no need to write the same report twice.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.