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

Required parameter resultSources not set. #20

Open
gkalnytskyi opened this issue Oct 2, 2019 · 1 comment
Open

Required parameter resultSources not set. #20

gkalnytskyi opened this issue Oct 2, 2019 · 1 comment

Comments

@gkalnytskyi
Copy link

gkalnytskyi commented Oct 2, 2019

I have upgraded my test project to Cucumber 4.7.2, donut 1.2.2 and donut-maven-plugin 1.2.2 from cucumber 1.2.5, donut 1.1 and donut-maven-plugin 0.0.5. And I also changed plugin configuration to the one provided in the current Readme.md.

donut-maven-plugin version 0.0.5 with configuration bonded to pre-intergration-test phase was working fine when called from the command line as a standalone task.

mvn io.magentys:donut-maven-plugin:0.0.5:generate

But after version the update the similar report generation task in the build fails with the following exception:

mvn report.donut:donut-maven-plugin:1.2.2:generate

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal report.donut:donut-maven-plugin:1.2.2:generate (default-cli) on project bbsw-test-harness: Required parameter `resultSources` not set.

While the plugin configuration clearly has this parameter:

<plugin>
  <groupId>report.donut</groupId>
  <artifactId>donut-maven-plugin</artifactId>
  <version>1.2.2</version>
  <executions>
    <execution>
      <id>execution</id>
      <phase>post-integration-test</phase>
      <goals>
        <goal>generate</goal>
      </goals>
      <configuration>
        <resultSources>
          <resultSource>
            <!-- optional format, defaults to cucumber -->
            <format>cucumber</format>
            <directory>${project.build.directory}/cucumber-reports</directory>
          </resultSource>
        </resultSources>
        <outputPath>${project.build.directory}/donut</outputPath>
        <timestamp>${maven.build.timestamp}</timestamp>
        <template>default</template>
        <projectName>${project.name}</projectName>
        <!-- optional customAttributes -->
        <customAttributes>
          <customAttribute>
            <name>App Name</name>
            <value>blah</value>
          </customAttribute>
        </customAttributes>
      </configuration>
    </execution>
  </executions>
</plugin>

Maven version 3.6.2.

What am I missing?

Update:
Maven debug log:

[DEBUG] Configuring mojo report.donut:donut-maven-plugin:1.2.2:generate from plugin realm 
ClassRealm[plugin>report.donut:donut-maven-plugin:1.2.2, parent: sun.misc.Launcher$AppClassLoader@4e25154f]
[DEBUG] Configuring mojo 'report.donut:donut-maven-plugin:1.2.2:generate' with basic configurator 
-->
[DEBUG]   (f) countMissingAsFailure = false
[DEBUG]   (f) countPendingAsFailure = false
[DEBUG]   (f) countSkippedAsFailure = false
[DEBUG]   (f) countUndefinedAsFailure = false
[DEBUG]   (f) customAttributes = []
[DEBUG]   (f) outputPath = D:\Projects\bbsw-test-harness\target\donut
[DEBUG]   (f) resultSources = []
[DEBUG]   (f) skip = false
[DEBUG]   (f) template = default
[DEBUG] -- end configuration --
@gkalnytskyi
Copy link
Author

gkalnytskyi commented Oct 3, 2019

Update.
I managed to make the plugin working by moving configuration section of the plugin from //executions/execution to plugin node, but in this case I get the following warning:

[WARNING] Could not lookup path List(projectMetadata, projectVersion) in List(Identifier(List(projectMetadata, projectVersion)))

Can you please advise why is this happening, and how to correctly run the plugin in the Maven build?

Additionally, I binding plugin configuration to the Maven test phase works with the recommende config, but I received the same warning as above.

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

1 participant