Alexander,

Until now, I've been successful at filtering the values, but no satisfying site is generated yet.

I have this in my pom:

<resources>
        <resource>
                <directory>src/site/xdoc</directory>
                <targetPath>generated-site</targetPath>
                <filtering>true</filtering>
        </resource>
</resources>

When I edit the generated files, the variables have been replaced. For example:

<a href="xxx-${pom.version}.zip">asd</a>

is translated into:

<a href="xxx-0.1-SNAPSHOT.zip">asd</a>

Here's the site-plugin config:
        
        <reporting>
          <plugins>
                <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-site-plugin</artifactId>
                        <configuration>
                                <xdocDirectory>
                                        /target/classes/generated-site
                                </xdocDirectory>
                        </configuration>
                </plugin>
        ....

The problem I have now is that, if I tell the site plug-in to use the generated xdocs, it says that file names clash. I guess specifying the xdocDirectory doesn't prevent the plugin to search into the convention-based src/site/xdoc directory...

Can you try that and tell me if you have better results?

Sebastien

Alexander Hars a écrit :
Hi,

If you are successful at doing that, could you post your solution?

Thanks,

Alexander

Sebastien Pennec wrote:
ok, I'll try that.

Thanks!

Edwin Punzalan a écrit :

filtering is the same as processing variables into their values.

What I'd do is create a folder where the unfiltered xdocs are placed, and then configure the resources plugin so that it will copy/filter those files to the folder that the assembly expects it to be.


Sebastien Pennec wrote:
Thanks for you answer, Edwin,

I don't really understand what's the common point between filtering files and inserting variables in xdoc files... To make a download page, I can surely make a filter, or just do so that the assembly plug-in copies the zip/tar files directly in the folder that the site will use as a download folder.

But if I want my download.xml xdoc file to make a link that automatically stays up to date by adding the right version number to the href, how do I do it?

Edwin Punzalan a écrit :

You can probably use a filtering plugin like the resource plugin to filter your files before running the site goal.


Sebastien Pennec wrote:
Hi,

I've been battling with xdoc and apt files for some hours now, and looking around on the web, too: I haven't found any example of xdoc/apt file with variable insertions in them.

I don't imagine this could _not_ be possible with Maven 2... actually, I don't need anything complicated, just some kind of ${project.version} variable that I could insert in a download link, for example.

Even in the Maven svn repository, people use xdoc or apt files without any variables.

Is it just impossible, or have I not searched enough?

Thanks :)

Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Sebastien Pennec
[EMAIL PROTECTED]

LOGBack: the generic, reliable, fast and flexible logging library for Java.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to