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 8.0KB

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