Re: Strange problem with maven site with snippet macro in multi module wars

2023-08-10 Thread Alex O'Ree
Quick update, i was able to confirm that the path doxia uses is relative to
the current working directory...i.e. the directory you call maven from. So
the above scenario doesn't appear possible currently. via [1], doxia uses
some kind of request base directory setting which is getting the cwd.

I also tried with a variety of different versions of maven site and the
skin i'm using.

I'm open to work arounds. ant to copy the /src/site files around perhaps?

[1]
https://github.com/apache/maven-doxia/blob/master/doxia-core/src/main/java/org/apache/maven/doxia/macro/snippet/SnippetMacro.java#L124

On Thu, Aug 10, 2023 at 8:18 PM Alex O'Ree  wrote:

> Ok strange problem, using maven site 3.12.0 (also tried 3.6.0)
>
> Project layout is like this
>
> /pom.xml <- root project
> /src/site/testfile/file1.json <- the snippet i want
> /project1 <- pom project only
> /project1/warmodule/pom.xml <- the project i'm generating a site for
> /project1/warmodule/src/site.xml <- usually stuff here
> /project1/warmodule/src/markdown/index.md <- file with the snippet macro
>
> the snippet macro points to file=../../src/site/testfile/file1.json
>
> if i build maven site from warmodule, the site works as expected, the
> contents of file1.json ends up in the snippet
>
> if i build maven site from either project1 or the root, it outputs an
> error message: "Error during retrieving content skip as ignoreDownloadError
> activated."
>
> I've tried a few different things to resolve this such as
> file=${project.basedir}../../src/site/testfile/file1.json
> which causes the error message in both scenarios
>
> I've also tried the maven pdf plugin and it also has the same behavior.
> This leads me to believe that maybe this is a doxia thing. I did try -X but
> there's no warnings or errors reported to console.
>
> Has anyone ran into this before?
>
>


Strange problem with maven site with snippet macro in multi module wars

2023-08-10 Thread Alex O'Ree
Ok strange problem, using maven site 3.12.0 (also tried 3.6.0)

Project layout is like this

/pom.xml <- root project
/src/site/testfile/file1.json <- the snippet i want
/project1 <- pom project only
/project1/warmodule/pom.xml <- the project i'm generating a site for
/project1/warmodule/src/site.xml <- usually stuff here
/project1/warmodule/src/markdown/index.md <- file with the snippet macro

the snippet macro points to file=../../src/site/testfile/file1.json

if i build maven site from warmodule, the site works as expected, the
contents of file1.json ends up in the snippet

if i build maven site from either project1 or the root, it outputs an error
message: "Error during retrieving content skip as ignoreDownloadError
activated."

I've tried a few different things to resolve this such as
file=${project.basedir}../../src/site/testfile/file1.json
which causes the error message in both scenarios

I've also tried the maven pdf plugin and it also has the same behavior.
This leads me to believe that maybe this is a doxia thing. I did try -X but
there's no warnings or errors reported to console.

Has anyone ran into this before?