Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tsundberg/publisher

A Maven plugin that read a html file and includes source code into it.
https://github.com/tsundberg/publisher

Last synced: 7 days ago
JSON representation

A Maven plugin that read a html file and includes source code into it.

Awesome Lists containing this project

README

        

# Publisher

A Maven plugin that reads an html file and format it properly for Wordpress. Source code and file trees can be included. The source code is html encoded.

## Usage

Add the following to your build section in your pom:

```xml



se.somath.publisher
maven-plugin
1.0.4



publish




```
Write your text in the file

./src/main/resources/index.html

Execute

mvn generate-resources

(or any maven goal that will include generate-resources)

The result is written to

./target/index.html

### ``

Add the tag `` to include source code

Three attributes are supported:

* root - the root directory that contains the files
* file - the relative name from the root
* method - the method signature of a specific method to include
* fileDisplayName - an alternative file name to display
* displayFileName - a boolean to turn off displaying the file name

An example is:

```xml

```

This would search for the file `src/main/files/RentStepdefs.java` from the relative root `./blog/` The filename would be displayed as `src/test/java/se/waymark/rentit/steps/RentStepdefs.java`

### ``

Add the tag `` to include a file tree

Two attributes are supported:

* root - the root directory that contains the file tree
* only-dirs - a boolean to indicate that only directories should be included

An example is:

```xml

```

This would include a file tree with all files available in the root.

## Feedback

Send me a mail at [email protected] if you have any questions or suggestions.