File artifactFile = new File( pomInfo.getPomFile().getParentFile(),
pomInfo.getBuildDirectory() + "/" + pomInfo.getFinalName() );
System.out.println( "Using IT Plugin Jar: " + artifactFile.getAbsolutePath() );
try
{
ProjectBuildingRequest request = new DefaultProjectBuildingRequest();
request.setLocalRepository( artifactRepositoryFactory.createArtifactRepository( "local", new File( "target/localrepo" ).getCanonicalFile().toURL().toExternalForm(), "default", null, null ) );
request.setRepositorySession( new MavenRepositorySystemSession() );
MavenProject project = projectBuilder.build( pomInfo.getPomFile(), request ).getProject();
Artifact artifact = artifactFactory.createArtifact( project.getGroupId(), project.getArtifactId(), project
.getVersion(), null, project.getPackaging() );