Skip to content

Commit

Permalink
Merge pull request #26 from jfdenise/main
Browse files Browse the repository at this point in the history
Add link from README to online documentation
  • Loading branch information
jfdenise authored Nov 28, 2023
2 parents 39744c1 + b995775 commit 6b274ae
Show file tree
Hide file tree
Showing 4 changed files with 2,299 additions and 2,297 deletions.
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

0 comments on commit 6b274ae

Please sign in to comment.