-
Notifications
You must be signed in to change notification settings - Fork 122
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
Maven Site does not work with .adoc where dependency depends from gem like ditaa extension #168
Comments
This is a know issue realted to this #160. The thing is that the site module is a completely different component running under doxia API and we haven't figured out a nice way to pass configurations parameters to the site plugin. Let's awaken the beast again and continue the conversation on the other side. |
There is actually a way to work around this problem when using AsciidoctorJ 1.5.3.2: package foo.bar;
import org.asciidoctor.Asciidoctor;
import org.asciidoctor.extension.spi.ExtensionRegistry;
public class AsciidoctorDiagramConfigurator implements ExtensionRegistry {
@Override
public void register(Asciidoctor asciidoctor) {
asciidoctor.requireLibrary("asciidoctor-diagram");
}
} Then configure it as a service implementation by adding a file Then you have to configure the site plugin to use this artifact: <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>1.5.2</version>
</dependency>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj</artifactId>
<version>1.5.3.2</version>
</dependency>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj-diagram</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>foo.bar</groupId>
<artifactId>asciidoctor-site-diagram-activator</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</plugin> Finally in your document ensure that the diagrams get generated to the correct directories:
|
I somehow got the imagesoutdir wrong in my last comment, have to recheck how it has to be. |
Thanks for this info, Robert!
|
Just retested and there was an error in the
|
Another point: |
It will be possible to specify requires in version 1.5.3 of the plugin. |
…or#168 & asciidoctor#160 enable configuratino for site parser - rewrite Maven Site parser to make more organized and extensible - pass AsciiDoc configuration in Maven Site plugin to Asciidoctor API - enhance Maven Site integration test - add custom template - add include - add source highlighting - make validation code compatible with Java 6 - enable integration tests on Travis - remove unused legacy site module
…or#168 & asciidoctor#160 enable configuration for site parser - rewrite Maven Site parser to make more organized and extensible - pass AsciiDoc configuration in Maven Site plugin to Asciidoctor API - enhance Maven Site integration test - add custom template - add include - add source highlighting - make validation code compatible with Java 6 - enable integration tests on Travis - remove unused legacy site module
…or#168 & asciidoctor#160 enable configuration for site parser - rewrite AsciidoctorParser (used by Maven Site Plugin) to make it more organized and extensible - pass AsciiDoc configuration defined in Maven Site plugin to the Asciidoctor API - enhance Maven Site integration test - add custom template - add include - add source highlighting - make validation code compatible with Java 6 - enable integration tests on Travis CI - remove unused legacy site module - fix license headers - minor cleanups
…or#168 & asciidoctor#160 enable configuration for site parser - rewrite AsciidoctorParser (used by Maven Site Plugin) to make it more organized and extensible - pass AsciiDoc configuration defined in Maven Site plugin to the Asciidoctor API - enhance Maven Site integration test - add custom template - add include - add source highlighting - make validation code compatible with Java 6 - enable integration tests on Travis CI - remove unused legacy site module - fix license headers - minor cleanups
Once version 1.5.3 of the plugin is out, you'll be able to do the following: <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version> <!-- 3.4 also works -->
<configuration>
<asciidoc>
<requires>
<require>asciidoctor-diagram</require>
</requires>
</asciidoc>
</configuration>
<dependencies>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>1.5.3</version>
</dependency>
</dependencies>
</plugin> |
…or#168 & asciidoctor#160 enable configuration for site parser - rewrite AsciidoctorParser (used by Maven Site Plugin) to make it more organized and extensible - specify baseDir by default when invoking Asciidoctor API - pass AsciiDoc configuration defined in Maven Site plugin to the Asciidoctor API - API options (e.g., templateDir) - Ruby options (e.g., requires) - AsciiDoc attributes (e.g., icons=font) - enhance Maven Site integration test - add custom template - add include - add source highlighting - make validation code compatible with Java 6 - enable integration tests on Travis CI - remove unused legacy site module - fix license headers - minor cleanups
…or#168 & asciidoctor#160 enable configuration for site parser - rewrite AsciidoctorParser (used by Maven Site Plugin) to make it more organized and extensible - specify baseDir by default when invoking Asciidoctor API - pass AsciiDoc configuration defined in Maven Site plugin to the Asciidoctor API - API options (e.g., templateDir) - Ruby options (e.g., requires) - AsciiDoc attributes (e.g., icons=font) - enhance Maven Site integration test - add custom template - add include - add source highlighting - make validation code compatible with Java 6 - enable integration tests on Travis CI and Appveyor - remove unused legacy site module - fix license headers - minor cleanups
…or#168 & asciidoctor#160 enable configuration for site parser - rewrite AsciidoctorParser (used by Maven Site Plugin) to make it more organized and extensible - specify baseDir by default when invoking Asciidoctor API - pass AsciiDoc configuration defined in Maven Site plugin to the Asciidoctor API - API options (e.g., templateDir) - Ruby options (e.g., requires) - AsciiDoc attributes (e.g., icons=font) - enhance Maven Site integration test - add custom template - add include - add source highlighting - make validation code compatible with Java 6 - enable integration tests on Travis CI and Appveyor - remove unused legacy site module - fix license headers - minor cleanups
Is there anything special to do to make it work? My site-plugin configuration is the following (with asciidoctor-maven-plugin:1.5.3-SNAPSHOT):
Still when I try to create a website, maven tells me:
|
Hi Petar! yes, you also need to add the maven dependency to asciidoctorj-diagram: <dependencies>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>${asciidoctor.version}</version>
</dependency>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj-diagram</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>${wagon.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh-common</artifactId>
<version>${wagon.version}</version>
</dependency>
</dependencies> The Cheers |
I see... I added the
But I can't find this |
Sorry, my bad - I had it misconfigured. It works now |
👍 Am Samstag, 19. Dezember 2015 schrieb Petar Tahchiev :
|
…or#168 & asciidoctor#160 enable configuration for site parser - rewrite AsciidoctorParser (used by Maven Site Plugin) to make it more organized and extensible - specify baseDir by default when invoking Asciidoctor API - pass AsciiDoc configuration defined in Maven Site plugin to the Asciidoctor API - API options (e.g., templateDir) - Ruby options (e.g., requires) - AsciiDoc attributes (e.g., icons=font) - enhance Maven Site integration test - add custom template - add include - add source highlighting - make validation code compatible with Java 6 - enable integration tests on Travis CI and Appveyor - remove unused legacy site module - fix license headers - minor cleanups
Hi, Just for the record:
Full working example is:
Regarding step 3: I think this should be set by the doxia-asciidoc adapter, the same way it will also disable TOC and other stuff. |
Maven Site does not work with .adoc where dependency depends from gem like ditaa extension
I try to generate a maven site a .adoc with dita.
When I used asciidoctor-maven-plugin directly with .adoc, it works but not with the maven-site.
To reproduce the problem take this sample
https://github.com/asciidoctor/asciidoctor-maven-examples/tree/master/asciidoctor-diagram-example
add in your pom.xml
and copy src/docs/asciidoc into src/site/asciidoc .
You will see
I think the problem is the maven-site-plugin does not know the dependency of the gem but I can't add the dependency of the gems (maven can't download) or add an equivalent of
Tell me is a way to configure the maven-site to succeed to generate site or if it is a bug.
The text was updated successfully, but these errors were encountered: