You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Alex Harui <ah...@adobe.com> on 2017/03/03 23:45:12 UTC

[FlexJS][Maven] JS-only

Hey Maven Experts,

Over in the flex-asjs branch named "dual", I am trying to get the projects
in examples/native to build.  The two projects that build in Ant are
ButtonExample and USStatesMap.  These projects do not produce a SWF, only
HTML/JS/CSS.  In Maven, ButtonExample now compiles cleanly, but then fails
with: 

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-install-plugin:2.5.2:install
(default-install) on project ButtonExample: The packaging for this project
did not assign a file to the build artifact -> [Help 1]

The AppMojo seems to make the SWF the artifact, but in this case there
won't be one.  What is the right thing to do here?

I've disabled the native folder in the pom for now.  You should be able to
grab the flex-falcon dual branch and flex-asjs dual branch and use Maven
to reproduce this.

Thanks,
-Alex


Re: [FlexJS][Maven] JS-only

Posted by Alex Harui <ah...@adobe.com>.
Ok, looks like I removed the typedefs mojo "temporarily" and never
replaced it.  I think it will work now.

-Alex

On 3/4/17, 9:58 AM, "Alex Harui" <ah...@adobe.com> wrote:

>I think I never ran maven in typedefs.  But they are swc not app so use a
>different mojo?
>
>Get Outlook for Android<https://aka.ms/ghei36>
>
>
>________________________________
>From: Christofer Dutz <ch...@c-ware.de>
>Sent: Saturday, March 4, 2017 9:39:26 AM
>To: dev@flex.apache.org
>Subject: Re: [FlexJS][Maven] JS-only
>
>Hi Alex,
>
>So I switched to the dual branch and built the compiler without problems.
>When building the typedefs however I am getting the exact same error in
>the JS module.
>I guess I will have to adjust the was the typedefs are built. I can see
>that the AS code is being generated correctly, but that is no longer
>compiled to an SWC.
>
>Any ideas? I’ll have a look at the asjs module right away.
>
>Chris
>
>Am 04.03.17, 18:23 schrieb "Alex Harui" <ah...@adobe.com>:
>
>
>
>    On 3/4/17, 1:11 AM, "Christofer Dutz" <ch...@c-ware.de>
>wrote:
>
>    >Hi Alex,
>    >
>    >If you have a flexjs module, that produces just the JavaScript, you
>need
>    >to configure another plugin to pack that up as a war archive as maven
>    >doesn’t support directories as build artifacts.
>    >So you would need to add that (see the output of the archetype for
>pure
>    >JS applications). In the case of the other native application that
>    >shouldn’t produce an SWF, just set
>    >“<outputJavaScript>true</outputJavaScript>” … If you like, I could
>give
>    >you a hand on this … would I need just the dual branch of the asjs or
>    >from all modules?
>
>    It would be great if you would deal with this.  You will need the dual
>    branch from flex-falcon and flex-asjs,  Flex-typedefs doesn't have a
>dual
>    branch.
>
>    I think the WAR package is already in the process since if you have a
>SWF,
>    it appears some later step creates the WAR.  I'm assuming that
>because the
>    SWF artifact doesn't exist the build fails before getting to the WAR
>step.
>
>    My hope is that folks can easily switch between generating just SWF
>    output, just JS output, or both.  There is a new compiler.targets
>option
>    that drives that, and I've taken out the outputJavaScript option.
>Maybe
>    that's not the Maven way, but this way folks don't have to configure a
>    second execution with the outputJavaScript option on.
>
>    Thoughts?
>    -Alex
>
>
>


Re: [FlexJS][Maven] JS-only

Posted by Alex Harui <ah...@adobe.com>.
I think I never ran maven in typedefs.  But they are swc not app so use a different mojo?

Get Outlook for Android<https://aka.ms/ghei36>


________________________________
From: Christofer Dutz <ch...@c-ware.de>
Sent: Saturday, March 4, 2017 9:39:26 AM
To: dev@flex.apache.org
Subject: Re: [FlexJS][Maven] JS-only

Hi Alex,

So I switched to the dual branch and built the compiler without problems. When building the typedefs however I am getting the exact same error in the JS module.
I guess I will have to adjust the was the typedefs are built. I can see that the AS code is being generated correctly, but that is no longer compiled to an SWC.

Any ideas? I’ll have a look at the asjs module right away.

Chris

Am 04.03.17, 18:23 schrieb "Alex Harui" <ah...@adobe.com>:



    On 3/4/17, 1:11 AM, "Christofer Dutz" <ch...@c-ware.de> wrote:

    >Hi Alex,
    >
    >If you have a flexjs module, that produces just the JavaScript, you need
    >to configure another plugin to pack that up as a war archive as maven
    >doesn’t support directories as build artifacts.
    >So you would need to add that (see the output of the archetype for pure
    >JS applications). In the case of the other native application that
    >shouldn’t produce an SWF, just set
    >“<outputJavaScript>true</outputJavaScript>” … If you like, I could give
    >you a hand on this … would I need just the dual branch of the asjs or
    >from all modules?

    It would be great if you would deal with this.  You will need the dual
    branch from flex-falcon and flex-asjs,  Flex-typedefs doesn't have a dual
    branch.

    I think the WAR package is already in the process since if you have a SWF,
    it appears some later step creates the WAR.  I'm assuming that because the
    SWF artifact doesn't exist the build fails before getting to the WAR step.

    My hope is that folks can easily switch between generating just SWF
    output, just JS output, or both.  There is a new compiler.targets option
    that drives that, and I've taken out the outputJavaScript option.  Maybe
    that's not the Maven way, but this way folks don't have to configure a
    second execution with the outputJavaScript option on.

    Thoughts?
    -Alex




Re: [FlexJS][Maven] JS-only

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Alex, 

So I switched to the dual branch and built the compiler without problems. When building the typedefs however I am getting the exact same error in the JS module.
I guess I will have to adjust the was the typedefs are built. I can see that the AS code is being generated correctly, but that is no longer compiled to an SWC.

Any ideas? I’ll have a look at the asjs module right away.

Chris

Am 04.03.17, 18:23 schrieb "Alex Harui" <ah...@adobe.com>:

    
    
    On 3/4/17, 1:11 AM, "Christofer Dutz" <ch...@c-ware.de> wrote:
    
    >Hi Alex,
    >
    >If you have a flexjs module, that produces just the JavaScript, you need
    >to configure another plugin to pack that up as a war archive as maven
    >doesn’t support directories as build artifacts.
    >So you would need to add that (see the output of the archetype for pure
    >JS applications). In the case of the other native application that
    >shouldn’t produce an SWF, just set
    >“<outputJavaScript>true</outputJavaScript>” … If you like, I could give
    >you a hand on this … would I need just the dual branch of the asjs or
    >from all modules?
    
    It would be great if you would deal with this.  You will need the dual
    branch from flex-falcon and flex-asjs,  Flex-typedefs doesn't have a dual
    branch.
    
    I think the WAR package is already in the process since if you have a SWF,
    it appears some later step creates the WAR.  I'm assuming that because the
    SWF artifact doesn't exist the build fails before getting to the WAR step.
    
    My hope is that folks can easily switch between generating just SWF
    output, just JS output, or both.  There is a new compiler.targets option
    that drives that, and I've taken out the outputJavaScript option.  Maybe
    that's not the Maven way, but this way folks don't have to configure a
    second execution with the outputJavaScript option on.
    
    Thoughts?
    -Alex
    
    


Re: [FlexJS][Maven] JS-only

Posted by Alex Harui <ah...@adobe.com>.

On 3/4/17, 1:11 AM, "Christofer Dutz" <ch...@c-ware.de> wrote:

>Hi Alex,
>
>If you have a flexjs module, that produces just the JavaScript, you need
>to configure another plugin to pack that up as a war archive as maven
>doesn’t support directories as build artifacts.
>So you would need to add that (see the output of the archetype for pure
>JS applications). In the case of the other native application that
>shouldn’t produce an SWF, just set
>“<outputJavaScript>true</outputJavaScript>” … If you like, I could give
>you a hand on this … would I need just the dual branch of the asjs or
>from all modules?

It would be great if you would deal with this.  You will need the dual
branch from flex-falcon and flex-asjs,  Flex-typedefs doesn't have a dual
branch.

I think the WAR package is already in the process since if you have a SWF,
it appears some later step creates the WAR.  I'm assuming that because the
SWF artifact doesn't exist the build fails before getting to the WAR step.

My hope is that folks can easily switch between generating just SWF
output, just JS output, or both.  There is a new compiler.targets option
that drives that, and I've taken out the outputJavaScript option.  Maybe
that's not the Maven way, but this way folks don't have to configure a
second execution with the outputJavaScript option on.

Thoughts?
-Alex


Re: [FlexJS][Maven] JS-only

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Alex,

If you have a flexjs module, that produces just the JavaScript, you need to configure another plugin to pack that up as a war archive as maven doesn’t support directories as build artifacts. 
So you would need to add that (see the output of the archetype for pure JS applications). In the case of the other native application that shouldn’t produce an SWF, just set “<outputJavaScript>true</outputJavaScript>” … If you like, I could give you a hand on this … would I need just the dual branch of the asjs or from all modules?

Chris

Am 04.03.17, 00:45 schrieb "Alex Harui" <ah...@adobe.com>:

    Hey Maven Experts,
    
    Over in the flex-asjs branch named "dual", I am trying to get the projects
    in examples/native to build.  The two projects that build in Ant are
    ButtonExample and USStatesMap.  These projects do not produce a SWF, only
    HTML/JS/CSS.  In Maven, ButtonExample now compiles cleanly, but then fails
    with: 
    
    [ERROR] Failed to execute goal
    org.apache.maven.plugins:maven-install-plugin:2.5.2:install
    (default-install) on project ButtonExample: The packaging for this project
    did not assign a file to the build artifact -> [Help 1]
    
    The AppMojo seems to make the SWF the artifact, but in this case there
    won't be one.  What is the right thing to do here?
    
    I've disabled the native folder in the pom for now.  You should be able to
    grab the flex-falcon dual branch and flex-asjs dual branch and use Maven
    to reproduce this.
    
    Thanks,
    -Alex