protected Artifact findFrameworkArtifact ( boolean minVersionWins ) { Artifact result = null ; Set < ? > artifacts = project . getArtifacts ( ) ; for ( Iterator < ? > iter = artifacts . iterator ( ) ; iter . hasNext ( ) ; ) { Artifact artifact = ( Artifact ) iter . next ( ) ; if ( "zip" . equals ( artifact . getType ( ) ) ) { if ( "framework" . equals ( artifact . getClassifier ( ) ) ) { result = artifact ; if ( ! minVersionWins ) { break ; } // System.out.println( "added framework: " + artifact.getGroupId() + ":" + artifact.getArtifactId() // ); // don't break, maybe there is "framework-min" artifact too } // "module-min" overrides "module" (if present) else if ( "framework-min" . equals ( artifact . getClassifier ( ) ) ) { result = artifact ; // System.out.println( "added framework-min: " + artifact.getGroupId() + ":" // + artifact.getArtifactId() ); if ( minVersionWins ) { break ; } } } } return result ; }
used by initialize dist and war mojos