Advertisement
Guest User

Untitled

a guest
Nov 3rd, 2011
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.13 KB | None | 0 0
  1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  2. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  3. <modelVersion>4.0.0</modelVersion>
  4. <groupId>kam.albert.study</groupId>
  5. <artifactId>BasicSetup</artifactId>
  6. <packaging>war</packaging>
  7. <version>0.0.1-SNAPSHOT</version>
  8. <name>BasicSetup Maven Webapp</name>
  9. <url>http://maven.apache.org</url>
  10. <dependencies>
  11. <dependency>
  12. <groupId>org.glassfish</groupId>
  13. <artifactId>javax.faces</artifactId>
  14. <version>2.1.3</version>
  15. <scope>compile</scope>
  16. </dependency>
  17. </dependencies>
  18. <build>
  19. <finalName>BasicSetup</finalName>
  20. <pluginManagement>
  21. <plugins>
  22. <plugin>
  23. <groupId>org.apache.maven.plugins</groupId>
  24. <artifactId>maven-compiler-plugin</artifactId>
  25. <!-- http://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-using-different-jdk.html -->
  26. <configuration>
  27. <source>1.7</source>
  28. <target>1.7</target>
  29. <!-- if this is not set, then it'll use the java that runs eclipse
  30. Unable to locate the Javac Compiler in: C:\Program Files\Java\jre7\..\lib\tools.jar
  31. there are other solutions like : - changing the vm for running eclipse -
  32. change the default runtime jre to jdk path - use mvn jetty:run-forked (for
  33. new jetty plugin) - use fork (this is what we're doing) - see http://stackoverflow.com/questions/2222560/build-failed-question-maven-jre-or-jdk-problem -->
  34. <fork>true</fork>
  35. </configuration>
  36. </plugin>
  37.  
  38.  
  39. <!-- tomcat plugin dependencies http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/index.html -->
  40. <plugin>
  41. <groupId>org.apache.tomcat.maven</groupId>
  42. <artifactId>tomcat7-maven-plugin</artifactId>
  43. <version>2.0-SNAPSHOT</version>
  44. <executions>
  45. <execution>
  46. <id>tomcat7-run</id>
  47. <goals>
  48. <goal>exec-war-only</goal>
  49. </goals>
  50. <phase>package</phase>
  51. <configuration>
  52. <path>/</path>
  53. <tomcatConfigurationFilesDirectory>src/main/webapp/WEB-INF</tomcatConfigurationFilesDirectory>
  54. </configuration>
  55. </execution>
  56. </executions>
  57. </plugin>
  58.  
  59.  
  60. <!-- jetty seems to very buggy, check : http://stackoverflow.com/questions/7886035/could-not-find-factory-javax-faces-context-facescontextfactory
  61. http://stackoverflow.com/questions/7885874/jsf-welcome-file-not-recognized -->
  62. <!--
  63. be careful when running this since it wont show any error while running as embedded mode
  64. this can be a source of confusion where u modify things, but doesnt show
  65. up the changes + no errors, and it turns out you have more than 1 embedded jetty running,
  66. and you're accessing the old one
  67. http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin
  68.  
  69. more config options at http://radio.javaranch.com/balajidl/2007/11/27/1196176220918.html
  70.  
  71. <plugin>
  72. <groupId>org.mortbay.jetty</groupId>
  73. <artifactId>jetty-maven-plugin</artifactId>
  74. <configuration>
  75. <scanIntervalSeconds>10</scanIntervalSeconds>
  76. <webApp>
  77. <contextPath>/basicSetup</contextPath>
  78. </webApp>
  79. </configuration>
  80. </plugin>
  81. -->
  82. </plugins>
  83. </pluginManagement>
  84. </build>
  85.  
  86. <repositories>
  87. <repository>
  88. <id>jvnet-nexus-releases</id>
  89. <name>jvnet-nexus-releases</name>
  90. <url>https://maven.java.net/content/repositories/releases/</url>
  91. </repository>
  92. </repositories>
  93.  
  94. <pluginRepositories>
  95. <!--
  96. using tomcat 7 snapshot
  97. use tomcat7:run
  98. http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/snapshot-test.html
  99. -->
  100. <pluginRepository>
  101. <id>apache.snapshots</id>
  102. <name>Apache Snapshots</name>
  103. <url>http://people.apache.org/repo/m2-snapshot-repository</url>
  104. <releases>
  105. <enabled>false</enabled>
  106. </releases>
  107. <snapshots>
  108. <enabled>true</enabled>
  109. </snapshots>
  110. </pluginRepository>
  111. </pluginRepositories>
  112. </project>
  113.  
  114.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement