soy
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency> <groupId>com.google.template</groupId> <artifactId>soy</artifactId> <version>2024-02-26</version> </dependency>
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <name>Closure Templates</name> <groupId>com.google.template</groupId> <artifactId>soy</artifactId> <version>2024-02-26</version> <description> Closure Templates are a client-side and server-side templating system. </description> <url>https://github.com/google/closure-templates</url> <inceptionYear>2009</inceptionYear> <organization> <name>Google</name> <url>https://www.google.com</url> </organization> <!-- Useless, but required by Maven Central release process. --> <developers> <developer> <name>Googlers</name> <organization>Google</organization> <organizationUrl>https://www.google.com</organizationUrl> </developer> </developers> <licenses> <license> <name>The Apache Software License, Version 2.0</name> <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> <distribution>repo</distribution> </license> </licenses> <!-- Allow publishing snapshots to Maven Central. --> <distributionManagement> <snapshotRepository> <id>ossrh</id> <url>https://oss.sonatype.org/content/repositories/snapshots</url> </snapshotRepository> <repository> <id>ossrh</id> <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> </repository> </distributionManagement> <issueManagement> <system>GitHub</system> <url>https://github.com/google/closure-templates/issues</url> </issueManagement> <mailingLists> <mailingList> <name>closure-templates-discuss</name> <subscribe>closure-templates-discuss+subscribe@googlegroups.com </subscribe> <unsubscribe>closure-templates-discuss+unsubscribe@googlegroups.com </unsubscribe> <post>closure-templates-discuss@googlegroups.com</post> <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:git@github.com:google/closure-templates.git </developerConnection> <url>https://github.com/google/closure-templates.git</url> <tag>HEAD</tag> </scm> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <java.version>11</java.version> <guice.version>7.0.0</guice.version> <guava.version>32.1.1-jre</guava.version> <asm.version>9.5</asm.version> <autovalue.version>1.10.2</autovalue.version> <proto.version>3.21.7</proto.version> <truth.version>1.4.0</truth.version> <flogger.version>0.7.4</flogger.version> <soy.examples.path>examples</soy.examples.path> <soy.examples>${project.basedir}/examples</soy.examples> <soy.examples.out>${project.build.directory}/examples</soy.examples.out> </properties> <!-- Pin to specific versions, this is especially useful for transitive dependencies that are different versions and ensures a single version throughout without using <exclusions>. --> <dependencyManagement> <dependencies> <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> <version>3.0.2</version> </dependency> <dependency> <groupId>com.google.errorprone</groupId> <artifactId>error_prone_annotations</artifactId> <version>2.20.0</version> </dependency> <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm</artifactId> <version>${asm.version}</version> </dependency> <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm-commons</artifactId> <version>${asm.version}</version> </dependency> <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm-util</artifactId> <version>${asm.version}</version> </dependency> <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm-analysis</artifactId> <version>${asm.version}</version> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>${guava.version}</version> </dependency> <dependency> <groupId>org.checkerframework</groupId> <artifactId>checker-qual</artifactId> <version>3.36.0</version> </dependency> <dependency> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-java</artifactId> <version>${proto.version}</version> </dependency> <dependency> <groupId>com.google.auto.value</groupId> <artifactId>auto-value-annotations</artifactId> <version>${autovalue.version}</version> </dependency> </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>com.google.inject</groupId> <artifactId>guice</artifactId> <version>${guice.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava-testlib</artifactId> <version>${guava.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>com.google.auto.value</groupId> <artifactId>auto-value</artifactId> <version>${autovalue.version}</version> <scope>provided</scope> <!-- unnecessary at runtime --> </dependency> <dependency> <groupId>com.google.auto.value</groupId> <artifactId>auto-value-annotations</artifactId> <scope>provided</scope> <!-- unnecessary at runtime --> </dependency> <dependency> <groupId>com.google.common.html.types</groupId> <artifactId>types</artifactId> <version>1.0.8</version> </dependency> <dependency> <groupId>com.google.errorprone</groupId> <artifactId>error_prone_annotations</artifactId> </dependency> <dependency> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-java</artifactId> </dependency> <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm-commons</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm-util</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm-analysis</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>com.google.truth</groupId> <artifactId>truth</artifactId> <version>${truth.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>com.google.truth.extensions</groupId> <artifactId>truth-java8-extension</artifactId> <version>${truth.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>com.ibm.icu</groupId> <artifactId>icu4j</artifactId> <version>73.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>args4j</groupId> <artifactId>args4j</artifactId> <version>2.33</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.10.1</version> </dependency> <!-- Two JSON libraries are better than one --> <dependency> <groupId>org.json</groupId> <artifactId>json</artifactId> <version>20230618</version> </dependency> <!-- soy build-time dependency only. see maven-antrun-plugin:generated-soyutils --> <dependency> <groupId>org.apache.ant</groupId> <artifactId>ant</artifactId> <version>1.10.13</version> <scope>provided</scope> <optional>true</optional> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.13.2</version> <scope>test</scope> </dependency> <dependency> <groupId>com.google.escapevelocity</groupId> <artifactId>escapevelocity</artifactId> <version>1.1</version> </dependency> <dependency> <groupId>com.google.flogger</groupId> <artifactId>flogger</artifactId> <version>${flogger.version}</version> </dependency> <dependency> <groupId>com.google.flogger</groupId> <artifactId>google-extensions</artifactId> <version>${flogger.version}</version> </dependency> <dependency> <groupId>com.google.flogger</groupId> <artifactId>flogger-system-backend</artifactId> <version>${flogger.version}</version> <scope>runtime</scope> </dependency> <dependency> <groupId>javax.inject</groupId> <artifactId>javax.inject</artifactId> <version>1</version> </dependency> </dependencies> <profiles> <!-- Build steps that only need to run when publishing to Maven Central. --> <profile> <id>release</id> <build> <plugins> <plugin> <!-- Sign artifacts with local GPG key. --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-gpg-plugin</artifactId> <version>1.6</version> <executions> <execution> <id>sign-artifacts</id> <phase>verify</phase> <goals> <goal>sign</goal> </goals> </execution> </executions> </plugin> <plugin> <!-- Create javadoc.jar. --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>2.10.3</version> <configuration> <notimestamp>true</notimestamp> <windowtitle>Closure Templates</windowtitle> <author>false</author> <doctitle> <![CDATA[ <h1>Closure Templates</h1> <h4>Complete javadoc for developers and plugin writers.</h4> ]]> </doctitle> <bottom> <![CDATA[ <div id="footer"> <div id="footerlogo" style="float:left"> <img src="http://www.google.com/images/art.gif" alt="Google colored balls"> </div> <div id="copyright" style="float:left"> <p>© 2009 Google - <a href="http://www.google.com/privacy.html">Privacy Policy</a> - <a href="http://www.google.com/terms_of_service.html">Terms and Conditions</a> - <a href="http://www.google.com/about.html">About Google</a> </p> </div> ]]> </bottom> <!-- Ignore javadoc errors. --> <failOnError>false</failOnError> <!-- This disable the additional check introduced in Java8. We need to fix all the incompatible docs, but for now we disable this. --> <doclint>none</doclint> </configuration> <executions> <execution> <id>attach-javadoc</id> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> <plugin> <!-- Create sources.jar. --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <version>2.4</version> <executions> <execution> <id>attach-sources</id> <goals> <goal>jar-no-fork</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile> </profiles> <build> <defaultGoal>install</defaultGoal> <sourceDirectory>${project.basedir}/java/src</sourceDirectory> <testSourceDirectory>${project.basedir}/java/tests</testSourceDirectory> <!-- 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> </resource> </resources> <testResources> <testResource> <directory>${project.basedir}/java/tests</directory> </testResource> </testResources> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.8</version> <executions> <execution> <id>generated-soyutils</id> <phase>package</phase> <configuration> <target> <taskdef name="gen.escape.directives" 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"/> <libdefined pattern="goog.string.*"/> <libdefined pattern="goog.asserts.*"/> </gen.escape.directives> </target> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>1.3.1</version> <dependencies> <dependency> <groupId>com.google.security</groupId> <artifactId>fences-maven-enforcer-rule</artifactId> <version>1.9-beta</version> </dependency> <dependency> <groupId>org.codehaus.mojo</groupId> <artifactId>extra-enforcer-rules</artifactId> <version>1.0-beta-4</version> </dependency> </dependencies> <executions> <execution> <id>enforce-files-exist</id> <goals> <goal>enforce</goal> </goals> <phase>verify</phase> <configuration> <rules> <requireFilesExist> <files> <file>${soy.examples.out}/simple_generated.js</file> <file>${soy.examples.out}/simple_generated_en.js</file> <file>${soy.examples.out}/features_generated_en.js</file> <file>${soy.examples.out}/simple_generated_x-zz.js</file> <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> </files> </requireFilesExist> <!-- fences-maven-enforcer-rule doesn't support Java 9 yet, see https://github.com/mikesamuel/fences-maven-enforcer-rule/pull/12 <!- - See http://mikesamuel.github.io/fences-maven-enforcer-rule/getting_started.html - -> <fences implementation="com.google.security.fences.FencesMavenEnforcerRule"> <!- - The compiled JAR should not violate the policy it itself exports (see fences.xml). - -> <import>com.google.template:soy</import> </fences> --> </rules> <fail>true</fail> </configuration> </execution> <execution> <id>enforce</id> <configuration> <rules> <DependencyConvergence/> <banDuplicateClasses> <findAllDuplicates>true</findAllDuplicates> <ignoreClasses> <!-- see https://issues.apache.org/jira/browse/MENFORCER-283 --> <ignoreClass>module-info</ignoreClass> <ignoreClass>META-INF/versions/9/module-info</ignoreClass> </ignoreClasses> </banDuplicateClasses> </rules> <fail>true</fail> </configuration> <goals> <goal>enforce</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.11.0</version> <configuration> <release>${java.version}</release> <debug>true</debug> <debuglevel>lines,vars,source</debuglevel> <compilerArgument>-Werror</compilerArgument> <compilerArgument>-Xlint:deprecation</compilerArgument> <excludes> <!-- Exclude testonly Java sources from the main (non-test) compilation. --> <exclude>com/google/template/soy/testing/**</exclude> <exclude>com/google/template/soy/exprtree/testing/**</exclude> <exclude>com/google/template/soy/logging/testing/**</exclude> </excludes> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.4.2</version> <executions> <execution> <id>with-dependencies</id> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <shadedArtifactAttached>true</shadedArtifactAttached> <shadedClassifierName>with-dependencies</shadedClassifierName> </configuration> </execution> <execution> <id>SoyToIncrementalDomSrcCompiler</id> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <shadedArtifactAttached>true</shadedArtifactAttached> <shadedClassifierName>SoyToIncrementalDomSrcCompiler </shadedClassifierName> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <mainClass> com.google.template.soy.SoyToIncrementalDomSrcCompiler </mainClass> </transformer> </transformers> </configuration> </execution> <execution> <id>SoyToJsSrcCompiler</id> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <shadedArtifactAttached>true</shadedArtifactAttached> <shadedClassifierName>SoyToJsSrcCompiler</shadedClassifierName> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <mainClass>com.google.template.soy.SoyToJsSrcCompiler </mainClass> </transformer> </transformers> </configuration> </execution> <execution> <id>SoyToPySrcCompiler</id> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <shadedArtifactAttached>true</shadedArtifactAttached> <shadedClassifierName>SoyToPySrcCompiler</shadedClassifierName> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <mainClass>com.google.template.soy.SoyToPySrcCompiler </mainClass> </transformer> </transformers> </configuration> </execution> <execution> <id>SoyHeaderCompiler</id> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <shadedArtifactAttached>true</shadedArtifactAttached> <shadedClassifierName>SoyHeaderCompiler</shadedClassifierName> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <mainClass>com.google.template.soy.SoyHeaderCompiler </mainClass> </transformer> </transformers> </configuration> </execution> <execution> <id>SoyParseInfoGenerator</id> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <shadedArtifactAttached>true</shadedArtifactAttached> <shadedClassifierName>SoyParseInfoGenerator</shadedClassifierName> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <mainClass>com.google.template.soy.SoyParseInfoGenerator </mainClass> </transformer> </transformers> </configuration> </execution> <execution> <id>SoyMsgExtractor</id> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <shadedArtifactAttached>true</shadedArtifactAttached> <shadedClassifierName>SoyMsgExtractor</shadedClassifierName> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <mainClass>com.google.template.soy.SoyMsgExtractor</mainClass> </transformer> </transformers> </configuration> </execution> <execution> <id>SoyToJbcSrcCompiler</id> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <shadedArtifactAttached>true</shadedArtifactAttached> <shadedClassifierName>SoyToJbcSrcCompiler</shadedClassifierName> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <mainClass>com.google.template.soy.SoyToJbcSrcCompiler </mainClass> </transformer> </transformers> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.18.1</version> <configuration> <systemPropertyVariables> <soy_jbcsrc_debug_mode>true</soy_jbcsrc_debug_mode> </systemPropertyVariables> </configuration> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>1.10</version> <executions> <execution> <id>attach-artifacts</id> <phase>package</phase> <goals> <goal>attach-artifact</goal> </goals> <configuration> <artifacts> <artifact> <file> ${project.build.directory}/soyutils_usegoog.js </file> <type>js</type> <classifier>soyutils_usegoog</classifier> </artifact> </artifacts> </configuration> </execution> <execution> <id>add-test-source</id> <phase>generate-test-sources</phase> <goals> <goal>add-test-source</goal> </goals> <configuration> <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> </sources> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.4.0</version> <configuration> <detail>true</detail> </configuration> <executions> <execution> <id>js-simple-example</id> <phase>pre-integration-test</phase> <configuration> <executable>${java.home}/bin/java</executable> <arguments> <argument>-jar</argument> <argument> ${project.build.directory}/${project.build.finalName}-SoyToJsSrcCompiler.jar </argument> <argument>--outputPathFormat</argument> <argument> ${soy.examples.out}/{INPUT_FILE_NAME_NO_EXT}_generated.js </argument> <argument>--srcs</argument> <argument>${soy.examples.path}/simple.soy</argument> </arguments> </configuration> <goals> <goal>exec</goal> </goals> </execution> <execution> <id>js-features-example</id> <phase>pre-integration-test</phase> <configuration> <executable>${java.home}/bin/java</executable> <arguments> <argument>-jar</argument> <argument> ${project.build.directory}/${project.build.finalName}-SoyToJsSrcCompiler.jar </argument> <argument>--outputPathFormat</argument> <argument> ${soy.examples.out}/{INPUT_FILE_NAME_NO_EXT}_generated_{LOCALE}.js </argument> <argument>--locales</argument> <argument>en,x-zz</argument> <argument>--messageFilePathFormat</argument> <argument>${soy.examples.path}/examples_translated_{LOCALE}.xlf </argument> <argument>--srcs</argument> <argument> ${soy.examples.path}/simple.soy,${soy.examples.path}/features.soy </argument> </arguments> </configuration> <goals> <goal>exec</goal> </goals> </execution> <execution> <id>java-simple-example</id> <phase>pre-integration-test</phase> <configuration> <mainClass>com.google.template.soy.examples.SimpleUsage </mainClass> <cleanupDaemonThreads>false</cleanupDaemonThreads> <additionalClasspathElements> <additionalClasspathElement> ${soy.examples}/ </additionalClasspathElement> </additionalClasspathElements> </configuration> <goals> <goal>java</goal> </goals> </execution> <execution> <id>java-features-example</id> <phase>pre-integration-test</phase> <configuration> <mainClass>com.google.template.soy.examples.FeaturesUsage </mainClass> <cleanupDaemonThreads>false</cleanupDaemonThreads> <additionalClasspathElements> <additionalClasspathElement>${soy.examples}/ </additionalClasspathElement> <additionalClasspathElement> ${project.build.sourceDirectory}/com/google/template/soy/examples/ </additionalClasspathElement> </additionalClasspathElements> </configuration> <goals> <goal>java</goal> </goals> </execution> <execution> <id>parse-info-generation-example</id> <phase>pre-integration-test</phase> <configuration> <executable>${java.home}/bin/java</executable> <arguments> <argument>-jar</argument> <argument> ${project.build.directory}/${project.build.finalName}-SoyParseInfoGenerator.jar </argument> <argument>--outputDirectory</argument> <argument>${soy.examples.out}/</argument> <argument>--javaPackage</argument> <argument>com.google.template.soy.examples</argument> <argument>--javaClassNameSource</argument> <argument>filename</argument> <argument>--srcs</argument> <argument> ${soy.examples.path}/simple.soy,${soy.examples.path}/features.soy </argument> </arguments> </configuration> <goals> <goal>exec</goal> </goals> </execution> <execution> <id>msg-extraction-example</id> <phase>pre-integration-test</phase> <configuration> <executable>${java.home}/bin/java</executable> <arguments> <argument>-jar</argument> <argument> ${project.build.directory}/${project.build.finalName}-SoyMsgExtractor.jar </argument> <argument>--outputFile</argument> <argument>${soy.examples.out}/examples_extracted.xlf </argument> <argument>--srcs</argument> <argument> ${soy.examples.path}/simple.soy,${soy.examples.path}/features.soy </argument> </arguments> </configuration> <goals> <goal>exec</goal> </goals> </execution> <execution> <id>jbcsrc-generation-example</id> <phase>pre-integration-test</phase> <configuration> <executable>${java.home}/bin/java</executable> <arguments> <argument>-jar</argument> <argument> ${project.build.directory}/${project.build.finalName}-SoyToJbcSrcCompiler.jar </argument> <argument>--output</argument> <argument>${soy.examples.out}/examples.jar</argument> <argument>--outputSrcJar</argument> <argument>${soy.examples.out}/examples-src.jar</argument> <argument>--srcs</argument> <argument> ${soy.examples.path}/simple.soy,${soy.examples.path}/features.soy </argument> </arguments> </configuration> <goals> <goal>exec</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>javacc-maven-plugin</artifactId> <version>2.6</version> <!-- TODO: this is failing according to https://travis-ci.org/google/closure-templates/builds/101956895 --> <configuration> <sourceDirectory>${project.basedir}/java/src</sourceDirectory> </configuration> <executions> <execution> <id>javacc</id> <goals> <goal>javacc</goal> </goals> </execution> </executions> <!-- The maven plugin is still on version 5 of javacc upgrade to 6.1.2 to be closer to the version used by the google internal build of soy. --> <dependencies> <dependency> <groupId>net.java.dev.javacc</groupId> <artifactId>javacc</artifactId> <version>6.1.2</version> </dependency> </dependencies> </plugin> <plugin> <groupId>com.github.os72</groupId> <artifactId>protoc-jar-maven-plugin</artifactId> <version>3.11.4</version> <executions> <execution> <phase>generate-sources</phase> <goals> <goal>run</goal> </goals> <configuration> <protocArtifact>com.google.protobuf:protoc:${proto.version}</protocArtifact> <includeDirectories> <include>${project.basedir}</include> </includeDirectories> <outputTargets> <outputTarget> <type>java</type> </outputTarget> </outputTargets> </configuration> </execution> <execution> <id>protoc-tests</id> <phase>generate-test-sources</phase> <goals> <goal>run</goal> </goals> <configuration> <protocArtifact>com.google.protobuf:protoc:${proto.version}</protocArtifact> <addSources>test</addSources> <includeDirectories> <include>${project.basedir}</include> </includeDirectories> <inputDirectories> <include>src/test/protobuf</include> </inputDirectories> </configuration> </execution> </executions> </plugin> <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`. See http://central.sonatype.org/pages/apache-maven.html. --> <groupId>org.sonatype.plugins</groupId> <artifactId>nexus-staging-maven-plugin</artifactId> <version>1.6.5</version> <extensions>true</extensions> <configuration> <serverId>ossrh</serverId> <nexusUrl>https://oss.sonatype.org</nexusUrl> <autoReleaseAfterClose>true</autoReleaseAfterClose> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>3.0.1</version> <!-- configuration for the default run --> <configuration> <archive> <manifestEntries> <addDefaultImplementationEntries>true </addDefaultImplementationEntries> <addDefaultSpecificationEntries>true </addDefaultSpecificationEntries> <Sealed>true</Sealed> </manifestEntries> </archive> </configuration> <executions> <execution> <!-- create a jar with the javascript source files required by the jssrc backend that are not available from github.com/google/closure-library --> <id>js-jar</id> <phase>package</phase> <goals> <goal>jar</goal> </goals> <configuration> <classesDirectory>${project.basedir}/javascript</classesDirectory> <classifier>jssrc_js</classifier> <includes> <include>**/*.js</include> </includes> <excludes> <exclude>**/*_test.js</exclude> </excludes> <archive/> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>