mirror of
https://github.com/ethauvin/bld.git
synced 2025-04-25 16:27:11 -07:00
Make PomBuilder.generateInto(File) static
This commit is contained in:
parent
49243568c6
commit
c933f16e0f
2 changed files with 6 additions and 5 deletions
|
@ -129,11 +129,12 @@ public class PomBuilder {
|
||||||
*
|
*
|
||||||
* @since 1.7.1
|
* @since 1.7.1
|
||||||
*/
|
*/
|
||||||
public void generateInto(PublishInfo info, DependencyScopes dependencies, File file)
|
public static void generateInto(PublishInfo info, DependencyScopes dependencies, File file)
|
||||||
throws FileUtilsErrorException {
|
throws FileUtilsErrorException {
|
||||||
info_ = info;
|
var pomBuilder = new PomBuilder();
|
||||||
dependencies_ = dependencies;
|
pomBuilder.info_ = info;
|
||||||
FileUtils.writeString(build(), file);
|
pomBuilder.dependencies_ = dependencies;
|
||||||
|
FileUtils.writeString(pomBuilder.build(), file);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addDependencies(Template t, Scope scope) {
|
private void addDependencies(Template t, Scope scope) {
|
||||||
|
|
|
@ -106,7 +106,7 @@ public class TestPomBuilder {
|
||||||
var deps = new DependencyScopes();
|
var deps = new DependencyScopes();
|
||||||
deps.scope(Scope.compile).include(new Dependency("com.uwyn.rife2", "rife2"));
|
deps.scope(Scope.compile).include(new Dependency("com.uwyn.rife2", "rife2"));
|
||||||
|
|
||||||
new PomBuilder().generateInto(new PublishInfo().name("the thing"), deps, temp);
|
PomBuilder.generateInto(new PublishInfo().name("the thing"), deps, temp);
|
||||||
|
|
||||||
assertEquals("""
|
assertEquals("""
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue