Skip to content

Commit

Permalink
Update closure templates to use 1.7.4 version of auto-value and auto-…
Browse files Browse the repository at this point in the history
…value-annotations.

I will fully admit, I don't really know what I am doing here. In child cl/336538362, I add a test for an AutoValue object that needs google/auto#666 resolved (specifically google/auto@a0de99b to be in the build). This looks like it was added to AutoValue starting in release 1.6.6 but for the maven build Soy is using auto value version 1.6.3. As part of this version update, I ran into a problem with duplicate classes for auto-value-annotation. This was stemming from truth still depending on version 1.6.3 of auto-value-annotation. Therefore, I added an exclusion to that dependency for auto-value-annotation. I think is the right thing to do but I again don't really know what I am doing.

[]

I also bumped the version of maven project, which I think is the right thing to do?

GITHUB_BREAKING_CHANGES=changes maven build to use auto value version 1.7.4

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=337885608
  • Loading branch information
ericpass authored and emspishak committed Oct 26, 2020
1 parent 0335303 commit 9fc52b8
Showing 1 changed file with 88 additions and 50 deletions.
138 changes: 88 additions & 50 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>Closure Templates</name>
Expand Down Expand Up @@ -55,16 +55,21 @@
<mailingLists>
<mailingList>
<name>closure-templates-discuss</name>
<subscribe>[email protected]</subscribe>
<unsubscribe>[email protected]</unsubscribe>
<subscribe>[email protected]
</subscribe>
<unsubscribe>[email protected]
</unsubscribe>
<post>[email protected]</post>
<archive>https://groups.google.com/group/closure-templates-discuss</archive>
<archive>https://groups.google.com/group/closure-templates-discuss
</archive>
</mailingList>
</mailingLists>

<scm>
<connection>scm:git:https://github.com/google/closure-templates.git</connection>
<developerConnection>scm:git:[email protected]:google/closure-templates.git</developerConnection>
<connection>scm:git:https://github.com/google/closure-templates.git
</connection>
<developerConnection>scm:git:[email protected]:google/closure-templates.git
</developerConnection>
<url>https://github.com/google/closure-templates.git</url>
<tag>HEAD</tag>
</scm>
Expand All @@ -76,7 +81,7 @@
<guice.version>4.1.0</guice.version>
<guava.version>25.1-jre</guava.version>
<asm.version>7.0</asm.version>
<autovalue.version>1.6.3</autovalue.version>
<autovalue.version>1.7.4</autovalue.version>
<proto.version>3.3.0</proto.version>
<truth.version>0.45</truth.version>
<soy.examples>${project.basedir}/examples</soy.examples>
Expand Down Expand Up @@ -256,6 +261,11 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
<!--Truth depends on auto-value-annotation 1.6.3, so exclude it -->
<exclusion>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -448,11 +458,11 @@
<!-- Make sure the metadata templates are where the Java code expects them to be. -->
<resources>
<resource>
<targetPath>com/google/template/soy/logging</targetPath>
<directory>java/src/com/google/template/soy/logging</directory>
<includes>
<include>*.vm</include>
</includes>
<targetPath>com/google/template/soy/logging</targetPath>
<directory>java/src/com/google/template/soy/logging</directory>
<includes>
<include>*.vm</include>
</includes>
</resource>
</resources>

Expand All @@ -474,11 +484,13 @@
<configuration>
<target>
<taskdef name="gen.escape.directives"
classname="com.google.template.soy.jssrc.internal.GenerateSoyUtilsEscapingDirectiveCode"
classpathref="maven.runtime.classpath"/>
classname="com.google.template.soy.jssrc.internal.GenerateSoyUtilsEscapingDirectiveCode"
classpathref="maven.runtime.classpath"/>
<gen.escape.directives>
<input path="${project.basedir}/javascript/soyutils_usegoog.js"/>
<output path="${project.build.directory}/soyutils_usegoog.js"/>
<input
path="${project.basedir}/javascript/soyutils_usegoog.js"/>
<output
path="${project.build.directory}/soyutils_usegoog.js"/>
<libdefined pattern="goog.string.*"/>
<libdefined pattern="goog.asserts.*"/>
</gen.escape.directives>
Expand Down Expand Up @@ -524,7 +536,9 @@
<file>${soy.examples.out}/features_generated_x-zz.js</file>
<file>${soy.examples.out}/FeaturesSoyInfo.java</file>
<file>${soy.examples.out}/examples_extracted.xlf</file>
<file>${project.build.directory}/soy-${project.version}-jssrc_js.jar</file>
<file>
${project.build.directory}/soy-${project.version}-jssrc_js.jar
</file>
</files>
</requireFilesExist>
<!-- fences-maven-enforcer-rule doesn't support Java 9 yet, see
Expand Down Expand Up @@ -607,11 +621,14 @@
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>SoyToIncrementalDomSrcCompiler</shadedClassifierName>
<shadedClassifierName>SoyToIncrementalDomSrcCompiler
</shadedClassifierName>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.google.template.soy.SoyToIncrementalDomSrcCompiler</mainClass>
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>
com.google.template.soy.SoyToIncrementalDomSrcCompiler
</mainClass>
</transformer>
</transformers>
</configuration>
Expand All @@ -627,8 +644,9 @@
<shadedClassifierName>SoyToJsSrcCompiler</shadedClassifierName>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.google.template.soy.SoyToJsSrcCompiler</mainClass>
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.google.template.soy.SoyToJsSrcCompiler
</mainClass>
</transformer>
</transformers>
</configuration>
Expand All @@ -644,8 +662,9 @@
<shadedClassifierName>SoyToPySrcCompiler</shadedClassifierName>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.google.template.soy.SoyToPySrcCompiler</mainClass>
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.google.template.soy.SoyToPySrcCompiler
</mainClass>
</transformer>
</transformers>
</configuration>
Expand All @@ -661,8 +680,9 @@
<shadedClassifierName>SoyHeaderCompiler</shadedClassifierName>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.google.template.soy.SoyHeaderCompiler</mainClass>
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.google.template.soy.SoyHeaderCompiler
</mainClass>
</transformer>
</transformers>
</configuration>
Expand All @@ -678,7 +698,7 @@
<shadedClassifierName>SoyParseInfoGenerator</shadedClassifierName>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.google.template.soy.SoyParseInfoGenerator
</mainClass>
</transformer>
Expand All @@ -696,7 +716,7 @@
<shadedClassifierName>SoyMsgExtractor</shadedClassifierName>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.google.template.soy.SoyMsgExtractor</mainClass>
</transformer>
</transformers>
Expand All @@ -713,8 +733,9 @@
<shadedClassifierName>SoyToJbcSrcCompiler</shadedClassifierName>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.google.template.soy.SoyToJbcSrcCompiler</mainClass>
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.google.template.soy.SoyToJbcSrcCompiler
</mainClass>
</transformer>
</transformers>
</configuration>
Expand Down Expand Up @@ -764,8 +785,10 @@
<sources>
<!-- For compiling the tests, include testonly sources that are in the main source tree, but not compiled with it. -->
<source>java/src/com/google/template/soy/testing</source>
<source>java/src/com/google/template/soy/exprtree/testing</source>
<source>java/src/com/google/template/soy/logging/testing</source>
<source>java/src/com/google/template/soy/exprtree/testing
</source>
<source>java/src/com/google/template/soy/logging/testing
</source>
</sources>
</configuration>
</execution>
Expand Down Expand Up @@ -818,12 +841,16 @@
<argument>--locales</argument>
<argument>en,x-zz</argument>
<argument>--messageFilePathFormat</argument>
<argument>${soy.examples}/examples_translated_{LOCALE}.xlf</argument>
<argument>${soy.examples}/examples_translated_{LOCALE}.xlf
</argument>
<argument>--compileTimeGlobalsFile</argument>
<argument>${project.basedir}/javascript/examples/features-usage_globals.txt
<argument>
${project.basedir}/javascript/examples/features-usage_globals.txt
</argument>
<argument>--srcs</argument>
<argument>${soy.examples}/simple.soy,${soy.examples}/features.soy</argument>
<argument>
${soy.examples}/simple.soy,${soy.examples}/features.soy
</argument>
</arguments>
</configuration>
<goals>
Expand All @@ -834,7 +861,8 @@
<id>java-simple-example</id>
<phase>pre-integration-test</phase>
<configuration>
<mainClass>com.google.template.soy.examples.SimpleUsage</mainClass>
<mainClass>com.google.template.soy.examples.SimpleUsage
</mainClass>
<cleanupDaemonThreads>false</cleanupDaemonThreads>
<additionalClasspathElements>
<additionalClasspathElement>
Expand All @@ -850,10 +878,12 @@
<id>java-features-example</id>
<phase>pre-integration-test</phase>
<configuration>
<mainClass>com.google.template.soy.examples.FeaturesUsage</mainClass>
<mainClass>com.google.template.soy.examples.FeaturesUsage
</mainClass>
<cleanupDaemonThreads>false</cleanupDaemonThreads>
<additionalClasspathElements>
<additionalClasspathElement>${soy.examples}/</additionalClasspathElement>
<additionalClasspathElement>${soy.examples}/
</additionalClasspathElement>
<additionalClasspathElement>
${project.build.sourceDirectory}/com/google/template/soy/examples/
</additionalClasspathElement>
Expand All @@ -880,7 +910,8 @@
<argument>--javaClassNameSource</argument>
<argument>filename</argument>
<argument>--compileTimeGlobalsFile</argument>
<argument>${project.basedir}/javascript/examples/features-usage_globals.txt
<argument>
${project.basedir}/javascript/examples/features-usage_globals.txt
</argument>
<argument>--srcs</argument>
<argument>${soy.examples}/features.soy</argument>
Expand All @@ -904,7 +935,9 @@
<argument>${soy.examples.out}/examples_extracted.xlf
</argument>
<argument>--srcs</argument>
<argument>${soy.examples}/simple.soy,${soy.examples}/features.soy</argument>
<argument>
${soy.examples}/simple.soy,${soy.examples}/features.soy
</argument>
</arguments>
</configuration>
<goals>
Expand All @@ -926,10 +959,13 @@
<argument>--outputSrcJar</argument>
<argument>${soy.examples.out}/examples-src.jar</argument>
<argument>--compileTimeGlobalsFile</argument>
<argument>${project.basedir}/javascript/examples/features-usage_globals.txt
<argument>
${project.basedir}/javascript/examples/features-usage_globals.txt
</argument>
<argument>--srcs</argument>
<argument>${soy.examples}/simple.soy,${soy.examples}/features.soy</argument>
<argument>
${soy.examples}/simple.soy,${soy.examples}/features.soy
</argument>
</arguments>
</configuration>
<goals>
Expand Down Expand Up @@ -985,10 +1021,10 @@
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-help-plugin</artifactId>
<version>2.2</version>
</plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-help-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<!-- Allow publishing to Maven Central via
`mvn -P release clean deploy`.
Expand All @@ -1011,8 +1047,10 @@
<configuration>
<archive>
<manifestEntries>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
<addDefaultImplementationEntries>true
</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true
</addDefaultSpecificationEntries>
<Sealed>true</Sealed>
</manifestEntries>
</archive>
Expand All @@ -1035,7 +1073,7 @@
<excludes>
<exclude>**/*_test.js</exclude>
</excludes>
<archive />
<archive/>
</configuration>
</execution>
</executions>
Expand Down

0 comments on commit 9fc52b8

Please sign in to comment.