(!)This is a temporary page dedicated to the maven2 plugin for xdoclet2. The information it contains might be innacurate and certainly subject to change.
Foreword
To use this plugin, you will need maven 2.0.1 or a more recent version. It will not work with 2.0.0, due to a bug in the plugin dependencies classloading. (See MNG-1804@jira)
This is based on Espen Amble Kolstad's contribution from XDOCLET-38@jira, so kudos to him.
It seems to me this plugin could be the nicest way to use xdoclet2, because you will not need to have 3 gazillion dependencies in your projects anymore. The only dependencies you'll have to specify will the the xdoclet-plugins you want to use - and they will not be in your project main dependencies, but in build/plugins/dependencies, so they're really isolated from your actual project.
Reading this document shouldn't prevent you from learning the basic maven usage. Read maven docs at http://maven.apache.org
Reading this document shouldn't prevent you from getting basic XDoclet2 knowledge.
Installation
If you only want to try and install the xdoclet2-maven2 plugin on your local machine, you can build and install it from source by running
or download the plugin jar from here and run the following:
where <path-to-file> is the path to the plugin jar you just downloaded.
... But it's probably better to:
Stay up-to-date
If you want to stay up-to-date while this plugin is being worked on, you should add this to your pom's project/pluginRepositories element:
Usage
To use the plugin, add the following to your pom: (of course, skip the <build> tag if you already have a build section)
Of course this is a sample. Please get to know XDoclet2 and how it generally works before complaining that this doesn't work. (this is real snippet used to build
xdoclet2 plugins). For real life usage you need to consult documentaton on plugins you
like to use
Note 1: all of this could potentially go to a parent pom's <pluginManagement> element. However, it seems MNG-1804@jira has not fixed this case, so you currently still need to specify the plugin dependencies in the child pom. See MNG-1703@jira
4 Comments
Hide/Show CommentsFeb 06, 2006
Glen Marchesani
These instructions worked for me with 2 addendums.
- I didn't do the "Installation" step and instead did the "Staying up to Date" method which automatically downloads and does the install
- I added the following repositories to my pom.xml so the various xdoclet plugins would be automatically downloaded. The need for 2 repositoies (one legacy and one default) is that the xdoclet plugins are in the old maven1 (aka legaxy) layout and the xdoclet plugin for maven uses the new maven 2 layout...
<repositories>
<repository>
<id>codehaus</id>
<url>http://dist.codehaus.org/</url>
<layout>default</layout>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>codehaus-legacy</id>
<url>http://dist.codehaus.org/</url>
<layout>legacy</layout>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
Feb 06, 2006
Glen Marchesani
Also because of the numerous things I tried before finding this solution I got some v3 POM's in my maven 2 repo which caused this config to not work. I would get errors relating to unable to find mojo and unable to resolve plugin. So this setup started working when I started from a fresh maven 2 cache which I did by removing c:\.m2 on my windows xp machine...
Mar 23, 2006
Anonymous
Im trying to generate EJB-Interfaces for my class using maven2 and xdoclet. My problem is tha maven always tells me that it can not find freemaker (generama needs it and the ejb plugin needs generama...) Can anyone help?
[ERROR] BUILD ERROR
[INFO] ---------------------------
[INFO] Failed to resolve artifact.
required artifacts missing:
freemarker:freemarker:jar:2.3
Apr 20, 2006
Anonymous
bit of a hack but you could add the missing dep to your local machine by
mvn -U install:install-file -Dfile=freemarker-2.3.6.jar -DgroupId=freemarker -DartifactId=freemarker -Dversion=2.3 -Dpackaging=jar -DgeneratePom=true