You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm-dev@maven.apache.org by Imran M Yousuf <im...@gmail.com> on 2009/03/31 06:17:40 UTC

A probable bug in git scm provider for maven-scm-plugin

Hi,

When I use the <type>tag</type> in changelog configuration (its at the
end of the email), it uses the following query for generating the
changeset -

git whatchanged --since=0.3 --until=HEAD --date=iso

While 'git help whatchanged' says nothing about '--since' but the 'git
help log' says that '--since' is to be a date, thus IMHO, the
implementation should have been something like -

git whatchanged 0.3...HEAD --date=iso

I also checked the source code of the changelog and it is using the
following method-

changeLog(ScmRepository repository, ScmFileSet fileSet, ScmVersion
startVersion, ScmVersion endVersion)
http://maven.apache.org/scm/projects/apidocs/org/apache/maven/scm/provider/ScmProvider.html#changeLog(org.apache.maven.scm.repository.ScmRepository,%20org.apache.maven.scm.ScmFileSet,%20org.apache.maven.scm.ScmVersion,%20org.apache.maven.scm.ScmVersion)

Which IMHO, is the correct one to use. I will try to check the gitexe
code today to see whether I can fix it or not. Please let me know what
you think about the problem.

Thank you,

-- 
Imran M Yousuf
Entrepreneur & Software Engineer
Smart IT Engineering
Dhaka, Bangladesh
Email: imran@smartitengineering.com
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557

Re: A probable bug in git scm provider for maven-scm-plugin

Posted by Imran M Yousuf <im...@gmail.com>.
On Tue, Mar 31, 2009 at 10:17 AM, Imran M Yousuf <im...@gmail.com> wrote:
> Hi,
>
> When I use the <type>tag</type> in changelog configuration (its at the
> end of the email), it uses the following query for generating the
> changeset -
>
> git whatchanged --since=0.3 --until=HEAD --date=iso
>
> While 'git help whatchanged' says nothing about '--since' but the 'git
> help log' says that '--since' is to be a date, thus IMHO, the
> implementation should have been something like -
>
> git whatchanged 0.3...HEAD --date=iso
>
> I also checked the source code of the changelog and it is using the
> following method-
>
> changeLog(ScmRepository repository, ScmFileSet fileSet, ScmVersion
> startVersion, ScmVersion endVersion)
> http://maven.apache.org/scm/projects/apidocs/org/apache/maven/scm/provider/ScmProvider.html#changeLog(org.apache.maven.scm.repository.ScmRepository,%20org.apache.maven.scm.ScmFileSet,%20org.apache.maven.scm.ScmVersion,%20org.apache.maven.scm.ScmVersion)
>
> Which IMHO, is the correct one to use. I will try to check the gitexe
> code today to see whether I can fix it or not. Please let me know what
> you think about the problem.
>

I already worked on it but was not able to compile and test it, but
this is just for RFC. Please have a look and let me know what you
think. I missed the configuration that caused the error adding it as
follows:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-changelog-plugin</artifactId>
                <version>${changelog.version}</version>
                <inherited>false</inherited>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.plexus</groupId>
                        <artifactId>plexus-utils</artifactId>
                        <version>${plexus-utils.version}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>attach-changelog</id>
                        <phase>install</phase>
                        <goals>
                            <goal>changelog</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-changelog-plugin</artifactId>
                <version>${changelog.version}</version>
                <configuration>
                    <type>tag</type>
                    <tags>
                        <tag implementation="java.lang.String">0.3
                        </tag>
                        <tag implementation="java.lang.String">HEAD
                        </tag>
                    </tags>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

Thank you,

Imran

> Thank you,
>
> --
> Imran M Yousuf
> Entrepreneur & Software Engineer
> Smart IT Engineering
> Dhaka, Bangladesh
> Email: imran@smartitengineering.com
> Blog: http://imyousuf-tech.blogs.smartitengineering.com/
> Mobile: +880-1711402557
>



-- 
Imran M Yousuf
Entrepreneur & Software Engineer
Smart IT Engineering
Dhaka, Bangladesh
Email: imran@smartitengineering.com
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557