src/main/java/com/rubiconred/maven/extention/MySTMavenExtention.java
/**
	 * filters src based on criteria
	 * @param src
	 * @param criteria
	 * @return modified list of projects 
	 */
filters src based on criteria
@param src
@param criteria
@return modified list of projects
filters src based on criteria @param src @param criteria @return modified list of projects
protected List<MavenProject> filter(List<MavenProject> src, Criteria criteria) {
		final List<MavenProject> dest = new ArrayList<MavenProject>();
		if ("".equals(criteria.getClause())) {
			System.out.println("MySTMavenExtention::filter : not filtering original set of reactor projects");
			return src;
		} else if (".".equals(criteria.getClause())) {
			dest.add(src.get(src.size() - 1));
			System.out.println("MySTMavenExtention::filter : returning collection which should consists of parent project only : " + src.get(src.size() - 1));
			return dest;
		} else {
			final String[] modules = criteria.getClause().split(",");
			System.out.println(modules);			
			for (final MavenProject mavenProject : src) {
				System.out.println("MySTMavenExtention::filter : artifact id of the maven project : "+mavenProject.getArtifactId());
				if (contains2(modules, matchBy(mavenProject))) {
					dest.add(mavenProject);
				}
			}
			System.out.println("MySTMavenExtention::filter : returning collection which should consists of changed project(s) only : " + dest);
			return dest;
		}		
	}
protected List < MavenProject > filter ( List < MavenProject > src , Criteria criteria ) { final List < MavenProject > dest = new ArrayList < MavenProject > ( ) ; if ( "" . equals ( criteria . getClause ( ) ) ) { System . out . println ( "MySTMavenExtention::filter : not filtering original set of reactor projects" ) ; return src ; } else if ( "." . equals ( criteria . getClause ( ) ) ) { dest . add ( src . get ( src . size ( ) - 1 ) ) ; System . out . println ( "MySTMavenExtention::filter : returning collection which should consists of parent project only : " + src . get ( src . size ( ) - 1 ) ) ; return dest ; } else { final String [ ] modules = criteria . getClause ( ) . split ( "," ) ; System . out . println ( modules ) ; for ( final MavenProject mavenProject : src ) { System . out . println ( "MySTMavenExtention::filter : artifact id of the maven project : " + mavenProject . getArtifactId ( ) ) ; if ( contains2 ( modules , matchBy ( mavenProject ) ) ) { dest . add ( mavenProject ) ; } } System . out . println ( "MySTMavenExtention::filter : returning collection which should consists of changed project(s) only : " + dest ) ; return dest ; } }
filters src based on criteria
 @param src
 @param criteria
 @return modified list of projects
filters src based on criteria @param src @param criteria @return modified list of projects
// do not filter // return top most root project