Skip to content

[Bug] - [Generic buildspec should not include -Dmaven.test.skip=true] #1298

@behnazh-w

Description

@behnazh-w

Description

There's a difference between -DskipTests and -Dmaven.test.skip

  • skipTests prevents surefire plugin from running tests
  • maven.test.skip prevents maven-compiler-plugin to even build test sources

Whether -Dmaven.test.skip should be used really depends. It prevents an unnecessary environment requirements, since e.g. newer jdk or additional OS packages may be required for test builds.

On the other hand, once another project has a dependency on a test-jar type artifact of some of the other modules, the compilation fails: since maven-compiler-plugin was disabled, no artifact was ever produced for the module.

Steps to Reproduce

Please list the steps required to reproduce the issue:

run_macaron.sh analyze -purl pkg:maven/ch.qos.logback/logback-parent@1.5.25
run_macaron.sh gen-build-spec -purl pkg:maven/ch.qos.logback/logback-parent@1.5.25

Expected Behavior

The maven model contains the dependency from logback-classic to logback-core:test so it should have omitted the -Dmaven.test.skip=true.

Environment Information

macaron 0.20.0

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingbuild_spec_generationRelated to the build spec generation feature.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions