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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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>8.1-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. </dependency>
  23. <dependency>
  24. <groupId>com.vaadin.external.atmosphere.client</groupId>
  25. <artifactId>javascript</artifactId>
  26. <type>war</type>
  27. <scope>provided</scope>
  28. </dependency>
  29. </dependencies>
  30. <build>
  31. <plugins>
  32. <plugin>
  33. <artifactId>maven-antrun-plugin</artifactId>
  34. <executions>
  35. <execution>
  36. <id>default-cli</id>
  37. <phase>generate-resources</phase>
  38. <goals>
  39. <goal>run</goal>
  40. </goals>
  41. <!-- <inherited>false</inherited> -->
  42. <configuration>
  43. <target>
  44. <property name="javascript.unpack"
  45. location="${project.build.directory}/temp" />
  46. <property name="vaadinPush.js"
  47. location="${project.build.outputDirectory}/VAADIN/vaadinPush.debug.js" />
  48. <property name="templates.dir"
  49. location="${project.build.sourceDirectory}/../templates" />
  50. <!-- Unzip to temp dir -->
  51. <unzip
  52. src="${maven.dependency.com.vaadin.external.atmosphere.client.javascript.war.path}"
  53. dest="${javascript.unpack}">
  54. <patternset>
  55. <include name="**/atmosphere.js" />
  56. </patternset>
  57. <mapper type="flatten" />
  58. </unzip>
  59. <loadfile
  60. srcfile="${javascript.unpack}/atmosphere.js"
  61. property="atmosphere.js.contents" />
  62. <loadfile
  63. srcfile="${templates.dir}/vaadinPush.js.tpl"
  64. property="vaadinPush.js.contents">
  65. <filterchain>
  66. <replacetokens
  67. begintoken="@" endtoken="@">
  68. <token key="atmosphere.js"
  69. value="${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}"
  93. tofile="${vaadinPush.js}" />
  94. <!-- Gzipped versions -->
  95. <gzip src="${vaadinPush.debug.js}"
  96. destfile="${vaadinPush.debug.js}.gz" />
  97. <gzip src="${vaadinPush.js}"
  98. 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-Version>${osgi.bundle.version}</Bundle-Version>
  132. <Bundle-RequiredExecutionEnvironment>${osgi.execution.environment}</Bundle-RequiredExecutionEnvironment>
  133. <Export-Package>VAADIN</Export-Package>
  134. <Require-Bundle>com.vaadin.external.atmosphere.runtime;bundle-version="${atmosphere.runtime.version}";visibility:=reexport</Require-Bundle>
  135. </instructions>
  136. </configuration>
  137. <executions>
  138. <execution>
  139. <id>bundle-manifest</id>
  140. <phase>process-classes</phase>
  141. <goals>
  142. <goal>manifest</goal>
  143. </goals>
  144. </execution>
  145. </executions>
  146. </plugin>
  147. <plugin>
  148. <groupId>org.apache.maven.plugins</groupId>
  149. <artifactId>maven-jar-plugin</artifactId>
  150. <configuration>
  151. <archive>
  152. <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
  153. <index>false</index>
  154. <manifest>
  155. <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
  156. </manifest>
  157. </archive>
  158. </configuration>
  159. </plugin>
  160. </plugins>
  161. </build>
  162. </project>