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

Add link from README to online documentation #26

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Include the `<discover-provisioning-info/>` element in the plugin configuration.

# WildFly Glow documentation

Work on online documentation is in progress.
WildFly Glow [documentation](http://docs.wildfly.org/wildfly-glow/).

# Steps to build the WildFly Glow command line

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,25 +92,16 @@ public void execute() throws MojoExecutionException, MojoFailureException {
UniverseResolver universeResolver = UniverseResolver.builder().addArtifactResolver(artifactResolver).build();
Map<Layer, Map<String, String>> rules = new TreeMap<>();
Set<String> ruleDescriptions = new TreeSet<>();
getRules("bare-metal", universeResolver, rules, ruleDescriptions);
Map<Layer, Map<String, String>> cloudRules = new TreeMap<>();
getRules("cloud", universeResolver, cloudRules, ruleDescriptions);

StringBuilder rulesBuilder = new StringBuilder();
rulesBuilder.append("## Support for WildFly " + FeaturePacks.getLatestVersion() + "\n\n");

rulesBuilder.append(buildTable("bare-metal", rules, false));
rulesBuilder.append(buildTable("cloud", cloudRules, false));

rulesBuilder.append("## Support for WildFly Preview " + FeaturePacks.getLatestVersion() + "\n\n");

rulesBuilder.append(buildTable("bare-metal", rules, true));
rulesBuilder.append(buildTable("cloud", cloudRules, true));

Properties properties = new Properties();
try (FileInputStream in = new FileInputStream(Paths.get(rulesPropertiesFile).toFile())) {
properties.load(in);
}

getRules("bare-metal", universeResolver, rules, ruleDescriptions);
Map<Layer, Map<String, String>> cloudRules = new TreeMap<>();
getRules("cloud", universeResolver, cloudRules, ruleDescriptions);

rulesBuilder.append("== [[glow.table.rules]]Rules descriptions\n");
rulesBuilder.append("[cols=\"1,2,1\"]\n");
rulesBuilder.append("|===\n");
Expand All @@ -129,6 +120,17 @@ public void execute() throws MojoExecutionException, MojoFailureException {
rulesBuilder.append("|" + val + "\n");
}
rulesBuilder.append("|===\n");

rulesBuilder.append("## Support for WildFly " + FeaturePacks.getLatestVersion() + "\n\n");

rulesBuilder.append(buildTable("bare-metal", rules, false));
rulesBuilder.append(buildTable("cloud", cloudRules, false));

rulesBuilder.append("## Support for WildFly Preview " + FeaturePacks.getLatestVersion() + "\n\n");

rulesBuilder.append(buildTable("bare-metal", rules, true));
rulesBuilder.append(buildTable("cloud", cloudRules, true));

Files.writeString(Paths.get(generatedFile), rulesBuilder.toString());
} catch (Exception ex) {
throw new MojoExecutionException(ex);
Expand All @@ -142,8 +144,8 @@ private String buildTable(String context, Map<Layer, Map<String, String>> rules,
rulesBuilder.append("\n#### Supported Galleon feature-packs \n");
Path provisioningXML = FeaturePacks.getFeaturePacks(null, context, preview);
ProvisioningConfig pConfig = ProvisioningXmlParser.parse(provisioningXML);
for(FeaturePackConfig c : pConfig.getFeaturePackDeps()) {
rulesBuilder.append("* " + c.getLocation() +" \n");
for (FeaturePackConfig c : pConfig.getFeaturePackDeps()) {
rulesBuilder.append("* " + c.getLocation() + " \n");
}
rulesBuilder.append("\n#### [[glow.table." + context + "]]Galleon layers and associated discovery rules\n");
rulesBuilder.append("[cols=\"25%,50%,25%\"]\n");
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ Jean-Francois Denise

include::intro/index.adoc[]
include::cli/index.adoc[]
include::rules.adoc[]
include::test-maven-plugin/index.adoc[]
include::rules.adoc[]
Loading
Loading