You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cd...@apache.org on 2016/02/21 20:13:10 UTC
git commit: [flex-falcon] [refs/heads/feature/maven-migration] - -
Created a migration script that moves stuff around to be in a valid maven
directory structure - Created poms for each module,
that are able to build the compiler, compiler.jx and falcon-c
Repository: flex-falcon
Updated Branches:
refs/heads/feature/maven-migration [created] d20c2694f
- Created a migration script that moves stuff around to be in a valid maven directory structure
- Created poms for each module, that are able to build the compiler, compiler.jx and falcon-compiler-oem modules
- Created a new module "compiler-build-tools" that contains a maven plugin to perform all of the code generation, resource-generation, source-processing steps needed
- Created a new module "compiler-jburg-types" that contains the single interface, that is needed to generate the jburg emitters in the compiler project
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/d20c2694
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/d20c2694
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/d20c2694
Branch: refs/heads/feature/maven-migration
Commit: d20c2694f904da818b916c298a0f6def9681a96f
Parents: e78b3e1
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Sun Feb 21 20:12:58 2016 +0100
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Sun Feb 21 20:12:58 2016 +0100
----------------------------------------------------------------------
compiler-build-tools/pom.xml | 84 +++++
.../UnknownTreeHandlerGeneratorMojo.java | 76 ++++
.../compiler/tools/AnnotateClassesMojo.java | 135 +++++++
.../tools/BaseProblemGeneratorMojo.java | 127 +++++++
.../tools/ProblemEnumGeneratorMojo.java | 152 ++++++++
.../ProblemResourceBundleGeneratorMojo.java | 101 +++++
compiler-jburg-types/pom.xml | 26 ++
.../target/compiler.types-0.6.0-SNAPSHOT.jar | Bin 0 -> 8361 bytes
compiler.jx/pom.xml | 53 +++
compiler/pom.xml | 367 +++++++++++++++++++
flex-compiler-oem/pom.xml | 30 ++
migrate-to-maven.sh | 72 ++++
pom.xml | 62 ++++
13 files changed, 1285 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d20c2694/compiler-build-tools/pom.xml
----------------------------------------------------------------------
diff --git a/compiler-build-tools/pom.xml b/compiler-build-tools/pom.xml
new file mode 100644
index 0000000..1f89ea8
--- /dev/null
+++ b/compiler-build-tools/pom.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+
+ <parent>
+ <groupId>org.apache.flex.flexjs.compiler</groupId>
+ <artifactId>compiler-parent</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>compiler-build-tools</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+ <packaging>maven-plugin</packaging>
+
+ <name>Apache Flex - FlexJS Compiler: Build Tools</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.0.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-compiler-api</artifactId>
+ <version>2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.plugin-tools</groupId>
+ <artifactId>maven-plugin-annotations</artifactId>
+ <version>3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.3</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-plugin-plugin</artifactId>
+ <version>3.1</version>
+ <configuration>
+ <goalPrefix>compiler.build-tools</goalPrefix>
+ <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
+ </configuration>
+ <executions>
+ <execution>
+ <id>mojo-descriptor</id>
+ <goals>
+ <goal>descriptor</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>help-goal</id>
+ <goals>
+ <goal>helpmojo</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d20c2694/compiler-build-tools/src/main/java/org/apache/flex/compiler/internal/as/codegen/UnknownTreeHandlerGeneratorMojo.java
----------------------------------------------------------------------
diff --git a/compiler-build-tools/src/main/java/org/apache/flex/compiler/internal/as/codegen/UnknownTreeHandlerGeneratorMojo.java b/compiler-build-tools/src/main/java/org/apache/flex/compiler/internal/as/codegen/UnknownTreeHandlerGeneratorMojo.java
new file mode 100644
index 0000000..4bda610
--- /dev/null
+++ b/compiler-build-tools/src/main/java/org/apache/flex/compiler/internal/as/codegen/UnknownTreeHandlerGeneratorMojo.java
@@ -0,0 +1,76 @@
+package org.apache.flex.compiler.internal.as.codegen;
+
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.project.MavenProject;
+
+import java.io.File;
+
+/**
+ * Goal which touches a timestamp file.
+ */
+@Mojo(name="generate-unknown-tree-handler",defaultPhase = LifecyclePhase.GENERATE_SOURCES)
+public class UnknownTreeHandlerGeneratorMojo
+ extends AbstractMojo
+{
+ @Parameter(defaultValue="${project.basedir}/src/main/unknowntreehandler",property="inputDir",required=true)
+ private File inputDir;
+
+ @Parameter(property="inputFile",required=true)
+ private String inputFile;
+
+ @Parameter(defaultValue="${project.build.directory}/generated-sources/unknowntreehandler",property="outputDir",required=true)
+ private File outputDirectory;
+
+ @Parameter(property="outputFile",required=true)
+ private String outputFile;
+
+ @Parameter(defaultValue="${project}")
+ private MavenProject project;
+
+ public void execute()
+ throws MojoExecutionException
+ {
+ File input = new File(inputDir, inputFile);
+ if(!input.exists()) {
+ throw new MojoExecutionException("Could not read file: " + input.getAbsolutePath());
+ }
+
+ // Make sure the output directory exists.
+ File output = new File(outputDirectory, outputFile);
+ if(!output.getParentFile().exists()) {
+ if(!output.getParentFile().mkdirs()) {
+ throw new MojoExecutionException("Could not create output directory: " +
+ output.getParentFile().getAbsolutePath());
+ }
+ }
+
+ String[] args = {input.getAbsolutePath(), output.getAbsolutePath()};
+ try {
+ UnknownTreePatternInputOutput.main(args);
+ } catch(Exception e) {
+ throw new MojoExecutionException("Caught error while executing UnknownTreePatternInputOutput.main", e);
+ }
+
+ project.addCompileSourceRoot(outputDirectory.getPath());
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d20c2694/compiler-build-tools/src/main/java/org/apache/flex/compiler/tools/AnnotateClassesMojo.java
----------------------------------------------------------------------
diff --git a/compiler-build-tools/src/main/java/org/apache/flex/compiler/tools/AnnotateClassesMojo.java b/compiler-build-tools/src/main/java/org/apache/flex/compiler/tools/AnnotateClassesMojo.java
new file mode 100644
index 0000000..cae1ad7
--- /dev/null
+++ b/compiler-build-tools/src/main/java/org/apache/flex/compiler/tools/AnnotateClassesMojo.java
@@ -0,0 +1,135 @@
+package org.apache.flex.compiler.tools;
+
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.project.MavenProject;
+import org.codehaus.plexus.compiler.util.scan.InclusionScanException;
+import org.codehaus.plexus.compiler.util.scan.SimpleSourceInclusionScanner;
+import org.codehaus.plexus.compiler.util.scan.mapping.SuffixMapping;
+
+import java.io.*;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Goal which adds annotations to generated classes.
+ */
+@Mojo(name="add-class-annotation",defaultPhase = LifecyclePhase.PROCESS_SOURCES)
+public class AnnotateClassesMojo
+ extends AbstractMojo
+{
+ @Parameter
+ protected Set<String> includes = new HashSet<String>();
+
+ @Parameter
+ protected Set<String> excludes = new HashSet<String>();
+
+ @Parameter(defaultValue="${project.build.directory}/generated-sources")
+ private File directory;
+
+ @Parameter(property="annotation", required=true)
+ private String annotation;
+
+ public void execute()
+ throws MojoExecutionException
+ {
+ SuffixMapping mapping = new SuffixMapping("jbg", Collections.<String>emptySet());
+ SimpleSourceInclusionScanner scan = new SimpleSourceInclusionScanner(includes, excludes);
+ scan.addSourceMapping(mapping);
+
+ try {
+ Set<File> candidates = scan.getIncludedSources(directory, null);
+ for(File candidate : candidates) {
+ processFile(candidate);
+ }
+ } catch (InclusionScanException e) {
+ throw new MojoExecutionException("Error scanning filed to be processed.", e);
+ }
+ }
+
+ private void processFile(File file) {
+ if(!file.exists()) {
+ System.out.println("Missing file: " + file.getPath());
+ return;
+ }
+ System.out.println("Adding " + annotation + " to class: " + file.getPath());
+ try
+ {
+ // Prepare to read the file.
+ FileInputStream fileInputStream = new FileInputStream(file);
+ InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream);
+ BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
+
+ File tmpOutputFile = new File(file.getParentFile(), file.getName() + ".tmp");
+ FileOutputStream fileOutputStream = new FileOutputStream(tmpOutputFile);
+ PrintStream outputStream = new PrintStream(fileOutputStream);
+ try
+ {
+ // Read it line-by-line.
+ String line;
+ while ((line = bufferedReader.readLine()) != null)
+ {
+ // If the line starts with "public class", output the annotation on the previous line.
+ if (line.startsWith("public class") || line.startsWith("public interface")) {
+ outputStream.println(annotation);
+ }
+ outputStream.println(line);
+ }
+ }
+ finally
+ {
+ try {
+ bufferedReader.close();
+ } catch(Exception e) {
+ // Ignore.
+ }
+ try {
+ outputStream.close();
+ } catch(Exception e) {
+ // Ignore.
+ }
+ try {
+ fileOutputStream.close();
+ } catch(Exception e) {
+ // Ignore.
+ }
+ }
+
+ // Remove the original file.
+ if(!file.delete()) {
+ throw new MojoExecutionException("Error deleting original file at: " + file.getPath());
+ }
+
+ // Rename the temp file to the name of the original file.
+ if(!tmpOutputFile.renameTo(file)) {
+ throw new MojoExecutionException("Error renaming the temp file from: " + tmpOutputFile.getPath() +
+ " to: " + file.getPath());
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d20c2694/compiler-build-tools/src/main/java/org/apache/flex/compiler/tools/BaseProblemGeneratorMojo.java
----------------------------------------------------------------------
diff --git a/compiler-build-tools/src/main/java/org/apache/flex/compiler/tools/BaseProblemGeneratorMojo.java b/compiler-build-tools/src/main/java/org/apache/flex/compiler/tools/BaseProblemGeneratorMojo.java
new file mode 100644
index 0000000..38697ba
--- /dev/null
+++ b/compiler-build-tools/src/main/java/org/apache/flex/compiler/tools/BaseProblemGeneratorMojo.java
@@ -0,0 +1,127 @@
+package org.apache.flex.compiler.tools;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.Collections2;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.io.Files;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.FilenameUtils;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.nio.charset.Charset;
+import java.util.Collection;
+import java.util.Iterator;
+
+/**
+ * Created by christoferdutz on 20.02.16.
+ */
+public abstract class BaseProblemGeneratorMojo extends AbstractMojo
+{
+
+ private ImmutableSet<String> nonProblemClassesToFilter =
+ new ImmutableSet.Builder<String>()
+ .add("DefaultSeverity.java")
+ .add("CompositeProblemFilter.java")
+ .add("FilteredIterator.java")
+ .add("CompilerProblemSeverity.java")
+ .build();
+
+ abstract protected File getInputDirectory();
+ abstract protected File getOutputDirectory();
+ abstract protected String getOutputFile();
+
+ public void execute() throws MojoExecutionException
+ {
+ File generatedFile = new File(getOutputDirectory(), getOutputFile());
+
+ if(!generatedFile.getParentFile().exists()) {
+ if(!generatedFile.getParentFile().mkdirs()) {
+ throw new MojoExecutionException("Could not create output directory: " + generatedFile.getParentFile());
+ }
+ }
+
+ try {
+ PrintWriter writer = new PrintWriter(new FileWriter(generatedFile));
+ try {
+ printHeader(writer);
+
+ Collection<File> problemClassSourceFiles = getProblemClassSourceFiles(getInputDirectory());
+ Iterator<File> problemClassSourceFileIterator = problemClassSourceFiles.iterator();
+ while (problemClassSourceFileIterator.hasNext()) {
+ File problemClassSourceFile = problemClassSourceFileIterator.next();
+ printEntry(writer, problemClassSourceFile, !problemClassSourceFileIterator.hasNext());
+ }
+
+ printFooter(writer);
+ } finally {
+ writer.close();
+ }
+ } catch (IOException e) {
+ throw new MojoExecutionException("Caught Exception while trying to create output file: " + generatedFile);
+ }
+ }
+
+
+ protected void printHeader(PrintWriter writer) {
+ // Optional.
+ }
+
+ abstract protected void printEntry(PrintWriter writer, File source, boolean last);
+
+ protected void printFooter(PrintWriter writer) {
+ // Optional.
+ }
+
+ /**
+ * Recursively search a directory and its sub-directories for .class files.
+ * Use the file name to determine what equivalent class name should be
+ * available to the current classloader.
+ *
+ * @param dir - the directory to search
+ * @return list of source files found
+ */
+ protected Collection<File> getProblemClassSourceFiles(File dir)
+ {
+ Collection<File> problemFiles = FileUtils.listFiles(dir, new String[] { "java" }, true);
+ return Collections2.filter(problemFiles,
+ new Predicate<File>() {
+ @Override
+ public boolean apply(File input)
+ {
+ return isProblemClass(input);
+ }
+ });
+ }
+
+ private boolean isProblemClass(File javaFile)
+ {
+ if (nonProblemClassesToFilter.contains(javaFile.getName()))
+ return false;
+ final String javaClassName = FilenameUtils.getBaseName(javaFile.getAbsolutePath());
+ try
+ {
+ Collection<String> lines = Files.readLines(javaFile, Charset.forName("UTF8"));
+ for (String line : lines)
+ {
+ if (line.matches("^\\s*public\\s+final\\s+class\\s+" + javaClassName + "\\s+extends\\s+.*"))
+ return true;
+ if (line.matches("^\\s*final\\s+public\\s+class\\s+" + javaClassName + "\\s+extends\\s+.*"))
+ return true;
+ if (line.matches("^\\s*public\\s+class\\s+" + javaClassName + "\\s+extends\\s+.*"))
+ return true;
+ }
+ return false;
+ }
+ catch (IOException e)
+ {
+ return false;
+ }
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d20c2694/compiler-build-tools/src/main/java/org/apache/flex/compiler/tools/ProblemEnumGeneratorMojo.java
----------------------------------------------------------------------
diff --git a/compiler-build-tools/src/main/java/org/apache/flex/compiler/tools/ProblemEnumGeneratorMojo.java b/compiler-build-tools/src/main/java/org/apache/flex/compiler/tools/ProblemEnumGeneratorMojo.java
new file mode 100644
index 0000000..54b621b
--- /dev/null
+++ b/compiler-build-tools/src/main/java/org/apache/flex/compiler/tools/ProblemEnumGeneratorMojo.java
@@ -0,0 +1,152 @@
+package org.apache.flex.compiler.tools;
+
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.project.MavenProject;
+
+import java.io.File;
+import java.io.PrintWriter;
+
+/**
+ * Goal which touches a timestamp file.
+ */
+@Mojo(name="generate-problems-enum",defaultPhase = LifecyclePhase.GENERATE_SOURCES)
+public class ProblemEnumGeneratorMojo
+ extends BaseProblemGeneratorMojo
+{
+ @Parameter(defaultValue="${project.basedir}/src/main/java/org/apache/flex/compiler/problems",
+ property="inputDir", required=true)
+ private File inputDirectory;
+
+ @Parameter(defaultValue="${project.build.directory}/generated-sources/build-tools",
+ property="outputDir", required=true)
+ private File outputDirectory;
+
+ @Parameter(defaultValue="org/apache/flex/compiler/problems/ProblemID.java",
+ property="outputFile", required=true)
+ private String outputFile;
+
+ @Parameter(defaultValue="${project}")
+ private MavenProject project;
+
+ @Override
+ protected File getInputDirectory() {
+ return inputDirectory;
+ }
+
+ @Override
+ protected File getOutputDirectory() {
+ return outputDirectory;
+ }
+
+ @Override
+ protected String getOutputFile() {
+ return outputFile;
+ }
+
+ @Override
+ public void execute() throws MojoExecutionException {
+ super.execute();
+
+ // Add the output directory to the source path.
+ project.addCompileSourceRoot(outputDirectory.getPath());
+ }
+
+ @Override
+ protected void printHeader(PrintWriter writer) {
+ writer.println("/*");
+ writer.println(" * Licensed to the Apache Software Foundation (ASF) under one or more");
+ writer.println(" * contributor license agreements. See the NOTICE file distributed with");
+ writer.println(" * this work for additional information regarding copyright ownership.");
+ writer.println(" * The ASF licenses this file to You under the Apache License, Version 2.0");
+ writer.println(" * (the \"License\"); you may not use this file except in compliance with");
+ writer.println(" * the License. You may obtain a copy of the License at");
+ writer.println();
+ writer.println(" * http://www.apache.org/licenses/LICENSE-2.0");
+ writer.println();
+ writer.println(" * Unless required by applicable law or agreed to in writing, software");
+ writer.println(" * distributed under the License is distributed on an \"AS IS\" BASIS,");
+ writer.println(" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
+ writer.println(" * See the License for the specific language governing permissions and");
+ writer.println(" * limitations under the License.");
+ writer.println(" */");
+ writer.println();
+ writer.println("package org.apache.flex.compiler.problems;");
+ writer.println();
+ writer.println("import java.util.EnumSet;");
+ writer.println("import com.google.common.collect.ImmutableMap;");
+ writer.println();
+ writer.println("public enum ProblemID");
+ writer.println("{");
+ }
+
+ @Override
+ protected void printEntry(PrintWriter writer, File source, boolean last) {
+ writer.println(" " + getProblemEnumEntry(source.getName()) + (last ? ";" : ","));
+ }
+
+ @Override
+ protected void printFooter(PrintWriter writer) {
+ writer.println();
+ writer.println(" private ProblemID(Class<? extends CompilerProblem> problemClass)");
+ writer.println(" {");
+ writer.println(" this.problemClass = problemClass;");
+ writer.println(" }");
+ writer.println();
+ writer.println(" private final Class<? extends CompilerProblem> problemClass;");
+ writer.println(" public final Class<? extends CompilerProblem> getProblemClass()");
+ writer.println(" {");
+ writer.println(" return problemClass;");
+ writer.println(" }");
+ writer.println();
+ writer.println(" public static final ProblemID getID(ICompilerProblem problem)");
+ writer.println(" {");
+ writer.println(" final CompilerProblem problemImpl = (CompilerProblem)problem;");
+ writer.println(" return classToIDMap.get(problemImpl.getClass());");
+ writer.println(" }");
+ writer.println();
+ writer.println(" public static final ProblemID getID(Class<?> problemClass)");
+ writer.println(" {");
+ writer.println(" return classToIDMap.get(problemClass);");
+ writer.println(" }");
+ writer.println();
+ writer.println(" private static final ImmutableMap<Class<? extends CompilerProblem>, ProblemID> classToIDMap = createClassToIDMap();");
+ writer.println(" private static ImmutableMap<Class<? extends CompilerProblem>, ProblemID> createClassToIDMap()");
+ writer.println(" {");
+ writer.println(" final ImmutableMap.Builder<Class<? extends CompilerProblem>, ProblemID> builder = new ImmutableMap.Builder<Class<? extends CompilerProblem>, ProblemID>();");
+ writer.println(" for (ProblemID id : EnumSet.allOf(ProblemID.class))");
+ writer.println(" builder.put(id.getProblemClass(), id);");
+ writer.println(" return builder.build();");
+ writer.println(" }");
+ writer.println("}");
+ }
+
+ private static String getProblemEnumEntry(String problemClassName) {
+ String problemTypeName = problemClassName.substring(0, problemClassName.length() - "class".length());
+ String enumConstantName = getEnumName(problemTypeName.replaceAll("Problem$", ""));
+ return enumConstantName + "(" + problemTypeName + ".class" + ")";
+ }
+
+ private static String getEnumName(String problemTypeName) {
+ return "PROBLEM_" + problemTypeName;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d20c2694/compiler-build-tools/src/main/java/org/apache/flex/compiler/tools/ProblemResourceBundleGeneratorMojo.java
----------------------------------------------------------------------
diff --git a/compiler-build-tools/src/main/java/org/apache/flex/compiler/tools/ProblemResourceBundleGeneratorMojo.java b/compiler-build-tools/src/main/java/org/apache/flex/compiler/tools/ProblemResourceBundleGeneratorMojo.java
new file mode 100644
index 0000000..0424d41
--- /dev/null
+++ b/compiler-build-tools/src/main/java/org/apache/flex/compiler/tools/ProblemResourceBundleGeneratorMojo.java
@@ -0,0 +1,101 @@
+package org.apache.flex.compiler.tools;
+
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.project.MavenProject;
+
+import java.io.*;
+
+/**
+ * Goal which touches a timestamp file.
+ */
+@Mojo(name="generate-problems-resource-bundle",defaultPhase = LifecyclePhase.GENERATE_RESOURCES)
+public class ProblemResourceBundleGeneratorMojo
+ extends BaseProblemGeneratorMojo
+{
+ @Parameter(defaultValue="${project.basedir}/src/main/java/org/apache/flex/compiler/problems",
+ property="inputDir", required=true)
+ private File inputDirectory;
+
+ @Parameter(defaultValue="${project.build.directory}/classes/org/apache/flex/compiler",
+ property="outputDir", required=true)
+ private File outputDirectory;
+
+ @Parameter(defaultValue="messages_en.properties",
+ property="outputFile", required=true)
+ private String outputFile;
+
+ @Parameter(defaultValue="${project}")
+ private MavenProject project;
+
+ @Override
+ protected File getInputDirectory() {
+ return inputDirectory;
+ }
+
+ @Override
+ protected File getOutputDirectory() {
+ return outputDirectory;
+ }
+
+ @Override
+ protected String getOutputFile() {
+ return outputFile;
+ }
+
+ @Override
+ protected void printEntry(PrintWriter writer, File source, boolean last) {
+ writer.println(getProblemName(source) + "=" + getProblemDescription(source));
+ }
+
+ private String getProblemName(File sourceFile) {
+ String fileName = sourceFile.getName();
+ return fileName.substring(0, fileName.length() - "class".length());
+ }
+
+ private String getProblemDescription(File sourceFile) {
+ try {
+ BufferedReader sourceFileReader = new BufferedReader(new FileReader(sourceFile));
+ String line;
+ StringBuilder sb = null;
+ while((line = sourceFileReader.readLine()) != null) {
+ if(line.contains("DESCRIPTION")) {
+ sb = new StringBuilder();
+ }
+ if(sb != null) {
+ sb.append(line);
+ if(line.trim().endsWith(";")) {
+ break;
+ }
+ }
+ }
+ if(sb != null) {
+ line = sb.toString();
+ return line.substring(line.indexOf("\"") + 1, line.lastIndexOf("\""));
+ }
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return "";
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d20c2694/compiler-jburg-types/pom.xml
----------------------------------------------------------------------
diff --git a/compiler-jburg-types/pom.xml b/compiler-jburg-types/pom.xml
new file mode 100644
index 0000000..9edb810
--- /dev/null
+++ b/compiler-jburg-types/pom.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.flex.flexjs.compiler</groupId>
+ <artifactId>compiler-parent</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>compiler-jburg-types</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+
+ <name>Apache Flex - FlexJS Compiler: JBurg Types</name>
+ <description>Types needed by JBurg to perform it's code generation.</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>net.sourceforge.jburg</groupId>
+ <artifactId>jburg</artifactId>
+ <version>1.10.2</version>
+ </dependency>
+ </dependencies>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d20c2694/compiler-jburg-types/target/compiler.types-0.6.0-SNAPSHOT.jar
----------------------------------------------------------------------
diff --git a/compiler-jburg-types/target/compiler.types-0.6.0-SNAPSHOT.jar b/compiler-jburg-types/target/compiler.types-0.6.0-SNAPSHOT.jar
new file mode 100644
index 0000000..35eebcc
Binary files /dev/null and b/compiler-jburg-types/target/compiler.types-0.6.0-SNAPSHOT.jar differ
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d20c2694/compiler.jx/pom.xml
----------------------------------------------------------------------
diff --git a/compiler.jx/pom.xml b/compiler.jx/pom.xml
new file mode 100644
index 0000000..60da13e
--- /dev/null
+++ b/compiler.jx/pom.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.flex.flexjs.compiler</groupId>
+ <artifactId>compiler-parent</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>compiler-jx</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+
+ <name>Apache Flex - FlexJS Compiler: FalconJx Cross Compiler</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.flex.flexjs.compiler</groupId>
+ <artifactId>compiler</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>args4j</groupId>
+ <artifactId>args4j</artifactId>
+ <version>2.0.28</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codeartisans</groupId>
+ <artifactId>org.json</artifactId>
+ <version>20131017</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.javascript</groupId>
+ <artifactId>closure-compiler</artifactId>
+ <version>v20150609</version>
+ </dependency>
+ <dependency>
+ <groupId>org.clojure</groupId>
+ <artifactId>google-closure-library</artifactId>
+ <version>0.0-20150902-b129bb9e</version>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.10</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d20c2694/compiler/pom.xml
----------------------------------------------------------------------
diff --git a/compiler/pom.xml b/compiler/pom.xml
new file mode 100644
index 0000000..211d34c
--- /dev/null
+++ b/compiler/pom.xml
@@ -0,0 +1,367 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.flex.flexjs.compiler</groupId>
+ <artifactId>compiler-parent</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>compiler</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+
+ <name>Apache Flex - FlexJS Compiler</name>
+ <description>The Apache Flex Falcon Compiler</description>
+
+ <build>
+ <plugins>
+ <!--
+ Do all the JFlex code generation
+ -->
+ <plugin>
+ <groupId>de.jflex</groupId>
+ <artifactId>maven-jflex-plugin</artifactId>
+ <version>1.4.3</version>
+ <executions>
+ <execution>
+ <id>generate-raw-as-tokenizer</id>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>target/generated-sources/jflex</outputDirectory>
+ <lexDefinitions>
+ <lexDefinition>src/main/jflex/org/apache/flex/compiler/internal/parsing/as/RawASTokenizer.lex</lexDefinition>
+ </lexDefinitions>
+ <skeleton>src/main/jflex/org/apache/flex/compiler/internal/parsing/as/skeleton.falcon</skeleton>
+ </configuration>
+ </execution>
+ <execution>
+ <id>generate-raw-as-doc-tokenizer</id>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>target/generated-sources/jflex</outputDirectory>
+ <lexDefinitions>
+ <lexDefinition>src/main/jflex/org/apache/flex/compiler/internal/parsing/as/RawASDocTokenizer.lex</lexDefinition>
+ </lexDefinitions>
+ <skeleton>src/main/jflex/org/apache/flex/compiler/internal/parsing/as/skeleton.default</skeleton>
+ </configuration>
+ </execution>
+ <execution>
+ <id>generate-raw-mxml-tokenizer</id>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>target/generated-sources/jflex</outputDirectory>
+ <lexDefinitions>
+ <lexDefinition>src/main/jflex/org/apache/flex/compiler/internal/parsing/mxml/RawMXMLTokenizer.lex</lexDefinition>
+ </lexDefinitions>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!--
+ Do all the Antlr2 code generation
+ -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antlr-plugin</artifactId>
+ <version>2.0-beta-1</version>
+ <executions>
+ <execution>
+ <id>generate-as-parser</id>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <grammars>org/apache/flex/compiler/internal/parsing/as/ASParser.g</grammars>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>antlr</groupId>
+ <artifactId>antlr</artifactId>
+ <version>2.7.7</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+
+ <!--
+ The generation of the metadata-parser requires Antlr to
+ load ImportMetadataTokenTypes.txt. Unfortunately Altlr
+ looks in the current working directory. The only way to
+ force it to work, is to start a new process with the
+ working directory in the directory containing the file.
+ -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.4.0</version>
+ <executions>
+ <execution>
+ <id>generate-metadata-parser</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>java</executable>
+ <arguments>
+ <argument>-classpath</argument>
+ <classpath/>
+ <arguments>antlr.Tool</arguments>
+ <argument>-o</argument>
+ <argument>../../../../../../../../../../target/generated-sources/antlr/org/apache/flex/compiler/internal/parsing/as</argument>
+ <argument>MetadataParser.g</argument>
+ </arguments>
+ <workingDirectory>src/main/antlr/org/apache/flex/compiler/internal/parsing/as</workingDirectory>
+ <sourceRoot>target/generated-sources/antlr</sourceRoot>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>antlr</groupId>
+ <artifactId>antlr</artifactId>
+ <version>2.7.7</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+
+ <!--
+ Do all the JBurg code generation.
+ -->
+ <plugin>
+ <groupId>net.sourceforge.jburg</groupId>
+ <artifactId>jburg-maven-plugin</artifactId>
+ <version>2.0.10-SNAPSHOT</version>
+ <extensions>true</extensions>
+ <executions>
+ <execution>
+ <id>generate-css-emitter</id>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <includes>
+ <include>CSSEmitter.jbg</include>
+ </includes>
+ <sourceDirectory>src/main/jburg/org/apache/flex/compiler/internal/css/codegen</sourceDirectory>
+ <outputDirectory>target/generated-sources/jburg/org/apache/flex/compiler/internal/css/codegen</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>generate-cmc-emitter</id>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <includes>
+ <include>CmcEmitter.jbg</include>
+ </includes>
+ <sourceDirectory>src/main/jburg/org/apache/flex/compiler/internal/as/codegen</sourceDirectory>
+ <outputDirectory>target/generated-sources/jburg/org/apache/flex/compiler/internal/as/codegen</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ <configuration>
+ <!-- debug=true generates the "dump" method for Emitters, which is used for debugging -->
+ <debug>true</debug>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>net.sourceforge.jburg</groupId>
+ <artifactId>jburg</artifactId>
+ <version>1.10.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.flex.flexjs.compiler</groupId>
+ <artifactId>compiler-jburg-types</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+
+ <!--
+ Do all the Antlr3 code generation.
+ -->
+ <plugin>
+ <groupId>org.antlr</groupId>
+ <artifactId>antlr3-maven-plugin</artifactId>
+ <version>3.5.2</version>
+ <executions>
+ <execution>
+ <id>generate-csslexer-and-cssparser</id>
+ <goals>
+ <goal>antlr</goal>
+ </goals>
+ <configuration>
+ <includes>
+ <include>CSS.g</include>
+ </includes>
+ <sourceDirectory>src/main/antlr3/org/apache/flex/compiler/internal/css</sourceDirectory>
+ <outputDirectory>target/generated-sources/antlr3/org/apache/flex/compiler/internal/css</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>generate-csstree</id>
+ <goals>
+ <goal>antlr</goal>
+ </goals>
+ <configuration>
+ <includes>
+ <include>CSSTree.g</include>
+ </includes>
+ <sourceDirectory>src/main/antlr3/org/apache/flex/compiler/internal/css</sourceDirectory>
+ <outputDirectory>target/generated-sources/antlr3/org/apache/flex/compiler/internal/css</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <!--
+ Do all the custom processing with the falcon build tools.
+ -->
+ <plugin>
+ <groupId>org.apache.flex.flexjs.compiler</groupId>
+ <artifactId>compiler-build-tools</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <id>generate-unknown-tree-handler</id>
+ <goals>
+ <goal>generate-unknown-tree-handler</goal>
+ </goals>
+ <configuration>
+ <inputFile>org/apache/flex/compiler/internal/as/codegen/UnknownTreeHandlerPatterns.xml</inputFile>
+ <outputFile>org/apache/flex/compiler/internal/as/codegen/UnknownTreeHandlerPatterns.java</outputFile>
+ </configuration>
+ </execution>
+ <execution>
+ <id>add-suppress-unused-warnings-annotations</id>
+ <goals>
+ <goal>add-class-annotation</goal>
+ </goals>
+ <configuration>
+ <includes>
+ <include>antlr/org/apache/flex/compiler/internal/parsing/as/ASParser.java</include>
+ <include>antlr/org/apache/flex/compiler/internal/parsing/as/ASTokenTypes.java</include>
+ <include>antlr/org/apache/flex/compiler/internal/parsing/as/MetadataTokenTypes.java</include>
+ </includes>
+ <annotation>@SuppressWarnings("unused")</annotation>
+ </configuration>
+ </execution>
+ <execution>
+ <id>add-suppress-all-warnings-annotations-jburg</id>
+ <goals>
+ <goal>add-class-annotation</goal>
+ </goals>
+ <configuration>
+ <includes>
+ <include>antlr/org/apache/flex/compiler/internal/parsing/as/MetadataParser.java</include>
+ </includes>
+ <annotation>@SuppressWarnings("all")</annotation>
+ </configuration>
+ </execution>
+ <execution>
+ <id>add-suppress-rawtypes-unchecked-unused-warnings-annotations</id>
+ <goals>
+ <goal>add-class-annotation</goal>
+ </goals>
+ <configuration>
+ <includes>
+ <include>jburg/org/apache/flex/compiler/internal/css/codegen/CSSEmitter.java</include>
+ <include>jburg/org/apache/flex/compiler/internal/as/codegen/CmcEmitter.java</include>
+ </includes>
+ <annotation>@SuppressWarnings({"rawtypes", "unchecked", "unused"})</annotation>
+ </configuration>
+ </execution>
+ <execution>
+ <id>generate-problems-enum</id>
+ <goals>
+ <goal>generate-problems-enum</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>generate-problems-resource-bundle</id>
+ <goals>
+ <goal>generate-problems-resource-bundle</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <!-- Make the surefire execute all unit-tests -->
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>**/*Tests.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.flex.flexjs.compiler</groupId>
+ <artifactId>compiler-jburg-types</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.flex</groupId>
+ <artifactId>flex-tool-api</artifactId>
+ <version>1.0.0</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-cli</groupId>
+ <artifactId>commons-cli</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.antlr</groupId>
+ <artifactId>antlr</artifactId>
+ <version>3.3</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <version>17.0</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sourceforge.jburg</groupId>
+ <artifactId>jburg</artifactId>
+ <version>1.10.2</version>
+ </dependency>
+ <dependency>
+ <groupId>de.jflex</groupId>
+ <artifactId>jflex</artifactId>
+ <version>1.6.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.b1.pack</groupId>
+ <artifactId>lzma-sdk-4j</artifactId>
+ <version>9.22.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.10</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d20c2694/flex-compiler-oem/pom.xml
----------------------------------------------------------------------
diff --git a/flex-compiler-oem/pom.xml b/flex-compiler-oem/pom.xml
new file mode 100644
index 0000000..5bd620c
--- /dev/null
+++ b/flex-compiler-oem/pom.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.flex.flexjs.compiler</groupId>
+ <artifactId>compiler-parent</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>flex-compiler-oem</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+
+ <name>Apache Flex - FlexJS Compiler: OEM Layer</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.flex.compiler</groupId>
+ <artifactId>falcon-compiler</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.flex.compiler</groupId>
+ <artifactId>swfutils</artifactId>
+ <version>4.15.0</version>
+ </dependency>
+ </dependencies>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d20c2694/migrate-to-maven.sh
----------------------------------------------------------------------
diff --git a/migrate-to-maven.sh b/migrate-to-maven.sh
new file mode 100755
index 0000000..3f0c317
--- /dev/null
+++ b/migrate-to-maven.sh
@@ -0,0 +1,72 @@
+#!/usr/bin/env bash
+
+#############################################
+## Convert the flex-compiler-oem module
+#############################################
+mkdir -p flex-compiler-oem/src/main/java
+git mv flex-compiler-oem/src/flex2 flex-compiler-oem/src/main/java
+git mv flex-compiler-oem/src/macromedia flex-compiler-oem/src/main/java
+git add compiler/src/main
+
+#############################################
+## Convert the compiler module
+#############################################
+# Extract the UnknownTreePatternInputOutput generator.
+git mv compiler/src/org/apache/flex/compiler/internal/as/codegen/UnknownTreePatternInputOutput.java compiler-build-tools/src/main/java/org/apache/flex/compiler/internal/as/codegen
+# Extract the IASNodeAdapter as this is needed for generating code in the compiler.
+mkdir -p compiler-jburg-types/src/main/java/org/apache/flex/compiler/internal/as/codegen
+git mv compiler/src/org/apache/flex/compiler/internal/as/codegen/IASNodeAdapter.java compiler-jburg-types/src/main/java/org/apache/flex/compiler/internal/as/codegen
+# Convert the compiler project itself
+mkdir -p compiler/src/main/java
+mkdir -p compiler/src/main/resources
+mkdir -p compiler/src/main/jflex/org/apache/flex/compiler/internal/parsing/as
+git mv compiler/src/org/apache/flex/compiler/internal/parsing/as/*.lex compiler/src/main/jflex/org/apache/flex/compiler/internal/parsing/as
+git mv compiler/src/org/apache/flex/compiler/internal/parsing/as/skeleton.* compiler/src/main/jflex/org/apache/flex/compiler/internal/parsing/as
+mkdir -p compiler/src/main/jflex/org/apache/flex/compiler/internal/parsing/mxml
+git mv compiler/src/org/apache/flex/compiler/internal/parsing/mxml/*.lex compiler/src/main/jflex/org/apache/flex/compiler/internal/parsing/mxml
+mkdir -p compiler/src/main/antlr/org/apache/flex/compiler/internal/parsing/as
+git mv compiler/src/org/apache/flex/compiler/internal/parsing/as/ASParser.g compiler/src/main/antlr/org/apache/flex/compiler/internal/parsing/as
+git mv compiler/src/org/apache/flex/compiler/internal/parsing/as/MetadataParser.g compiler/src/main/antlr/org/apache/flex/compiler/internal/parsing/as
+git mv compiler/src/org/apache/flex/compiler/internal/parsing/as/ImportMetadataTokenTypes.txt compiler/src/main/antlr/org/apache/flex/compiler/internal/parsing/as
+mkdir -p compiler/src/main/jburg/org/apache/flex/compiler/internal/css/codegen
+git mv compiler/src/org/apache/flex/compiler/internal/css/codegen/*.jbg compiler/src/main/jburg/org/apache/flex/compiler/internal/css/codegen
+mkdir -p compiler/src/main/antlr3/org/apache/flex/compiler/internal/css
+git mv compiler/src/org/apache/flex/compiler/internal/css/*.g compiler/src/main/antlr3/org/apache/flex/compiler/internal/css
+mkdir -p compiler/src/main/jburg/org/apache/flex/compiler/internal/as/codegen
+git mv compiler/src/org/apache/flex/compiler/internal/as/codegen/*.jbg compiler/src/main/jburg/org/apache/flex/compiler/internal/as/codegen
+git mv compiler/src/main/jburg/org/apache/flex/compiler/internal/as/codegen/cmc.jbg compiler/src/main/jburg/org/apache/flex/compiler/internal/as/codegen/CmcEmitter.jbg
+git mv compiler/src/main/jburg/org/apache/flex/compiler/internal/css/codegen/css.jbg compiler/src/main/jburg/org/apache/flex/compiler/internal/css/codegen/CSSEmitter.jbg
+mkdir -p compiler/src/main/unknowntreehandler/org/apache/flex/compiler/internal/as/codegen
+git mv compiler/src/org/apache/flex/compiler/internal/as/codegen/UnknownTreeHandlerPatterns.xml compiler/src/main/unknowntreehandler/org/apache/flex/compiler/internal/as/codegen
+git mv compiler/src/org compiler/src/main/java
+git mv compiler/src/META-INF compiler/src/main/resources
+git mv compiler/src/overview.html compiler/src/main/resources
+git add compiler/src/main
+# Separate the resource bundles.
+mkdir -p compiler/src/main/resources/org/apache/flex/compiler
+git mv compiler/src/main/java/org/apache/flex/compiler/messages_*.properties compiler/src/main/resources/org/apache/flex/compiler
+# Clean up some invalidly named files
+git mv compiler/src/main/java/org/apache/flex/compiler/internal/css/package.hmtl compiler/src/main/java/org/apache/flex/compiler/internal/css/package.html
+git mv compiler/src/main/java/org/apache/flex/compiler/tree/mxml/index.html compiler/src/main/java/org/apache/flex/compiler/tree/mxml/package.html
+# Move the tests from the separate project into the compiler project
+mkdir -p compiler/src/test/java
+mkdir -p compiler/temp
+mkdir -p compiler/results
+git mv compiler.tests/unit-tests/org compiler/src/test/java
+git mv compiler.tests/src/org/apache/flex/utils compiler/src/test/java/org/apache/flex
+
+#############################################
+## Convert the compiler.jx module
+#############################################
+mkdir -p compiler.jx/src/main/java
+mkdir -p compiler.jx/src/main/resources
+git mv compiler.jx/src/META-INF compiler.jx/src/main/resources
+git mv compiler.jx/src/com compiler.jx/src/main/java
+git mv compiler.jx/src/org compiler.jx/src/main/java
+# compiler.jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/flexjs/Notes_JSFlexJSEmitter.txt
+# Move the tests from the separate project into the compiler.jx project
+mkdir -p compiler.jx/src/test/java
+git mv compiler.jx.tests/src/org compiler.jx/src/test/java
+mkdir -p compiler.jx/src/test/resources
+git mv compiler.jx.tests/test-files/* compiler.jx/src/test/resources
+
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d20c2694/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..0a2a491
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+
+ <parent>
+ <groupId>org.apache</groupId>
+ <artifactId>apache</artifactId>
+ <version>14</version>
+ </parent>
+
+ <groupId>org.apache.flex.flexjs.compiler</groupId>
+ <artifactId>compiler-parent</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>Apache Flex - FlexJS Compiler: Parent</name>
+ <description>The Apache Flex FlexJS Compiler Parent</description>
+
+ <mailingLists>
+ <mailingList>
+ <name>Apache Flex User List</name>
+ <subscribe>users-subscribe@flex.apache.org</subscribe>
+ <unsubscribe>users-unsubscribe@flex.apache.org</unsubscribe>
+ <post>users@flex.apache.org</post>
+ <archive>http://mail-archives.apache.org/mod_mbox/flex-users/</archive>
+ </mailingList>
+ </mailingLists>
+
+ <scm>
+ <connection>scm:svn:https://git-wip-us.apache.org/repos/asf/flex-falcon.git</connection>
+ <developerConnection>scm:svn:https://git-wip-us.apache.org/repos/asf/flex-falcon.git</developerConnection>
+ <url>https://git-wip-us.apache.org/repos/asf/flex-falcon.git</url>
+ </scm>
+
+ <properties>
+ <java.version>1.6</java.version>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <modules>
+ <module>compiler</module>
+ <module>compiler.jx</module>
+ <module>compiler-build-tools</module>
+ <module>compiler-jburg-types</module>
+ <module>flex-compiler-oem</module>
+ </modules>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.5.1</version>
+ <configuration>
+ <source>${java.version}</source>
+ <target>${java.version}</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file