mirror of
https://github.com/ethauvin/bld.git
synced 2025-04-25 16:27:11 -07:00
Added method to generate a POM into a given file
This commit is contained in:
parent
17548f787c
commit
49243568c6
2 changed files with 526 additions and 473 deletions
|
@ -7,8 +7,11 @@ package rife.bld.publish;
|
|||
import rife.bld.dependencies.*;
|
||||
import rife.template.Template;
|
||||
import rife.template.TemplateFactory;
|
||||
import rife.tools.FileUtils;
|
||||
import rife.tools.StringUtils;
|
||||
import rife.tools.exceptions.FileUtilsErrorException;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
|
@ -121,6 +124,18 @@ public class PomBuilder {
|
|||
return StringUtils.stripBlankLines(t.getContent());
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a POM into the given file.
|
||||
*
|
||||
* @since 1.7.1
|
||||
*/
|
||||
public void generateInto(PublishInfo info, DependencyScopes dependencies, File file)
|
||||
throws FileUtilsErrorException {
|
||||
info_ = info;
|
||||
dependencies_ = dependencies;
|
||||
FileUtils.writeString(build(), file);
|
||||
}
|
||||
|
||||
private void addDependencies(Template t, Scope scope) {
|
||||
var scoped_dependencies = dependencies().scope(scope);
|
||||
if (!scoped_dependencies.isEmpty()) {
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue