mirror of
https://github.com/ethauvin/bld.git
synced 2025-04-25 08:17: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
|
||||
*/
|
||||
public void generateInto(PublishInfo info, DependencyScopes dependencies, File file)
|
||||
public static void generateInto(PublishInfo info, DependencyScopes dependencies, File file)
|
||||
throws FileUtilsErrorException {
|
||||
info_ = info;
|
||||
dependencies_ = dependencies;
|
||||
FileUtils.writeString(build(), file);
|
||||
var pomBuilder = new PomBuilder();
|
||||
pomBuilder.info_ = info;
|
||||
pomBuilder.dependencies_ = dependencies;
|
||||
FileUtils.writeString(pomBuilder.build(), file);
|
||||
}
|
||||
|
||||
private void addDependencies(Template t, Scope scope) {
|
||||
|
|
|
@ -106,7 +106,7 @@ public class TestPomBuilder {
|
|||
var deps = new DependencyScopes();
|
||||
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("""
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue