use of org.gradle.api.artifacts.maven.MavenPom in project gradle by gradle.
the class BasePomFilterContainer method addFilter.
public MavenPom addFilter(String name, PublishFilter publishFilter) {
if (name == null || publishFilter == null) {
throw new InvalidUserDataException("Name and Filter must not be null.");
}
MavenPom pom = mavenPomFactory.create();
pomFilters.put(name, new DefaultPomFilter(name, pom, publishFilter));
return pom;
}
use of org.gradle.api.artifacts.maven.MavenPom in project gradle by gradle.
the class MavenPluginConvention method pom.
/**
* Creates a new {@link MavenPom}.
*
* @return The POM instance.
*/
public MavenPom pom() {
MavenPom pom = createMavenPom();
pom.setGroupId(project.getGroup().toString());
pom.setArtifactId(project.getName());
pom.setVersion(project.getVersion().toString());
return pom;
}
use of org.gradle.api.artifacts.maven.MavenPom in project gradle by gradle.
the class BasePomFilterContainer method pom.
@Override
public MavenPom pom(String name, Action<? super MavenPom> configureAction) {
MavenPom pom = pom(name);
configureAction.execute(pom);
return pom;
}
use of org.gradle.api.artifacts.maven.MavenPom in project gradle by gradle.
the class BasePomFilterContainer method pom.
@Override
public MavenPom pom(Action<? super MavenPom> configureAction) {
MavenPom pom = getPom();
configureAction.execute(pom);
return pom;
}
use of org.gradle.api.artifacts.maven.MavenPom in project gradle by gradle.
the class BasePomFilterContainerTest method addFilter.
@Test
public void addFilter() {
MavenPom pom = pomFilterContainer.addFilter(TEST_NAME, publishFilterMock);
assertSame(pom, pomMock);
assertSame(pomMock, pomFilterContainer.pom(TEST_NAME));
assertSame(publishFilterMock, pomFilterContainer.filter(TEST_NAME));
}
Aggregations