use of org.commonjava.maven.atlas.ident.ref.ProjectVersionRef in project galley by Commonjava.
the class MavenPomViewTest method artifactIdWithWhitespace.
@Test
public void artifactIdWithWhitespace() throws Exception {
final MavenPomView pomView = loadPoms("pom-with-whitespace-artifactId.xml");
final String aid = pomView.getArtifactId();
final ProjectVersionRef pvr = pomView.asProjectVersionRef();
assertThat(aid, equalTo("bar-project"));
assertThat(pvr.getArtifactId(), equalTo("bar-project"));
}
use of org.commonjava.maven.atlas.ident.ref.ProjectVersionRef in project galley by Commonjava.
the class MavenPomViewTest method buildExtension.
@Test
public void buildExtension() throws Exception {
MavenPomView pomView = loadPoms("pom-with-build-ext.xml");
List<ExtensionView> extensions = pomView.getBuildExtensions();
assertThat(extensions, notNullValue());
assertThat(extensions.size(), equalTo(1));
assertThat(extensions.get(0).asProjectVersionRef(), equalTo((ProjectVersionRef) new SimpleProjectVersionRef("ext.group", "ext-artifact", "1.0")));
}
use of org.commonjava.maven.atlas.ident.ref.ProjectVersionRef in project galley by Commonjava.
the class MavenPomViewTest method groupIdFailOverToParent.
@Test
public void groupIdFailOverToParent() throws Exception {
final MavenPomView pomView = loadPoms("pom-with-parent-groupId.xml", "simple-parent-pom.xml");
final String gid = pomView.getGroupId();
final ProjectVersionRef pvr = pomView.asProjectVersionRef();
assertThat(gid, equalTo("org.foo"));
assertThat(pvr.getGroupId(), equalTo("org.foo"));
}
use of org.commonjava.maven.atlas.ident.ref.ProjectVersionRef in project galley by Commonjava.
the class MavenPomViewTest method profileBuildExtension.
@Test
public void profileBuildExtension() throws Exception {
MavenPomView pomView = loadPoms(new String[] { "test" }, "pom-with-profile-build-ext.xml");
List<ExtensionView> extensions = pomView.getBuildExtensions();
assertThat(extensions, notNullValue());
assertThat(extensions.size(), equalTo(1));
assertThat(extensions.get(0).asProjectVersionRef(), equalTo((ProjectVersionRef) new SimpleProjectVersionRef("ext.group", "ext-artifact", "1.0")));
}
use of org.commonjava.maven.atlas.ident.ref.ProjectVersionRef in project galley by Commonjava.
the class XMLInfrastructureTest method parseParentRef.
@Test
public void parseParentRef() throws Exception {
final Document doc = loadDocument("pom-with-parent.xml");
final ProjectVersionRef parentRef = new XMLInfrastructure().getParentRef(doc);
assertThat(parentRef, notNullValue());
}
Aggregations