your projects pom.xml will have a directory specifying the sourcedir <properties> <jsp.precompilation.java>${pom.basedir}/../src/main/java</jsp.precomilcation.java> .......... </properties>
then in maven.xml your javac task will use the predefined jsp.precompilation.java property.. <ant:javac srcdir="${jsp.precompilation.java}" classpathref="jsp.precompilation.classpath" destdir="${jsp.precompilation.webapp}/WEB-INF/classes" deprecation="on"/> HTH Martin ______________________________________________ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > Date: Sat, 7 Mar 2009 17:11:23 -0400 > From: mansou...@yahoo.com > To: users@maven.apache.org > Subject: war:war not including src/main/java > > I am facing this problem where maven is not including the sources in > src/main/java. > With jetty:run on the develpoment everthing is fine. > But, when I create the war, the directory is not included. > > <?xml version="1.0"?> > <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>com.mysite</groupId> > <artifactId>website</artifactId> > <packaging>war</packaging> > <version>1.0-SNAPSHOT</version> > <name>website Maven Webapp</name> > <url>http://maven.apache.org</url> > <build> > <finalName>website</finalName> > <plugins> > <plugin> > <groupId>org.mortbay.jetty</groupId> > <artifactId>maven-jetty-plugin</artifactId> > <configuration> > <contextPath>/</contextPath> > <scanIntervalSeconds>1</scanIntervalSeconds> > </configuration> > </plugin> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-war-plugin</artifactId> > <version>2.0</version> > </plugin> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-compiler-plugin</artifactId> > <configuration> > <source>1.5</source> > <target>1.5</target> > </configuration> > </plugin> > </plugins> > </build> > <dependencies> > <dependency> > <groupId>opensymphony</groupId> > <artifactId>sitemesh</artifactId> > <version>2.3</version> > </dependency> > <dependency> > <groupId>javax.servlet</groupId> > <artifactId>servlet-api</artifactId> > <version>2.3</version> > <scope>provided</scope> > </dependency> > <dependency> > <groupId>javax.mail</groupId> > <artifactId>mail</artifactId> > <version>1.4.2</version> > </dependency> > <dependency> > <groupId>junit</groupId> > <artifactId>junit</artifactId> > <version>4.5</version> > <scope>test</scope> > </dependency> > </dependencies> > </project> > > > I don't know what 's going on. Any advice ? > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > _________________________________________________________________ Windows Liveā¢: Life without walls. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_032009