Hi all, Thanks to Lukas - I've made a books/ sub-project, and that has resolved the problem with iterating through all subprojects with the doxia:render-books command.
However, I still am not getting the books/target/generated-site/[latex|pdf|rtf] directories being copied across to the final site in the mvn site:site command or site:stage command, and now that books/ is in its own subdirectory, the books/target/generated-site/xdoc is being interpreted locally within the books/ directory but not being moved to the main (top-level) target/site or target/staging. How do I bring all these docs together, please? I'd be really happy even if the latex|pdf|rtf directories just got copied to the top-level target/site or target/staging directory. Thanks very much! :) On Feb 11, 2008 12:56 PM, Lukas Theussl <[EMAIL PROTECTED]> wrote: > I guess the best practice would be to put the book stuff into a separate > sub-project. If you have modules defined, the configuration will apply > to all of them. > > HTH, > -Lukas > > > Allyson Lister wrote: > > Hi all, > > > > Just one more question directly relating to this. > > > > I have put the doxia plugin code into my real project now, which has > > sub-modules. However, there are only books in the parent/top-level > > directory, and not in any of the sub-modules. Yet, when I run "mvn > > doxia:render-books", it tries to find my src/books directory in each of > > these sub-modules. How do I turn this off? I can comment out my > <modules> > > element, but that doesn't seem like the most useful way to do it. > > > > I did search the maven users list, and found this: > > > http://www.nabble.com/Exclude-modules-from-site-td7286361s177.html#a7486791 > > > > But it doesn't seem to be exactly what I need. I need to turn off doxia > > looking in *any* of my subdirectories, as so: > > > > myproject/ > > src/books > > src/site/ > > sub-project1/ > > sub-project2/ > > > > Sub-projects 1 and 2 don't have any site or books directories, but doxia > > throws an error as it assumes from this configuration that each of my > > sub-projects should also have a src/books/apt/mybook directory (this > > configuration is in my parent pom.xml only): > > > > <plugin> > > <groupId>org.apache.maven.doxia</groupId> > > <artifactId>doxia-maven-plugin</artifactId> > > <version>1.0-alpha-10</version> > > [...] > > <configuration> > > <books> > > <book> > > <directory>src/books/apt/mybook</directory> > > > <descriptor>src/books/mybook.xml</descriptor> > > [...] > > > > Any help would be appreciated! > > > > Thanks :) Allyson > > > > On Feb 10, 2008 9:58 PM, Allyson Lister <[EMAIL PROTECTED]> > > wrote: > > > > > >>You're a star, Lukas! That's solved it! > >> > >>I never would have guessed that - I wonder why I had the > pluginManagement > >>in the first place? > >> > >>thanks very much, > >>Allyson > >> > >> > >>On Feb 10, 2008 6:55 PM, Lukas Theussl <[EMAIL PROTECTED]> wrote: > >> > >> > >>>Remove the <pluginManagement>, just > >>> > >>> <build> > >>> <plugins> > >>> <plugin> > >>> <groupId>org.apache.maven.doxia</groupId> > >>> <artifactId>doxia-maven-plugin</artifactId> > >>> <version>1.0-alpha-10</version> > >>> ... > >>> </plugin> > >>> </plugins> > >>> </build> > >>> > >>>HTH, > >>>-Lukas > >>> > >>> > >>>Allyson Lister wrote: > >>> > >>>>Hi all, > >>>> > >>>>I'm having a little problem getting my maven project to build a doxia > >>> > >>>book. > >>> > >>>>I've searched on the nabble version of this mailing list, but haven't > >>> > >>>found > >>> > >>>>a post similar to this, so here goes. > >>>> > >>>>I'm using maven 2.0.7 with java 1.5. I'm running on ubuntu gutsy. > >>>> > >>>>To simplify the explanation a bit, I have generated an empty project > >>> > >>>using > >>> > >>>>the following command: > >>>> > >>>>mvn archetype:create -DgroupId=testapp -DartifactId=testapp > >>>> > >>>>With this empty project, I added the following book at the top-level > >>> > >>>of the > >>> > >>>>project in the src/books directory: > >>>> > >>>> $ l src/books > >>>>total 8 > >>>>drwxr-xr-x 2 user user 4096 2008-02-10 17:50 bookname/ > >>>>-rw-r--r-- 1 user user 1273 2008-02-10 17:50 bookname.xml > >>>> > >>>>And I've added a bit to the default (generated) pom.xml. The full > >>> > >>>pom.xml is > >>> > >>>>shown below. > >>>> > >>>><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi=" > >>>>http://www.w3.org/2001/XMLSchema-instance" > >>>> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > >>>>http://maven.apache.org/maven-v4_0_0.xsd"> > >>>> <modelVersion>4.0.0</modelVersion> > >>>> <groupId>testapp</groupId> > >>>> <artifactId>testapp</artifactId> > >>>> <packaging>jar</packaging> > >>>> <version>1.0-SNAPSHOT</version> > >>>> <name>testapp</name> > >>>> <url>http://maven.apache.org</url> > >>>> <dependencies> > >>>> <dependency> > >>>> <groupId>junit</groupId> > >>>> <artifactId>junit</artifactId> > >>>> <version>3.8.1</version> > >>>> <scope>test</scope> > >>>> </dependency> > >>>> </dependencies> > >>>> <build> > >>>> <!--<defaultGoal>install</defaultGoal>--> > >>>> <pluginManagement> > >>>> <plugins> > >>>> <plugin> > >>>> <groupId>org.apache.maven.doxia</groupId> > >>>> <artifactId>doxia-maven-plugin</artifactId> > >>>> <version>1.0-alpha-10</version> > >>>> <executions> > >>>> <execution> > >>>> <phase>pre-site</phase> > >>>> <goals> > >>>> <goal>render-books</goal> > >>>> </goals> > >>>> </execution> > >>>> </executions> > >>>> <configuration> > >>>> <books> > >>>> <book> > >>>> > >>><directory>src/books/fuge-xsd</directory> > >>> > >>>> <descriptor>src/books/fuge-xsd.xml > >>>></descriptor> > >>>> <formats> > >>>> <format> > >>>> <id>latex</id> > >>>> </format> > >>>> <format> > >>>> <id>xdoc</id> > >>>> </format> > >>>> <format> > >>>> <id>pdf</id> > >>>> </format> > >>>> <format> > >>>> <id>rtf</id> > >>>> </format> > >>>> </formats> > >>>> </book> > >>>> </books> > >>>> </configuration> > >>>> </plugin> > >>>> </plugins> > >>>> </pluginManagement> > >>>> </build> > >>>></project> > >>>> > >>>> > >>>>When I run > >>>> > >>>>mvn doxia:render-books, I get the following error: > >>>> > >>>> $ mvn doxia:render-books > >>>>[INFO] Scanning for projects... > >>>>[INFO] Searching repository for plugin with prefix: 'doxia'. > >>>>[INFO] > >>>> > >>> > > >>>------------------------------------------------------------------------ > >>> > >>>>[ERROR] BUILD ERROR > >>>>[INFO] > >>>> > >>> > > >>>------------------------------------------------------------------------ > >>> > >>>>[INFO] The plugin 'org.apache.maven.plugins:maven-doxia-plugin' does > >>> > >>>not > >>> > >>>>exist or no valid version could be found > >>>>[INFO] > >>>> > >>> > > >>>------------------------------------------------------------------------ > >>> > >>>>[INFO] For more information, run Maven with the -e switch > >>>>[INFO] > >>>> > >>> > > >>>------------------------------------------------------------------------ > >>> > >>>>[INFO] Total time: < 1 second > >>>>[INFO] Finished at: Sun Feb 10 17:50:56 GMT 2008 > >>>>[INFO] Final Memory: 1M/12M > >>>>[INFO] > >>>> > >>> > > >>>------------------------------------------------------------------------ > >>> > >>>> > >>>>You'll notice that maven is looking for "maven-doxia-plugin" as part > >>> > >>>of " > >>> > >>>>org.apache.maven.plugins", when doxia (as is stated in the pom.xml) is > >>> > >>>in > >>> > >>>>the doxia-maven-plugin as part of org.apache.maven.doxia. > >>>> > >>>>Can anyone help me please by explaining this behavior, and perhaps > >>>>suggesting a fix? I've been looking, but haven't found anyone with a > >>> > >>>similar > >>> > >>>>problem (or maybe it's just that my google search term skills aren't > >>> > >>>very > >>> > >>>>good) > >>>> > >>>>Thanks very much! > >>>> > >>>>Allyson > >>>> > >>> > >>>--------------------------------------------------------------------- > >>>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] > > -- Thanks, Allyson :) Allyson Lister Research Associate Centre for Integrated Systems Biology for Ageing and Nutrition Newcastle University http://www.cisban.ac.uk School of Computing Science Newcastle University Newcastle upon Tyne, NE1 7RU