protected void processClientPom() throws IOException {
  File pom=new File(projectRoot,CLIENT_POM);
  String pomContent=readFileContent(pom);
  String depString=GEN_START + String.format("<dependency>%n<groupId>%s</groupId>%n<artifactId>%s</artifactId>%n</dependency>%n",mavenGroupId,mavenArtifactId) + GEN_END;
  if (!pomContent.contains(DEP_END_TAG)) {
    throw new IOException(String.format("File '%s' doesn't contain '%s'. Can't process file.",CLIENT_POM,DEP_END_TAG));
  }
  pomContent=pomContent.replace(DEP_END_TAG,depString + DEP_END_TAG);
  writeFileContent(pomContent,pom);
}

protected void processClientPom ( ) throws IOException { File pom = new File ( projectRoot , CLIENT_POM ) ; String pomContent = readFileContent ( pom ) ; String depString = GEN_START + String . format ( "<dependency>%n<groupId>%s</groupId>%n<artifactId>%s</artifactId>%n</dependency>%n" , mavenGroupId , mavenArtifactId ) + GEN_END ; if ( ! pomContent . contains ( DEP_END_TAG ) ) { throw new IOException ( String . format ( "File '%s' doesn't contain '%s'. Can't process file." , CLIENT_POM , DEP_END_TAG ) ) ; } pomContent = pomContent . replace ( DEP_END_TAG , depString + DEP_END_TAG ) ; writeFileContent ( pomContent , pom ) ; }
insert dependency at the end of " dependencies " section .
