You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pom.xml 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <parent>
  6. <groupId>com.vaadin</groupId>
  7. <artifactId>vaadin-root</artifactId>
  8. <version>7.7.0-SNAPSHOT</version>
  9. </parent>
  10. <artifactId>vaadin-push</artifactId>
  11. <name>vaadin-push</name>
  12. <packaging>jar</packaging>
  13. <properties>
  14. </properties>
  15. <url>https://vaadin.com/</url>
  16. <description>Vaadin server push support</description>
  17. <dependencies>
  18. <!-- Atmosphere -->
  19. <dependency>
  20. <groupId>com.vaadin.external.atmosphere</groupId>
  21. <artifactId>atmosphere-runtime</artifactId>
  22. <version>${atmosphere.runtime.version}</version>
  23. </dependency>
  24. <dependency>
  25. <groupId>com.vaadin.external.atmosphere.client</groupId>
  26. <artifactId>jquery</artifactId>
  27. <version>${atmosphere.js.version}</version>
  28. <type>war</type>
  29. <scope>provided</scope>
  30. </dependency>
  31. </dependencies>
  32. <build>
  33. <plugins>
  34. <plugin>
  35. <artifactId>maven-antrun-plugin</artifactId>
  36. <executions>
  37. <execution>
  38. <id>default-cli</id>
  39. <phase>generate-resources</phase>
  40. <goals>
  41. <goal>run</goal>
  42. </goals>
  43. <!-- <inherited>false</inherited> -->
  44. <configuration>
  45. <target>
  46. <property name="jquery.unpack" location="${project.build.directory}/temp" />
  47. <property name="vaadinPush.js"
  48. location="${project.build.outputDirectory}/VAADIN/vaadinPush.debug.js" />
  49. <property name="templates.dir"
  50. location="${project.build.sourceDirectory}/../templates" />
  51. <!-- Unzip to temp dir -->
  52. <unzip
  53. src="${maven.dependency.com.vaadin.external.atmosphere.client.jquery.war.path}"
  54. dest="${jquery.unpack}">
  55. <patternset>
  56. <include name="**/jquery.atmosphere.js" />
  57. </patternset>
  58. <mapper type="flatten" />
  59. </unzip>
  60. <loadfile srcfile="${templates.dir}/jquery-1.11.0.js"
  61. property="jquery.js.contents" />
  62. <loadfile srcfile="${jquery.unpack}/jquery.atmosphere.js"
  63. property="jquery.atmosphere.js.contents" />
  64. <loadfile srcfile="${templates.dir}/vaadinPush.js.tpl"
  65. property="vaadinPush.js.contents">
  66. <filterchain>
  67. <replacetokens begintoken="@" endtoken="@">
  68. <token key="jquery.js" value="${jquery.js.contents}" />
  69. <token key="jquery.atmosphere.js" value="${jquery.atmosphere.js.contents}" />
  70. </replacetokens>
  71. </filterchain>
  72. </loadfile>
  73. <!-- Non-obfuscated version for debugging -->
  74. <echo file="${vaadinPush.js}">${vaadinPush.js.contents}</echo>
  75. </target>
  76. </configuration>
  77. </execution>
  78. <execution>
  79. <id>compresspush</id>
  80. <phase>compile</phase>
  81. <goals>
  82. <goal>run</goal>
  83. </goals>
  84. <configuration>
  85. <target>
  86. <property name="vaadinPush.debug.js"
  87. location="${project.build.outputDirectory}/VAADIN/vaadinPush.debug.js" />
  88. <property name="vaadinPush-min.js"
  89. location="${project.build.outputDirectory}/VAADIN/vaadinPush.debug-min.js" />
  90. <property name="vaadinPush.js"
  91. location="${project.build.outputDirectory}/VAADIN/vaadinPush.js" />
  92. <move file="${vaadinPush-min.js}" tofile="${vaadinPush.js}" />
  93. <!-- Gzipped versions -->
  94. <gzip src="${vaadinPush.debug.js}" destfile="${vaadinPush.debug.js}.gz" />
  95. <gzip src="${vaadinPush.js}" destfile="${vaadinPush.js}.gz" />
  96. </target>
  97. </configuration>
  98. </execution>
  99. </executions>
  100. </plugin>
  101. <plugin>
  102. <groupId>net.alchim31.maven</groupId>
  103. <artifactId>yuicompressor-maven-plugin</artifactId>
  104. <version>1.5.1</version>
  105. <executions>
  106. <execution>
  107. <id>minifyjs</id>
  108. <phase>process-resources</phase>
  109. <goals>
  110. <goal>compress</goal>
  111. </goals>
  112. </execution>
  113. </executions>
  114. <configuration>
  115. <sourceDirectory>${project.build.outputDirectory}/VAADIN</sourceDirectory>
  116. <includes>
  117. <include>vaadinPush.debug.js</include>
  118. </includes>
  119. <outputDirectory>${project.build.outputDirectory}/VAADIN</outputDirectory>
  120. </configuration>
  121. </plugin>
  122. <plugin>
  123. <groupId>org.apache.felix</groupId>
  124. <artifactId>maven-bundle-plugin</artifactId>
  125. <extensions>true</extensions>
  126. <configuration>
  127. <instructions>
  128. <Bundle-RequiredExecutionEnvironment>JavaSE-1.6</Bundle-RequiredExecutionEnvironment>
  129. <Export-Package>VAADIN</Export-Package>
  130. <Require-Bundle>com.vaadin.external.atmosphere.runtime;bundle-version="${atmosphere.runtime.version}";visibility:=reexport</Require-Bundle>
  131. </instructions>
  132. </configuration>
  133. <executions>
  134. <execution>
  135. <id>bundle-manifest</id>
  136. <phase>process-classes</phase>
  137. <goals>
  138. <goal>manifest</goal>
  139. </goals>
  140. </execution>
  141. </executions>
  142. </plugin>
  143. <plugin>
  144. <groupId>org.apache.maven.plugins</groupId>
  145. <artifactId>maven-jar-plugin</artifactId>
  146. <configuration>
  147. <archive>
  148. <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
  149. <index>false</index>
  150. <manifest>
  151. <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
  152. </manifest>
  153. </archive>
  154. </configuration>
  155. </plugin>
  156. </plugins>
  157. </build>
  158. </project>