UNPKG

closure-builder

Version:

Simple Closure, Soy and JavaScript Build system

788 lines (751 loc) 27.8 kB
<project> <modelVersion>4.0.0</modelVersion> <name>Closure Templates</name> <groupId>com.google.template</groupId> <artifactId>soy</artifactId> <version>2016-01-12</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> </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>1.7</java.version> <guice.version>3.0</guice.version> <guava.version>19.0</guava.version> <asm.version>5.0.3</asm.version> <autovalue.version>1.0</autovalue.version> <soy.examples>${project.basedir}/examples</soy.examples> <soy.examples.out>${project.build.directory}/examples</soy.examples.out> </properties> <dependencies> <dependency> <groupId>javax.inject</groupId> <artifactId>javax.inject</artifactId> <version>1</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.google.inject</groupId> <artifactId>guice</artifactId> <version>${guice.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.google.inject.extensions</groupId> <artifactId>guice-assistedinject</artifactId> <version>${guice.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.google.inject.extensions</groupId> <artifactId>guice-multibindings</artifactId> <version>${guice.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>${guava.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava-testlib</artifactId> <version>${guava.version}</version> <exclusions> <exclusion> <groupId>junit</groupId> <artifactId>junit</artifactId> </exclusion> <exclusion> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> </exclusion> </exclusions> <scope>test</scope> </dependency> <dependency> <groupId>com.google.auto.value</groupId> <artifactId>auto-value</artifactId> <version>${autovalue.version}</version> <exclusions> <exclusion> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> </exclusion> <exclusion> <groupId>org.ow2.asm</groupId> <artifactId>asm</artifactId> </exclusion> </exclusions> <scope>provided</scope> <!-- unnecessary at runtime --> </dependency> <dependency> <groupId>com.google.common.html.types</groupId> <artifactId>types</artifactId> <version>1.0.3</version> </dependency> <dependency> <groupId>com.google.errorprone</groupId> <artifactId>error_prone_annotations</artifactId> <version>2.0.2</version> <!-- unnecessary at runtime since retention of annotations is CLASS --> <scope>provided</scope> </dependency> <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm</artifactId> <version>${asm.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm-commons</artifactId> <version>${asm.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm-util</artifactId> <version>${asm.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm-analysis</artifactId> <version>${asm.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.google.truth</groupId> <artifactId>truth</artifactId> <version>0.25</version> <scope>test</scope> <exclusions> <exclusion> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>com.ibm.icu</groupId> <artifactId>icu4j</artifactId> <version>57.1</version> <scope>compile</scope> </dependency> <dependency> <groupId>args4j</groupId> <artifactId>args4j</artifactId> <version>2.0.23</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> <version>2.0.3</version> <scope>compile</scope> </dependency> <!-- soy build-time dependency only. see maven-antrun-plugin:generated-soyutils --> <dependency> <groupId>org.apache.ant</groupId> <artifactId>ant</artifactId> <version>1.8.3</version> <scope>provided</scope> <optional>true</optional> </dependency> <dependency> <groupId>org.mozilla</groupId> <artifactId>rhino</artifactId> <version>1.7R3</version> <scope>test</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.10</version> <scope>test</scope> </dependency> <dependency> <groupId>org.easymock</groupId> <artifactId>easymock</artifactId> <version>3.0</version> <scope>test</scope> </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>&copy; 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> </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> <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.6-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> </files> </requireFilesExist> <!-- 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> <!-- present in both junit and hamcrest-core --> <ignoreClass>org.hamcrest.*</ignoreClass> <ignoreClass>org.hamcrest.core.*</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.3</version> <configuration> <source>${java.version}</source> <target>${java.version}</target> <debug>true</debug> <debuglevel>lines,vars,source</debuglevel> <compilerArgument>-Werror</compilerArgument> <compilerArgument>-Xlint:deprecation</compilerArgument> </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>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>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>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>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> </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> </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>${soy.examples}/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}/examples_translated_{LOCALE}.xlf</argument> <argument>--compileTimeGlobalsFile</argument> <argument>${project.basedir}/javascript/examples/features-usage_globals.txt </argument> <argument>--inputPrefix</argument> <argument>${soy.examples}/</argument> <argument>simple.soy</argument> <argument>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>${soy.examples}/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>--inputPrefix</argument> <argument>${soy.examples}/</argument> <argument>simple.soy</argument> <argument>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> </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.0</version> <configuration> <archive> <manifestEntries> <Sealed>true</Sealed> </manifestEntries> </archive> </configuration> </plugin> </plugins> </build> </project>