Skip to content

Commit

Permalink
Fixes #377
Browse files Browse the repository at this point in the history
  • Loading branch information
Bullfrog666 authored Sep 6, 2023
1 parent c4744e4 commit 67cfd30
Show file tree
Hide file tree
Showing 45 changed files with 2,213 additions and 5,466 deletions.
2 changes: 1 addition & 1 deletion aadarchi-test-utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>system</artifactId>
<version>0.1.12-SNAPSHOT</version>
</parent>
<name>Aadarchi: test utilities</name>
<name>Aadarchi : test utilities</name>
<artifactId>aadarchi-test-utils</artifactId>
<description>Some test utilities dedicated to the improvement of Aadarchi quality.
Mainly contains tools allowing easy injection of Maven properties into tests</description>
Expand Down
194 changes: 97 additions & 97 deletions base/pom.xml
Original file line number Diff line number Diff line change
@@ -1,98 +1,98 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>system</artifactId>
<groupId>io.github.Riduidel.aadarchi</groupId>
<version>0.1.12-SNAPSHOT</version>
</parent>
<artifactId>base</artifactId>
<name>Aadarchi : Base module</name>
<description>Base module defining the various used interfaces, and some very useful implementations</description>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se-core</artifactId>
</dependency>
<dependency>
<groupId>com.structurizr</groupId>
<artifactId>structurizr-annotations</artifactId>
</dependency>
<dependency>
<groupId>com.structurizr</groupId>
<artifactId>structurizr-client</artifactId>
<exclusions>
<!-- Jackson-annotation is excluded because github-api requires a more recent one -->
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.structurizr</groupId>
<artifactId>structurizr-dsl</artifactId>
</dependency>
<dependency>
<groupId>com.structurizr</groupId>
<artifactId>structurizr-export</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>cdi-config-extension</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>markdown-to-asciidoc</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.10.0</version>
</dependency>
<dependency>
<groupId>com.pivovarit</groupId>
<artifactId>throwing-function</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>aadarchi-test-utils</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>system</artifactId>
<groupId>io.github.Riduidel.aadarchi</groupId>
<version>0.1.12-SNAPSHOT</version>
</parent>
<artifactId>base</artifactId>
<name>Aadarchi : Base module</name>
<description>Base module defining the various used interfaces, and some very useful implementations</description>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se-core</artifactId>
</dependency>
<dependency>
<groupId>com.structurizr</groupId>
<artifactId>structurizr-annotations</artifactId>
</dependency>
<dependency>
<groupId>com.structurizr</groupId>
<artifactId>structurizr-client</artifactId>
<exclusions>
<!-- Jackson-annotation is excluded because github-api requires a more recent one -->
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.structurizr</groupId>
<artifactId>structurizr-dsl</artifactId>
</dependency>
<dependency>
<groupId>com.structurizr</groupId>
<artifactId>structurizr-export</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>cdi-config-extension</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>MarkdownToAsciidoc</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.10.0</version>
</dependency>
<dependency>
<groupId>com.pivovarit</groupId>
<artifactId>throwing-function</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>aadarchi-test-utils</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package org.ndx.aadarchi.base.enhancers.scm;

import java.util.logging.Logger;

import javax.enterprise.inject.Instance;
import javax.inject.Inject;

import com.kodcu.asciidocfx.MarkdownToAsciidoc;
import com.structurizr.annotation.Component;
import com.structurizr.model.Element;
import com.structurizr.model.StaticStructureElement;
import org.apache.commons.io.IOUtils;
import org.apache.commons.vfs2.FileObject;
import org.apache.commons.vfs2.FileSystemManager;
import org.apache.commons.vfs2.filter.RegexFileFilter;
import org.apache.deltaspike.core.api.config.ConfigProperty;
import org.ndx.aadarchi.base.AgileArchitectureSection;
Expand All @@ -18,11 +16,8 @@
import org.ndx.aadarchi.base.utils.StructurizrUtils;
import org.ndx.aadarchi.base.utils.commonsvfs.FileObjectDetector;

import com.structurizr.annotation.Component;
import com.structurizr.model.Element;
import com.structurizr.model.StaticStructureElement;

import nl.jworks.markdown_to_asciidoc.Converter;
import javax.inject.Inject;
import java.util.logging.Logger;

/**
* Collect each model element readme and output them in generated elements folder
Expand Down Expand Up @@ -80,7 +75,7 @@ void writeReadmeFor(FileObject readme, Element element, OutputBuilder builder) {
// location
String readmeText = IOUtils.toString(cache.openStreamFor(readme), "UTF-8");
if (readme.getName().getExtension().toLowerCase().equals("md")) {
readmeText = Converter.convertMarkdownToAsciiDoc(readmeText);
readmeText = MarkdownToAsciidoc.convert(readmeText);
}
builder.writeToOutput(AgileArchitectureSection.code, element, this, Format.adoc, readmeText);
} finally {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package org.ndx.aadarchi.base.utils;

import com.kodcu.asciidocfx.MarkdownToAsciidoc;
import org.ndx.aadarchi.base.AgileArchitectureException;

import nl.jworks.markdown_to_asciidoc.Converter;

public class AsciidocProducer {
public static class UnableToGetAsciidocFrom extends AgileArchitectureException {

Expand All @@ -15,8 +14,7 @@ public UnableToGetAsciidocFrom(String message) {

private String asAsciidoc(String filename, String content) {
if(filename.endsWith(".md")) {
return Converter.convertMarkdownToAsciiDoc(
content);
return MarkdownToAsciidoc.convert(content);
} else if(filename.endsWith(".adoc")) {
return content;
} else {
Expand Down
2 changes: 1 addition & 1 deletion github-scm-handler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>markdown-to-asciidoc</artifactId>
<artifactId>MarkdownToAsciidoc</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

import java.io.IOException;
import java.util.Date;
import com.kodcu.asciidocfx.MarkdownToAsciidoc;

import org.kohsuke.github.GHIssueComment;
import org.ndx.aadarchi.base.enhancers.tickets.Comment;

import nl.jworks.markdown_to_asciidoc.Converter;

public class GitHubComment implements Comment {
private GHIssueComment source;

Expand All @@ -26,7 +25,7 @@ public Date getDate() {

@Override
public String getText() {
return Converter.convertMarkdownToAsciiDoc(source.getBody());
return MarkdownToAsciidoc.convert(source.getBody());
}

}
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
package org.ndx.aadarchi.github;

import java.io.IOException;
import java.util.Collection;
import java.util.Date;
import java.util.Optional;
import java.util.stream.Collectors;

import com.kodcu.asciidocfx.MarkdownToAsciidoc;
import org.kohsuke.github.GHIssue;
import org.ndx.aadarchi.base.enhancers.tickets.Comment;
import org.ndx.aadarchi.base.enhancers.tickets.Ticket;
import org.ndx.aadarchi.base.enhancers.tickets.TicketStatus;

import nl.jworks.markdown_to_asciidoc.Converter;
import java.io.IOException;
import java.util.Collection;
import java.util.Date;
import java.util.Optional;
import java.util.stream.Collectors;

public class GitHubTicket implements Ticket {

Expand All @@ -33,7 +32,7 @@ public String getTitle() {

@Override
public String getText() {
return Converter.convertMarkdownToAsciiDoc(source.getBody());
return MarkdownToAsciidoc.convert(source.getBody());
}

@Override
Expand Down
14 changes: 0 additions & 14 deletions markdown-to-asciidoc/CONTRIBUTING.adoc

This file was deleted.

50 changes: 0 additions & 50 deletions markdown-to-asciidoc/README.adoc

This file was deleted.

Loading

0 comments on commit 67cfd30

Please sign in to comment.