fabric8io / fabric8

fabric8 is an open source microservices platform based on Docker, Kubernetes and Jenkins
http://fabric8.io/
1.77k stars 505 forks source link

hawtapp-maven-plugin has issues with deps of type "test-jar" #5791

Closed rhuss closed 8 years ago

rhuss commented 8 years ago

It seems that if two deps are included, one with scope compile and one with scope test and type test-jar (which causes the tests to be deployed, too), then the plugin gets confused and included one of both deps randomly.

The issue has been analysed in https://github.com/fabric8io/ipaas-quickstarts/issues/1157 and is probably due to this map lookup which doesn't honor the type.

would be good to add a unit test for this scenario, too (even if this would be the first test).

jimmidyson commented 8 years ago

The problem is actually in Maven's core ArtifactUtils - it doesn't take type into account with it's versionlessKey which it uses in building a map of artifacts for a project...:

public static String versionlessKey(Artifact artifact) {
  return versionlessKey(artifact.getGroupId(), artifact.getArtifactId());
}

Will have to build our own map which does take type into account. Working on it now.

rhuss commented 8 years ago

thx, @jimmidyson

sorry would have tried to fix it myself but my panic is growing slowly now when I think to my next week's presentation slides :)