danielflower / maven-gitlog-plugin Goto Github PK
View Code? Open in Web Editor NEWGenerates a change log for maven projects using git
Generates a change log for maven projects using git
The latest version uploaded is 1.4.11
I changed your plugin to respond to our need for:
The resources are deposited under : https://github.com/edahenit/maven-gitlog-plugin.git branche : master.
I propose to integrate in the next version.
I would love to have the option of grouping commits by tag.
These just create noise. After merging two branches, the actual commits from both branches are shown in the commit log.
Hi, and thank's for a good plugin!
It would be great if you provided a way to specify a date range from which the log is generated to limit the size of the log.
An example of this behaviour:
http://maven.apache.org/plugins/maven-changelog-plugin/changelog-mojo.html#range
We run the latest version of the plugin 1.13.15 but it keeps crashing on new GIT repositories for us. Here's a part of what I think is the most important part of the stack of the crash:
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at org.eclipse.jgit.revwalk.RevCommit.getParent (RevCommit.java:295)
at com.github.danielflower.mavenplugins.gitlog.filters.PathCommitFilter.isFoundInPath (PathCommitFilter.java:48)
at com.github.danielflower.mavenplugins.gitlog.filters.PathCommitFilter.renderCommit (PathCommitFilter.java:40)
at com.github.danielflower.mavenplugins.gitlog.Generator.show (Generator.java:108)
at com.github.danielflower.mavenplugins.gitlog.Generator.generate (Generator.java:82)
at com.github.danielflower.mavenplugins.gitlog.GenerateMojo.execute (GenerateMojo.java:348)
You can see that it actually crashes in the jgit plugin. I've been looking into the POM and it seems the plugin is using an older version of the jgit plugin... Not even the original Eclipse one. Should this be bumped to a newer version?
I'm not entirely sure what would be required to make this Mojo thread safe (I haven't dived in the code), but it would be nice if this were marked as thread safe, so Maven didn't cause warnings when multi-thread builds were invoked.
There should be an option to output the change log as an HTML page with clickable links to an issue tracker, if used.
My application scans this git commit log for an id which either originated in this branch or originated in a parent branch. Is there a way to log all parents of each commit?
Git Bash $ git log
prints what I need because the previous deployment of my application was built from commit 1ce83fd98c
(from a parent branch):
commit 13646c0815ec98d52c2eacf12253da3e4bca309d
Merge: 6d79be56f4 1ce83fd98c
How can I achieve?
git log -n20
Also, I have many projects in a single repo so I want to filter by directory
git log -n20 -- .
It would be handy to have support for https://www.conventionalcommits.org In this case, the generated changelog will group commits by bug fixes/features/build/test/etc changes.
See also: https://github.com/conventional-changelog/conventional-changelog
hi,
nice plugin you have here, well done!
do you have any plans to extend it a bit more to hook up with the maven reporting workflow?
http://docs.codehaus.org/display/MAVENUSER/Write+your+own+report+plugin
cheers
j
Duplicate commit messages just create noise in the changelog, so should be removed.
The maven release plugin creates a lot of noise for changelogs, so it's better to exclude these.
Make the sample reports available to view from GitHub.
Hi,
I have a use-case where several artifacts share the same git repo.
I'd like to be able to filter commit messages based on relative path from the repo's base.
I'd be glad to do the change and submit a pull request given you think it's doable and you don't have any objections to it.
It seems I just need to add a CommitFilter which knows if the commit contains files from that relative path.
Something like:
RevTree tree = commit.getTree(); return TreeWalk.forPath(repo, path, tree) != null;
I might be wrong since I have no jGit experience and this is just based on some googling.
It will be very useful to have a configuration allowing to map a prefix commit to a section.
So we could generate different section on the output changelog file. My use case is that i want to separate bug fixes, and features. And avoid to display some technicals commits that make no sense for the final user.
By excluding <html>
/ <body>
tags and CSS etc, this report is a good candidate for embedding in another page.
This report is not generated by default. It can be turned on with the following configuration:
<generateHTMLTableOnlyChangeLog>true</generateHTMLTableOnlyChangeLog>
<htmlTableOnlyChangeLogFilename>changelog-tableonly.html</htmlTableOnlyChangeLogFilename>
Hello,
We are using a multi-module project with separate git repositories... Would it be possible to specify an option, so that the plugin runs for every module instead only for the aggregator?
For example, if i have this kind of commit : 'Removed unused tags'
The markdown generated will interprete on the commit message.
Solution : escape these tags by doing : 'Removed unused <html> tags'
Tags in HTML or MD (or even other formats) should be ordered by commit dates. Tags belong to commits and thereby form a timely ordering of commits. For some reason, the ordering of the tags is not used when generating a git log report. Instead, tags seem to appear in a lexicographical ordering. Hence the output does not reflect the order of changes by time, cf. https://dev.dukecon.org/nexus/content/sites/site/org.dukecon/dukecon-server-api/1.3-SNAPSHOT/dukecon-server-api/gitlog.html
Also perhaps "last N commits"
Beside text and HTML, a Markdown output gitlog would be specially useful (when pushed into github site) to automatically produce a changelog page.
I would like to see an enhancement: It should be possible to switch on the publication of commit IDs in each log entry. In HTML they should optionally get a link to the underlying repository, e.g., e737da5dc8e69f002332d1222d03b4efed46fa72(e737da5dc8e69f002332d1222d03b4efed46fa72).
Hi,
I have a homebrew mechanism similar to the maven release plugin which adds its own commits.
I'd like to change the extract a filter from the MavenReleasePluginMessageFilter which accepts a prefix (the current filter will call that one with "[maven-release-plugin]") and so one can define a prefix which it wants to filter.
Hello! :)
I wondered of there was a way to filter the commits to display in the changelog?
Some of the commits have no meaning or no interest for the end user and I would like to have a way to specify to the plugin to ignore some of the commits. To exclude or to include... either way :)
Maybe with a pattern similar to:
(?:Bug|UPDATE|FIX|ADD|NEW|#) ?#?(\d+)
That's close to what @aelamrani asked in the issue #23 ... and may actually be complementary.
Oh and btw... thanks a lot for this plugin :)
Hi,
We are using this plugin in our maven project. As Our repository is very big, we do shallow clone in our Jenkins Job to run Unit Test then update artifact in nexus. But we are getting the following error when we run the maven build after doing shallow clone.
Failed to execute goal com.github.danielflower.mavenplugins:maven-gitlog-plugin:1.5.0:generate (default) on project stella-webapp: Execution default of goal com.github.danielflower.mavenplugins:maven-gitlog-plugin:1.5.0:generate failed: Walk failure. Missing commit 296bb44b654fa0a1591282812ff7e0b078d96634 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.danielflower.mavenplugins:maven-gitlog-plugin:1.5.0:generate (default) on project stella-webapp: Execution default of goal com.github.danielflower.mavenplugins:maven-gitlog-plugin:1.5.0:generate failed: Walk failure.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal com.github.danielflower.mavenplugins:maven-gitlog-plugin:1.5.0:generate failed: Walk failure.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
I generate the HTML table, and I'd like a column for the commit identifier. I don't see an option for this in the plugin configuration.
Hi,
please add, if possible, a ticketUrl property in generated changelog.json with the value used in changelog.html <a href="https://jira.company.com/TICKET-1" ...
Thanks!
Supporting Asciidoc conversions would be great !
Allow the types of reports required to be specified, with options such as filenames included.
Line 67 of SimpleHtmlRenderer.java sets the author to committer and therefore the "areSame" test later in the method always returns true. This results in the author never being printed.
if you build using "mvn -f somedir" the changelog generated for the current directory rather than the project directory. Paths for the git repo should be resolved against ${project.basedir}
Have you considered adding this feature? I think this would simplify the generation of release notes.
Eg.:
includeCommitsAfterTag
: type=string; default ""includeCommitsAfterLastTag
: type=boolean; default "false"What do you think?
Note: this is different from #44 , because I do not use the maven-release-plugin (bad idea).
It will be also nice if the URL can be like https://jira.company.com/jira/browse/TICKET-1 in the adoc files
Hello, Expert
i have the same issue as this thread
(#29)
I updated my project version to use the latest gitlog-maven-plugin, but still got this error. Could you please help?
Error: 4-02 04:30:04] [autobuild] [ERROR] Failed to execute goal com.github.danielflower.mavenplugins:gitlog-maven-plugin:1.14.0:generate (default) on project myproject: Execution default of goal com.github.danielflower.mavenplugins:gitlog-maven-plugin:1.14.0:generate failed: Walk failure. Missing commit 7fa922191b3c30741792099051d7714a2f2115fe -> [Help 1]
[2023-04-02 04:30:04] [autobuild] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.danielflower.mavenplugins:gitlog-maven-plugin:1.14.0:generate (default) on project myproject: Execution default of goal com.github.danielflower.mavenplugins:gitlog-maven-plugin:1.14.0:generate failed: Walk failure.
[2023-04-02 04:30:04] [autobuild] at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:375)
[2023-04-02 04:30:04] [autobuild] at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
[2023-04-02 04:30:04] [autobuild] at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
[2023-04-02 04:30:04] [autobuild] at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
[2023-04-02 04:30:04] [autobuild] at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
[2023-04-02 04:30:04] [autobuild] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
[2023-04-02 04:30:04] [autobuild] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
[2023-04-02 04:30:04] [autobuild] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
[2023-04-02 04:30:04] [autobuild] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
[2023-04-02 04:30:04] [autobuild] at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:298)
[2023-04-02 04:30:04] [autobuild] at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
[2023-04-02 04:30:04] [autobuild] at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
[2023-04-02 04:30:04] [autobuild] at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
[2023-04-02 04:30:04] [autobuild] at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
[2023-04-02 04:30:04] [autobuild] at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
[2023-04-02 04:30:04] [autobuild] at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
[2023-04-02 04:30:04] [autobuild] at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
[2023-04-02 04:30:04] [autobuild] at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
[2023-04-02 04:30:04] [autobuild] at java.lang.reflect.Method.invoke (Method.java:498)
[2023-04-02 04:30:04] [autobuild] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
[2023-04-02 04:30:04] [autobuild] at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
[2023-04-02 04:30:04] [autobuild] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
[2023-04-02 04:30:04] [autobuild] at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.