protected List < Artifact > getAllArtifactsComingFromNinjaStandalone ( List < Artifact > artifacts ) { List < Artifact > resultingArtifacts = new ArrayList <> ( ) ; for ( Artifact artifact : artifacts ) { for ( String dependencyTrail : artifact . getDependencyTrail ( ) ) { // something like: org.ninjaframework:ninja-standalone:jar:2.5.2 if ( dependencyTrail . contains ( NinjaMavenPluginConstants . NINJA_STANDALONE_ARTIFACT_ID ) ) { resultingArtifacts . add ( artifact ) ; break ; } } } return resultingArtifacts ; }
This might be a bit hacky . But just a little bit .