http://maven.apache.org/guides/getting-started/index.html#How%20do%20I%20use%20external%20dependencies?
Emmanuel devosc a écrit :
Hi, I would like to start using mvn, but I'm having problems getting started. my-webapp/ my-webapp/pom.xml my-webapp/src/main/java/mypackage/Hello.java my-webapp/src/main/resources my-webapp/src/main/webapp/hello.jsp my-webapp/src/main/webapp/images my-webapp/src/main/webapp/WEB-INF/web.xml Hello.java is dependent on javax.servlet my-webapp/pom.xml ------------------------------------------------------------------------------------------------------------------------------------ <project> <modelVersion>4.0.0</modelVersion> <groupId>com.mycompany.app</groupId> <artifactId>my-webapp</artifactId> <packaging>war</packaging> <version>1.0-SNAPSHOT</version> <name>Maven Webapp Archetype</name> <url>http://maven.apache.org</url> <build> <finalName>my-webapp</finalName> </build> </project> ------------------------------------------------------------------------------------------------------------------------------------ What's the easiest way to specify where the lib directories and which jars to include ? I'm trying to find something comparitive to ant's: ------------------------------------------------------------------------------------------------------------------------------------ <path id="compile.classpath"> <!-- Include all elements that Tomcat exposes to applications --> <pathelement location="${catalina.home}/common/classes"/> <fileset dir="${catalina.home}/common/endorsed"> <include name="*.jar"/> </fileset> <fileset dir="${catalina.home}/common/lib"> <include name="*.jar"/> </fileset> <pathelement location="${catalina.home}/shared/classes"/> <fileset dir="${catalina.home}/shared/lib"> <include name="*.jar"/> </fileset> </path> ------------------------------------------------------------------------------------------------------------------------------------ Assuming now that the above class dependencies are resolved, and mvn clean package creates the target ready to be deployed to Tomcat, how would this be achieved ? e.g. in ant there is something like: ------------------------------------------------------------------------------------------------------------------------------------ <deploy url="${manager.url}" username="${manager.username}" password="${manager.password}" path="${app.path}" localWar="file://${build.home}"/> ------------------------------------------------------------------------------------------------------------------------------------ I'm trying to work with jetspeed2, so what I did previously was to <copy> the war files to the jetspeed/WEB-INF/deploy directory instead of using the above <deploy>, so I would need to customize the install ? I was hoping to not neccessarily have to create an ant build.xml ? -- devosc --------------------------------------------------------------------- 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]
