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.5KB

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