Re: XD2 maven2 plugin / problems destdir and xwork
"Marco Mistroni" <[email protected]> Thu, 12 Apr 2007 21:24:16 +0100
| Newsgroups | gmane.comp.java.xdoclet-plugins |
|---|---|
| Message-ID | <[email protected]> |
Hello Konstantin,
Ok i got it working (partially).. but now the war plugin fails because it
cannot find web.xml
what i did was to drop the destdir on both WebPlugin an dXWOrkXML plugin, so
that xdoclet will generate
both files in the target/generated-resources/xdoclet directory
then i added, as you were s uggested, this to the war plugin
<webResources>
<resource>
<directory>${project.build.directory
}/generated-resources/xdoclet</directory>
</resource>
</webResources>
however, when the war is generated, both files (web.xml and xwork.xml) end
up in the
main directory instead of WEB-INF or other directories......
mvn2 generates this directory
WebWorkWebApp-1.0-SNAPSHOT
|____META-INF
|____WEB-INF
web.xml
xwork.xml
problem is that it looks like when i call xwork plugin, it expects that the
generated-resources/xdoclet directory has already been created.
In fact, if in my pom.xml i change the destdir of the webplugin, the
xworkxmlPlugin fails all the time.
What shall i do?
- create via ant the generated-resources/xdoclet directory before calling my
xd2 mvn2 tasks?
- have xdoclet generate those flles where they are now and via an ant task
copy manually those files to the appropriate directory?
how are you solving this issue , did you encounter those problems?
attached is my pom.xml again
thanx again and regards
marco
<?xml version="1.0" encoding="UTF-8"?>
<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>WebWork</groupId>
<artifactId>WebWorkWebApp</artifactId>
<packaging>war</packaging>
<name>WebWorkWebApp</name>
<version>1.0-SNAPSHOT</version>
<url>http://maven.apache.org</url>
<build>
<resources>
<resource>
<directory>${project.build.directory
}/generated-resources/xdoclet</directory>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>AntPlugin</id>
<phase>generate-sources</phase>
<configuration>
<tasks>
<echo>Deleting stale web.xml</echo>
<delete
file="${basedir}/src/main/webapp/WEB-INF/web.xml"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>xdoclet</groupId>
<artifactId>maven2-xdoclet2-plugin</artifactId>
<executions>
<execution>
<id>generateSources</id>
<phase>process-classes</phase>
<goals>
<goal>xdoclet</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>xdoclet-plugins</groupId>
<artifactId>xdoclet-plugin-web</artifactId>
<version>1.0.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>xdoclet-plugins</groupId>
<artifactId>xdoclet-plugin-xwork</artifactId>
<version>1.0.4-SNAPSHOT</version>
</dependency>
</dependencies>
<configuration>
<configs>
<config>
<components>
<component>
<classname>org.xdoclet.plugin.web.WebPlugin
</classname>
<params>
<mergedir>file:${basedir}/src/merge/</mergedir>
</params>
</component>
</components>
</config>
<config>
<components>
<component>
<classname>org.xdoclet.plugin.xwork.XWorkXMLPlugin
</classname>
<params>
<filename>webapp-xwork.xml</filename>
<package>com.mm.webwork</package>
<extends>webwork-default</extends>
</params>
</component>
</components>
</config>
</configs>
</configuration>
<!-- <configuration>
<tasks>
<webdoclet
destDir="${basedir}/src/main/webapp/WEB-INF/"
mergeDir="${basedir}/metadata/web">
<fileset dir="${basedir}/src/main/java"/>
<deploymentdescriptor />
</webdoclet>
</tasks>
</configuration>
</execution>
</executions>-->
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.0</version>
<configuration>
<warName>SpringApp</warName>
<webResources>
<resource>
<directory>${project.build.directory
}/generated-resources/xdoclet</directory>
</resource>
</webResources>
<outputDirectory>${jbossDir}/server/default/deploy</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>opensymphony</groupId>
<artifactId>webwork</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>opensymphony</groupId>
<artifactId>xwork</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.0-rc1</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
<!--<dependency>
<groupId>springMVCAgencies</groupId>
<artifactId>springMVCBackend</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>-->
<dependency>
<groupId>velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.4-rc1</version>
</dependency>
<dependency>
<groupId>velocity-tools</groupId>
<artifactId>velocity-tools</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>velocity-tools</groupId>
<artifactId>velocity-tools-view</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
</project>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
xdoclet-plugins-interest mailing list
xdoclet-plugins-interest-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest