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

OC-30 Compile error maven multimodule project #30

Open
marek-parfianowicz opened this issue Dec 15, 2019 · 1 comment
Open

OC-30 Compile error maven multimodule project #30

marek-parfianowicz opened this issue Dec 15, 2019 · 1 comment

Comments

@marek-parfianowicz
Copy link
Member

marek-parfianowicz commented Dec 15, 2019

I have a multimodule maven project composed by ModuleA and ModuleB. ModuleA is a dependency required by ModuleB.

ModuleA contains this class:

`public class ClassA{

private Long attribute;

public ClassA() {
    super();
}

public ClassA(Long value) {
    super();
    this.attribute = value;
}

}`

ModuleB contains this class:

`public class ClassB{

public void methodB() {
    ...
    ClassA classA = new ClassA(1L);
    ...
}

}`

When i generate clover report using maven like that:

mvn clover:instrument clover:aggregate clover:clover
i have this compilation error while compiling ModuleB

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project xxx: Compilation failure [ERROR] constructor ClassA in class ClassA cannot be applied to given types; [ERROR] required: no arguments [ERROR] found: long [ERROR] reason: actual and formal argument lists differ in length

the error disappear if I use the default constructor. It seems a problem due to code instrumentation as the code builds correctly when generating the deploy package.

@marek-parfianowicz
Copy link
Member Author

Original report: https://bitbucket.org/openclover/clover/issues/30

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