Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestions: <reportTitle> option #93

Closed
Sami32 opened this issue Aug 2, 2018 · 12 comments
Closed

Suggestions: <reportTitle> option #93

Sami32 opened this issue Aug 2, 2018 · 12 comments

Comments

@Sami32
Copy link

Sami32 commented Aug 2, 2018

It would be nice to have an option to change the report title, like "${project.version} Release notes" and not only "CHANGELOG" as it is now.
<reportTitle></reportTitle>

I probably missed how to change the log structure, like keeping only the message and get rid of "id: 4a09cd7 (by Samuel)" or set these informations only after the commit message.

@llorllale
Copy link
Owner

llorllale commented Aug 2, 2018

@Sami32

change the log structure

To change the structure, we can set <format> to custom and then set <customFileFormat> to your XSLT file's path. See for example how it's done here.

like "${project.version} Release notes"

loggit currently does not support injecting POM properties into the output log... that would require a bit of thought. Is there urgency for this?

@Sami32
Copy link
Author

Sami32 commented Aug 2, 2018

No hurry at all, as i plan to use the generated file as a draft for a manual tuning before release.

Ok, i didn't knew how to use that part so i wasn't sure.
Thank you for your link and help +1

Note:
As i use markdown format i was not sure it will fit my need but i'll try and learn XSL on the way.

@Sami32
Copy link
Author

Sami32 commented Aug 2, 2018

Hum weird.
When i use your markdown XSL file or that one with the custom format configuration it fails also with a NPE.

<format>custom</format>
<customFileFormat>${project.basedir}/src/main/resources/ReleaseNotes.xsl</customFileFormat> 

or

<format>custom</format>
<customFileFormat>src/main/resources/ReleaseNotes.xsl</customFileFormat> 

[ERROR] Failed to execute goal org.llorllale:loggit-maven-plugin:1.0.1:changelog (default-cli) on project dms: Execution default-cli of goal org.llorllale:loggit-maven-plugin:1.0.1:changelog failed.: NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.llorllale:loggit-maven-plugin:1.0.1:changelog (default-cli) on project dms: Execution default-cli of goal org.llorllale:loggit-maven-plugin:1.0.1:changelog failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
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:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
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:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.llorllale:loggit-maven-plugin:1.0.1:changelog failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:148)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
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:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
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:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.lang.NullPointerException
at java.io.FileInputStream. (FileInputStream.java:130)
at org.cactoos.io.InputOf.lambda$new$1 (InputOf.java:70)
at org.cactoos.io.InputOf.stream (InputOf.java:315)
at org.cactoos.io.TeeInput.stream (TeeInput.java:870)
at org.cactoos.io.InputAsBytes.asBytes (InputAsBytes.java:79)
at org.cactoos.io.BytesOf.asBytes (BytesOf.java:290)
at org.cactoos.text.TextOf.lambda$new$0 (TextOf.java:245)
at org.cactoos.func.IoCheckedFunc.lambda$apply$0 (IoCheckedFunc.java:60)
at org.cactoos.func.IoCheckedBiFunc.apply (IoCheckedBiFunc.java:66)
at org.cactoos.func.IoCheckedFunc.apply (IoCheckedFunc.java:61)
at org.cactoos.scalar.IoCheckedScalar.value (IoCheckedScalar.java:65)
at org.cactoos.text.TextOf.asString (TextOf.java:305)
at org.llorllale.mvn.plgn.loggit.xsl.StylesheetEnvelope.lambda$new$0 (StylesheetEnvelope.java:60)
at org.cactoos.scalar.StickyScalar.lambda$new$0 (StickyScalar.java:66)
at org.cactoos.func.StickyFunc.lambda$new$0 (StickyFunc.java:72)
at org.cactoos.func.StickyBiFunc.apply (StickyBiFunc.java:95)
at org.cactoos.func.StickyFunc.apply (StickyFunc.java:79)
at org.cactoos.scalar.StickyScalar.value (StickyScalar.java:72)
at org.cactoos.scalar.UncheckedScalar.lambda$value$0 (UncheckedScalar.java:58)
at org.cactoos.func.UncheckedFunc.lambda$apply$0 (UncheckedFunc.java:58)
at org.cactoos.func.IoCheckedBiFunc.apply (IoCheckedBiFunc.java:66)
at org.cactoos.func.UncheckedBiFunc.apply (UncheckedBiFunc.java:60)
at org.cactoos.func.UncheckedFunc.apply (UncheckedFunc.java:59)
at org.cactoos.scalar.UncheckedScalar.value (UncheckedScalar.java:59)
at org.llorllale.mvn.plgn.loggit.xsl.StylesheetEnvelope.applyTo (StylesheetEnvelope.java:83)
at org.llorllale.mvn.plgn.loggit.Changelog.postprocess (Changelog.java:282)
at org.llorllale.mvn.plgn.loggit.Changelog.execute (Changelog.java:250)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
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:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
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:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)

Do i do something wrong?

@llorllale
Copy link
Owner

@Sami32 are you certain you got the file's path right?

@Sami32
Copy link
Author

Sami32 commented Aug 3, 2018

Yes.
I finally sorted out that it came from a typo in your documentation:
customFileFormat instead of customFormatFile
I feel so confuse to have missed that when i looked at your sample link...only looking at your code source make me realize that.

Other suggestion:

  • An other suggestion will be to add <startCommit> option.
    Because when you start a new project from a fork of an existing one, you generally remove all the tags and don't want all the commits from the original be added to your log, as it is not pertinent and make the process to generate the log muuuch longer.

@Sami32
Copy link
Author

Sami32 commented Aug 3, 2018

  • Maybe a <deduplicate> option to avoid logging commits having the same message.

@llorllale
Copy link
Owner

@Sami32 thanks for pointing out the typo with <customFormatFile>. I fixed it in a28cfca.

Regarding your feature request, can you please open a new issue for it? Let's close this one - it's starting to get confusing.

Thanks :)

@Sami32 Sami32 changed the title Suggestions Suggestions: <reportTitle> optionSuggestions Aug 4, 2018
@Sami32 Sami32 changed the title Suggestions: <reportTitle> optionSuggestions Suggestions: <reportTitle> option Aug 4, 2018
@Sami32
Copy link
Author

Sami32 commented Aug 4, 2018

Hehe, sure ;)

I don't want open an issue just for that, but except if i missed it there is still no goal name into your documentation ;)
mvn loggit:changelog

@llorllale
Copy link
Owner

@Sami32 the goal's name is implicit there: changelog :)

@llorllale llorllale reopened this Aug 6, 2018
@llorllale
Copy link
Owner

@Sami32 hold on, I see what you mean

llorllale added a commit that referenced this issue Aug 6, 2018
@llorllale
Copy link
Owner

@Sami32 fixed in 65ee1fc, is that ok now?

@Sami32
Copy link
Author

Sami32 commented Aug 6, 2018

Great 👍
Yes, definitively. I hope that now you will get more users as your plugin deserve ;-)

When i was testing and comparing other similar plugins half documented for most of it, i met different goal like git-changelog or generate-changelog and so on taken from their Mojo code as it was implicit ;)

@Sami32 Sami32 closed this as completed Aug 6, 2018
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

No branches or pull requests

2 participants