trautonen / coveralls-maven-plugin

Maven plugin for submitting Java code coverage reports to Coveralls web service.
MIT License
311 stars 124 forks source link

Unable to parse configuration report for parameter timestamp #77

Closed mmoayyed closed 9 years ago

mmoayyed commented 9 years ago

I have

                <plugin>
                    <groupId>org.eluder.coveralls</groupId>
                    <artifactId>coveralls-maven-plugin</artifactId>
                    <version>${coveralls-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>cobertura-maven-plugin</artifactId>
                    <version>${cobertura-maven-plugin.version}</version>
                    <configuration>
                        <format>xml</format>
                        <maxmem>256m</maxmem>
                        <!-- aggregated reports for multi-module projects -->
                        <aggregate>true</aggregate>
                    </configuration>
                </plugin>

where the versions are 3.1.0 and 2.7.

I get:

[ERROR] Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:3.1.0:report (default-cli) on project cas-server: Unable to parse configuration of mojo org.eluder.coveralls:coveralls-maven-plugin:3.1.0:report for parameter timestamp: Cannot convert 'Sun, 16 Aug 2015 01:19:22 -0700' to Date -> [Help 1]
trautonen commented 9 years ago

The plugin records the build job timestamp from timestamp property resolved by your POM. It seems that you use the same property for some other purpose with incompatible format.

    /**
     * Build timestamp. Must be in 'yyyy-MM-dd HH:mm:ssa' format.
     */
    @Parameter(property = "timestamp", defaultValue = "${timestamp}")

At the moment there is no way to disable the timestamp resolution. This might actually be a problem if you need the timestamp in some other format elshwhere. The following should do the trick for your pom.xml, and hopefully not break other things.

    <maven.build.timestamp.format>yyyy-MM-dd HH:mm:ssa</maven.build.timestamp.format>
    <timestamp>${maven.build.timestamp}</timestamp>
trautonen commented 9 years ago

Additional timestampFormat property can be used to define any timestamp format. maven.build.timestamp.format will be used as a default.

manudevelopia commented 8 years ago

Please @trautonen, in pom.xml, where do I have to add these lines? I tried putting them in but does not seem to work.

<maven.build.timestamp.format>yyyy-MM-dd HH:mm:ssa</maven.build.timestamp.format>
<timestamp>${maven.build.timestamp}</timestamp>

Edit: problem solved removing from the pom.xml the plugin buildnumber-maven-plugin