yes you can . This is the code. You need maven-model-3.0.4.jar and plexus-utils-2.0.6.jar and maven-core-3.0.4.jar
Model model = null;
FileReader reader = null;
MavenXpp3Reader mavenreader = new MavenXpp3Reader();
try {
reader = new FileReader(pomfile);
model = mavenreader.read(reader);
model.setPomFile(pomfile);
}catch(Exception ex){}
MavenProject project = new MavenProject(model);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…