Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for run arguments #4

Merged
merged 10 commits into from
Aug 17, 2023
15 changes: 15 additions & 0 deletions src/main/java/rife/bld/publish/PomBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
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;

/**
Expand Down Expand Up @@ -121,6 +124,18 @@ public String build() {
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)
ethauvin marked this conversation as resolved.
Show resolved Hide resolved
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()) {
Expand Down
Loading