Quantcast

Can't get image to display using confluence markup

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Can't get image to display using confluence markup

reselbob
Hi:

I am trying to get an image to display using Doxia's confluence module 1.1. When I run 'mvn site', the markup text renders, not the image.

Here is the markup:
--------------
Developer Notes Here!

!../images/hello-world!
--------------
Here are my POM settings:

        <plugin>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-site-plugin</artifactId>
                                         <version>2.0-beta-7</version>
                                        <dependencies>
                                                <dependency>
                                                        <groupId>org.apache.maven.doxia</groupId>
                                                        <artifactId>doxia-module-confluence</artifactId>
                                                        <version>1.1</version>
                                                </dependency>
                                        </dependencies>
                                        <configuration>
                                                <inputEncoding>UTF-8</inputEncoding>
                                                <outputEncoding>UTF-8</outputEncoding>
                                        </configuration>
                                </plugin>


        <plugin>
                                <artifactId>maven-shade-plugin</artifactId>
                                <version>1.2</version>
                                <executions>
                                        <execution>
                                                <phase>package</phase>
                                                <goals>
                                                        <goal>shade</goal>
                                                </goals>
                                                <configuration>
                                                        <finalName>${project.build.finalName}</finalName>
                                                        <createDependencyReducedPom>false</createDependencyReducedPom>
                                                        <keepDependenciesWithProvidedScope>true</keepDependenciesWithProvidedScope>
                                                        <transformers>
                                                                <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer" />
                                                        </transformers>
                                                        <artifactSet>
                                                                <includes>
                                                                        <include>org.apache.maven.doxia:doxia-sink-api</include>
                                                                        <include>org.apache.maven.doxia:doxia-logging-api</include>
                                                                </includes>
                                                        </artifactSet>
                                                </configuration>
                                        </execution>
                                </executions>
                        </plugin>

Thanks in advance for any help!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't get image to display using confluence markup

reselbob
PS:

!../images/hello-world!

Should be:

!../images/hello-world.jpg!

Sorry for the typo


reselbob wrote
Hi:

I am trying to get an image to display using Doxia's confluence module 1.1. When I run 'mvn site', the markup text renders, not the image.

Here is the markup:
--------------
Developer Notes Here!

!../images/hello-world!
--------------
Here are my POM settings:

        <plugin>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-site-plugin</artifactId>
                                         <version>2.0-beta-7</version>
                                        <dependencies>
                                                <dependency>
                                                        <groupId>org.apache.maven.doxia</groupId>
                                                        <artifactId>doxia-module-confluence</artifactId>
                                                        <version>1.1</version>
                                                </dependency>
                                        </dependencies>
                                        <configuration>
                                                <inputEncoding>UTF-8</inputEncoding>
                                                <outputEncoding>UTF-8</outputEncoding>
                                        </configuration>
                                </plugin>


        <plugin>
                                <artifactId>maven-shade-plugin</artifactId>
                                <version>1.2</version>
                                <executions>
                                        <execution>
                                                <phase>package</phase>
                                                <goals>
                                                        <goal>shade</goal>
                                                </goals>
                                                <configuration>
                                                        <finalName>${project.build.finalName}</finalName>
                                                        <createDependencyReducedPom>false</createDependencyReducedPom>
                                                        <keepDependenciesWithProvidedScope>true</keepDependenciesWithProvidedScope>
                                                        <transformers>
                                                                <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer" />
                                                        </transformers>
                                                        <artifactSet>
                                                                <includes>
                                                                        <include>org.apache.maven.doxia:doxia-sink-api</include>
                                                                        <include>org.apache.maven.doxia:doxia-logging-api</include>
                                                                </includes>
                                                        </artifactSet>
                                                </configuration>
                                        </execution>
                                </executions>
                        </plugin>

Thanks in advance for any help!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't get image to display using confluence markup

Lukas Theussl-4

Are you sure it shouldn't be

!images/hello-world.jpg!

? ie is your confluence source document really one level below the images/ folder,
after being processed by Maven?  Check the directory structure in the target/
folder since Maven copies resources differently.

HTH,
-Lukas


reselbob wrote:

> PS:
>
> !../images/hello-world!
>
> Should be:
>
> !../images/hello-world.jpg!
>
> Sorry for the typo
>
>
>
> reselbob wrote:
>> Hi:
>>
>> I am trying to get an image to display using Doxia's confluence module
>> 1.1. When I run 'mvn site', the markup text renders, not the image.
>>
>> Here is the markup:
>> --------------
>> Developer Notes Here!
>>
>> !../images/hello-world!
>> --------------
>> Here are my POM settings:
>>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-site-plugin</artifactId>
>> <version>2.0-beta-7</version>
>> <dependencies>
>> <dependency>
>> <groupId>org.apache.maven.doxia</groupId>
>> <artifactId>doxia-module-confluence</artifactId>
>> <version>1.1</version>
>> </dependency>
>> </dependencies>
>> <configuration>
>> <inputEncoding>UTF-8</inputEncoding>
>> <outputEncoding>UTF-8</outputEncoding>
>> </configuration>
>> </plugin>
>>
>>
>> <plugin>
>> <artifactId>maven-shade-plugin</artifactId>
>> <version>1.2</version>
>> <executions>
>> <execution>
>> <phase>package</phase>
>> <goals>
>> <goal>shade</goal>
>> </goals>
>> <configuration>
>> <finalName>${project.build.finalName}</finalName>
>> <createDependencyReducedPom>false</createDependencyReducedPom>
>>
>> <keepDependenciesWithProvidedScope>true</keepDependenciesWithProvidedScope>
>> <transformers>
>> <transformer
>> implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer"
>> />
>> </transformers>
>> <artifactSet>
>> <includes>
>> <include>org.apache.maven.doxia:doxia-sink-api</include>
>> <include>org.apache.maven.doxia:doxia-logging-api</include>
>> </includes>
>> </artifactSet>
>> </configuration>
>> </execution>
>> </executions>
>> </plugin>
>>
>> Thanks in advance for any help!
>>
>>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't get image to display using confluence markup

