You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2019/04/10 05:45:22 UTC

[royale-compiler] branch release_practice updated: try to eliminate platform differences

This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch release_practice
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git


The following commit(s) were added to refs/heads/release_practice by this push:
     new 5cc6ea9  try to eliminate platform differences
5cc6ea9 is described below

commit 5cc6ea90966ccf9c8e4195d92324093a5869aae2
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Apr 9 22:45:10 2019 -0700

    try to eliminate platform differences
---
 pom.xml                                            |  4 ++++
 royale-maven-plugin/pom.xml                        | 26 ++++++++++++++++++++++
 .../src/main/sisu/javax.inject.Named               |  1 +
 3 files changed, 31 insertions(+)

diff --git a/pom.xml b/pom.xml
index 7ffcdac..82d3e4b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -299,6 +299,10 @@
                 as the typedefs build will handle all content in that directory
             -->
             <exclude>royale-typedefs/**</exclude>
+            <!-- This file is used to get reproducible builds.  See royale-maven-plugin/pom.xml
+                 for more info.
+             -->
+            <exclude>**/src/main/sisu/javax.inject.Named</exclude>
           </excludes>
         </configuration>
         <dependencies>
diff --git a/royale-maven-plugin/pom.xml b/royale-maven-plugin/pom.xml
index dc4de8c..2e0df47 100644
--- a/royale-maven-plugin/pom.xml
+++ b/royale-maven-plugin/pom.xml
@@ -135,6 +135,32 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <version>2.4</version>
+        <executions>
+          <!--
+               The javax.inject.Named file is copied over the file generated by the compiler in order to have the same line-endings on Mac and Windows so that the JAR is binary identical.  The compiler generates platform line-endings in the file that ends up in META-INF resulting in binary differences.
+            -->
+          <execution>
+            <id>copy-javax.inject.named</id>
+            <phase>prepare-package</phase>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <configuration>
+              <overwrite>true</overwrite>
+              <outputDirectory>${project.build.outputDirectory}/META-INF/sisu</outputDirectory>
+              <resources>
+                <resource>
+                  <directory>src/main/sisu</directory>
+                </resource>
+              </resources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/royale-maven-plugin/src/main/sisu/javax.inject.Named b/royale-maven-plugin/src/main/sisu/javax.inject.Named
new file mode 100644
index 0000000..952435e
--- /dev/null
+++ b/royale-maven-plugin/src/main/sisu/javax.inject.Named
@@ -0,0 +1 @@
+org.apache.royale.maven.trust.DefaultTrustHandler