HI Josh,
I rebuild and test and added the List example and can confirm now all is
working ok.
Thanks! :)

El mar., 10 dic. 2019 a las 18:33, Josh Tynjala (<[email protected]>)
escribió:

> I'm referring to mxml-2009-manifest.xml, which is a new file (for Maven, at
> least) that is necessary to fix the issue.
>
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
>
>
> On Tue, Dec 10, 2019 at 9:28 AM Alex Harui <[email protected]>
> wrote:
>
> > AIUI, these xml files are already copied.
> >
> > -Alex
> >
> > On 12/10/19, 8:43 AM, "Josh Tynjala" <[email protected]> wrote:
> >
> >     Yes, copying some kind of file would be better probably. No clue how
> > to do
> >     that in Maven, but I guess I'll see if we have some other code that
> > copies
> >     files from your suggested src/main/resources/config location.
> >
> >     --
> >     Josh Tynjala
> >     Bowler Hat LLC <
> >
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbowlerhat.dev&amp;data=02%7C01%7Caharui%40adobe.com%7C5d734064c1c24153112708d77d902250%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637115930324628386&amp;sdata=vUMS60pGlShke3Nr36rnD%2BNpgDOTVYsOv8VFVEFPm5A%3D&amp;reserved=0
> > >
> >
> >
> >     On Mon, Dec 9, 2019 at 8:53 PM Alex Harui <[email protected]>
> > wrote:
> >
> >     > Is there a reason this wasn't fixed by changing the *.xml files in
> >     > royale-maven-plugin/src/main/resources/config?
> >     >
> >     > I would rather not see this in code.
> >     >
> >     > Of course, I could be wrong...
> >     > -Alex
> >     >
> >     > On 12/9/19, 1:29 PM, "[email protected]" <
> > [email protected]>
> >     > wrote:
> >     >
> >     >     This is an automated email from the ASF dual-hosted git
> > repository.
> >     >
> >     >     joshtynjala pushed a commit to branch develop
> >     >     in repository
> >     >
> >
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitbox.apache.org%2Frepos%2Fasf%2Froyale-compiler.git&amp;data=02%7C01%7Caharui%40adobe.com%7C5d734064c1c24153112708d77d902250%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637115930324628386&amp;sdata=Zw%2BYmLrpuPNSWL4ynBPNWccgWgtyE%2FxZrN7JH897Hkc%3D&amp;reserved=0
> >     >
> >     >
> >     >     The following commit(s) were added to refs/heads/develop by
> this
> > push:
> >     >          new 68133c6  royale-maven-plugin: BaseMojo provides
> missing
> >     > mxml-2009-manifest.xml that is required to use core types like
> Array,
> >     > String, Boolean, etc. in MXML (closes #103)
> >     >     68133c6 is described below
> >     >
> >     >     commit 68133c6a17ad593d970b2972d99acae094d4ed20
> >     >     Author: Josh Tynjala <[email protected]>
> >     >     AuthorDate: Mon Dec 9 12:53:02 2019 -0800
> >     >
> >     >         royale-maven-plugin: BaseMojo provides missing
> >     > mxml-2009-manifest.xml that is required to use core types like
> Array,
> >     > String, Boolean, etc. in MXML (closes #103)
> >     >     ---
> >     >      .../java/org/apache/royale/maven/BaseMojo.java     | 45
> >     > +++++++++++++++++++++-
> >     >      1 file changed, 44 insertions(+), 1 deletion(-)
> >     >
> >     >     diff --git
> >     >
> > a/royale-maven-plugin/src/main/java/org/apache/royale/maven/BaseMojo.java
> >     >
> > b/royale-maven-plugin/src/main/java/org/apache/royale/maven/BaseMojo.java
> >     >     index c4c91c2..6cf3509 100644
> >     >     ---
> >     >
> > a/royale-maven-plugin/src/main/java/org/apache/royale/maven/BaseMojo.java
> >     >     +++
> >     >
> > b/royale-maven-plugin/src/main/java/org/apache/royale/maven/BaseMojo.java
> >     >     @@ -108,6 +108,21 @@ public abstract class BaseMojo
> >     >
> >     >          protected abstract File getOutput() throws
> > MojoExecutionException;
> >     >
> >     >     +    protected String getLanguageManifestFileName()
> >     >     +    {
> >     >     +        return "mxml-2009-manifest.xml";
> >     >     +    }
> >     >     +
> >     >     +    protected String getLanguageNamespaceURI()
> >     >     +    {
> >     >     +        return "
> >     >
> >
> https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&amp;data=02%7C01%7Caharui%40adobe.com%7C5d734064c1c24153112708d77d902250%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637115930324628386&amp;sdata=8HH8QDq3aUZO1SRHL%2F3FyKPilX6DzF7j4GysswA0UbY%3D&amp;reserved=0
> >     > ";
> >     >     +    }
> >     >     +
> >     >     +    protected String getLanguageManifestContents()
> >     >     +    {
> >     >     +        return "<?xml
> >     > version=\"1.0\"?>\n<componentPackage>\n<component id=\"Array\"
> >     > class=\"Array\" lookupOnly=\"true\"/>\n<component id=\"Boolean\"
> >     > class=\"Boolean\" lookupOnly=\"true\"/>\n<component id=\"Class\"
> >     > class=\"Class\" lookupOnly=\"true\"/>\n<component id=\"Date\"
> >     > class=\"Date\" lookupOnly=\"true\"/>\n<component id=\"DesignLayer\"
> >     > class=\"mx.core.DesignLayer\"/>\n<component id=\"Function\"
> >     > class=\"Function\" lookupOnly=\"true\"/>\n<component id=\"int\"
> >     > class=\"int\" lookupOnl [...]
> >     >     +    }
> >     >     +
> >     >          protected VelocityContext getVelocityContext() throws
> >     > MojoExecutionException {
> >     >              VelocityContext context = new VelocityContext();
> >     >
> >     >     @@ -130,7 +145,12 @@ public abstract class BaseMojo
> >     >              context.put("swfExternalLibraries",
> > swfExternalLibraries);
> >     >              context.put("themeLibraries", themeLibraries);
> >     >              context.put("sourcePaths", sourcePaths);
> >     >     -        context.put("namespaces", getNamespaces());
> >     >     +        List<Namespace> namespaces = getNamespaces();
> >     >     +        // not good to put the language namespace into
> >     > getNamespaces() because
> >     >     +        // the result of getNamespaces() is used in places
> > where the
> >     > language
> >     >     +        // namespace should not be included.
> >     >     +        namespaces.add(getLanguageNamespace());
> >     >     +        context.put("namespaces", namespaces);
> >     >              context.put("jsNamespaces", getNamespacesJS());
> >     >              context.put("namespaceUris", getNamespaceUris());
> >     >              context.put("includeClasses", includeClasses);
> >     >     @@ -163,6 +183,14 @@ public abstract class BaseMojo
> >     >              return namespaces;
> >     >          }
> >     >
> >     >     +    protected Namespace getLanguageNamespace() {
> >     >     +        File manifestFile = new File(outputDirectory,
> >     > getLanguageManifestFileName());
> >     >     +        Namespace namespace = new Namespace();
> >     >     +        namespace.setUri(getLanguageNamespaceURI());
> >     >     +        namespace.setManifest(manifestFile.getAbsolutePath());
> >     >     +        return namespace;
> >     >     +    }
> >     >     +
> >     >          protected List<Namespace> getNamespacesJS() {
> >     >              List<Namespace> namespaces = new
> > LinkedList<Namespace>();
> >     >              if(this.namespaces != null) {
> >     >     @@ -293,6 +321,21 @@ public abstract class BaseMojo
> >     >                      }
> >     >                  }
> >     >              }
> >     >     +        File manifestFile = new File(outputDirectory,
> >     > getLanguageManifestFileName());
> >     >     +        try {
> >     >     +            writer = new FileWriter(manifestFile);
> >     >     +            writer.write(getLanguageManifestContents());
> >     >     +        } catch (IOException e) {
> >     >     +            throw new MojoExecutionException("Error creating
> > config
> >     > file at " + configFile.getPath());
> >     >     +        } finally {
> >     >     +            if(writer != null) {
> >     >     +                try {
> >     >     +                    writer.close();
> >     >     +                } catch (IOException e) {
> >     >     +                    throw new MojoExecutionException("Error
> > creating
> >     > config file at " + configFile.getPath());
> >     >     +                }
> >     >     +            }
> >     >     +        }
> >     >
> >     >              // Get the tool group.
> >     >              FlexToolRegistry toolRegistry = new
> FlexToolRegistry();
> >     >
> >     >
> >     >
> >     >
> >
> >
> >
>


-- 
Carlos Rovira
http://about.me/carlosrovira

Reply via email to