reselbob
I will check. But, still I am mystified as to why the markup is rendering, and not the image, or at the least the browser's broken link or unknown file icon.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't get image to display using confluence markup

Lukas Theussl-4

If my suspicion is correct you simply have a wrong relative path from the html
file generated by maven to the image resource. The html renders correctly, only
the image is not found.

-Lukas


reselbob wrote:
> I will check. But, still I am mystified as to why the markup is rendering,
> and not the image, or at the least the browser's broken link or unknown file
> icon.
>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't get image to display using confluence markup

reselbob
Hi Lukas:

I really appreciate that you are taking the time to help me with my problem.

I can access the image as a link using the Confluence hyper-link markup, like so:

[Click here to see image|../images/hello-world.jpg]

The markup shown above renders the <href> HTML properly.

So, it seems to me that the image can be found. It appears that the parser is not respecting the exclamation point markup that Confluence uses for image display.

Tell me please, have you been successful getting images to display using Confluence markup? If so, can you pass me one of your Maven projects that has images displaying via Confluence markup?

Again, thanks for taking the time to help me out with my problem.

Bob

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't get image to display using confluence markup

Lukas Theussl-4

Bob,

Please specify exactly what your problem is, the example you quote below is
different from the one we talked about previously.

Before it was

!../images/hello-world.jpg!

ie a simple figure, now you want

[Click here to see image|../images/hello-world.jpg]

ie a figure as a link. I wouldn't expect the latter to work with our confluence
parser but I haven't tested it yet. There are some confluence examples in the test
resources of doxia-site-renderer [1], just run 'mvn test' and check the results in
target/output/confluence/.

Otherwise, the best thing to do is to create a jira ticket and attach a small
reproducible test case, quoting exactly the expected result vs the actual one.

Cheers,
-Lukas

[1]
https://svn.apache.org/repos/asf/maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/



reselbob wrote:

> Hi Lukas:
>
> I really appreciate that you are taking the time to help me with my problem.
>
> I can access the image as a link using the Confluence hyper-link markup,
> like so:
>
> [Click here to see image|../images/hello-world.jpg]
>
> The markup shown above renders the <href> HTML properly.
>
> So, it seems to me that the image can be found. It appears that the parser
> is not respecting the exclamation point markup that Confluence uses for
> image display.
>
> Tell me please, have you been successful getting images to display using
> Confluence markup? If so, can you pass me one of your Maven projects that
> has images displaying via Confluence markup?
>
> Again, thanks for taking the time to help me out with my problem.
>
> Bob
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't get image to display using confluence markup

reselbob
I am not doing a good job of communicating. Please forgive me.

I was following up on your suggestion to check image pathing. What I am saying is that when I use the Confluence markup structure for hypertext, [HREF SOURCE HERE]  and I use the image path as the the href source, I CAN access the image as a hyper text link. Thus, I am confirming doxia is parsing the "bracket" markup as an href properly and that the image can be found in the file system.

However, when I use the Confluence image exclamation point markup structure, !IMAGE SOURCE HERE!, all that renders is the markup structure text verbatim.

Thus,

!../images/hello-world.jpg!

renders output on the web page as

!../images/hello-world.jpg!

not



I hope I am being clearer. I'd really hate to be wasting your time due to my inability to express my problem properly in writing.

Again, thanks!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't get image to display using confluence markup

reselbob

I looked at the tests. Based on a fast perusal of doxia\doxia-site-renderer\src\test\resources\site\confluence\confluence\figure.confluence and the associated output, doxia\doxia-site-renderer\target\output\confluence\figure.html, you all seem to support the exclamation point markup for images in doxia-site-renderer 1.1.2-SNAPSHOT.

Tell me please, do you know, is image markup support special to 1.1.2-SNAPSHOT or is it supported in prior versions?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't get image to display using confluence markup

Lukas Theussl-4

found it: http://jira.codehaus.org/browse/DOXIA-182

so image support was added in doxia 1.1. You should try site-plugin-2.1-SNAPSHOT
which uses doxia 1.1.

HTH,
-Lukas


PS Here are all the confluence issues in the changelog:
http://jira.codehaus.org/browse/DOXIA/component/12000?selected=com.atlassian.jira.plugin.system.project:component-changelog-panel


reselbob wrote:

>
> I looked at the tests. Based on a fast perusal of
> doxia\doxia-site-renderer\src\test\resources\site\confluence\confluence\figure.confluence
> and the associated output,
> doxia\doxia-site-renderer\target\output\confluence\figure.html, you all seem
> to support the exclamation point markup for images in doxia-site-renderer
> 1.1.2-SNAPSHOT.
>
> Tell me please, do you know, is image markup support special to
> 1.1.2-SNAPSHOT or is it supported in prior versions?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't get image to display using confluence markup

reselbob
Thanks! I will.

However, our company policy is to not use SNAPSHOTs in general deployment.

(We are working on pushing code/project commentary down to the labor of the developer using Doxia. Thus, a given project's dependencies overall needs to not use SNAPSHOTs)

Tell me please, when do you think that site render will go be de-SNAPSHOT.

Lukas, again thanks! Your attention is proving to be invaluable.

Bob
NiS
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't get image to display using confluence markup

NiS
This post has NOT been accepted by the mailing list yet.
In reply to this post by Lukas Theussl-4
What is the fix? I have the same pb but don't understand the solution...
Loading...