You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by piotrz <pi...@gmail.com> on 2017/04/04 23:04:35 UTC
[FlexJS, Maven] Build library project type to js only swc
Hi All,
I have need to built some FlexJS library which contains my components to JS
only swc. How actually should I do this ? Let's take as a reference HTML
module in our framework [1].
During build it is checking whether something is COMPILE::JS or COMPILE:SWF
- I would like to avoid it in my build and just force compiler to treat my
files as JS only.
Any tips would be good.
[1] https://paste.apache.org/Xd74
Thanks,
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Maven-Build-library-project-type-to-js-only-swc-tp61001.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [FlexJS, Maven] Build library project type to js only swc
Posted by Harbs <ha...@gmail.com>.
Make sure you include js.swc as an external library.
> On Apr 5, 2017, at 1:48 AM, piotrz <pi...@gmail.com> wrote:
>
> Hi Harbs,
>
> It look like to me that Maven is doing everything what you are showing me in
> build.xml at some point automatically.
>
> Cause generated by maven compile config look similar to yours.
>
> I get errors when compile-as-config.xml is being processed.
>
> Error: Missing builtin type Object
>
>
> When compile-js-config.xml, is being processed with arguments
> -compiler.exclude-defaults-css-files=HTML-0.8.0-SNAPSHOT.swc:defaults.css,
> -js-output-type=FLEXJS, -compiler.strict-xml=true
>
> I'm getting errors like this:
>
> col: 4 Incorrect number of arguments. Expected no more than 4
> btn.addEventListener(MouseEvent.CLICK, onBtnClick, false, 0, true);
>
> Code in js library do not use COMPILE::JS switch, but I think in case of JS
> only compilation it don't have to.
>
> Thanks,
> Piotr
>
>
>
>
>
>
> -----
> Apache Flex PMC
> piotrzarzycki21@gmail.com
> --
> View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Maven-Build-library-project-type-to-js-only-swc-tp61001p61003.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [FlexJS, Maven] Build library project type to js only swc
Posted by Alex Harui <ah...@adobe.com>.
FWIW, this should also be easier in the dual branch since there will then
be a SWC for SWF and a SWC for JS and you could just skip the SWC for SWF.
Someday, I hope to get back to the merge after getting these dependencies
issues and the build fixed.
-Alex
On 4/4/17, 10:48 PM, "piotrz" <pi...@gmail.com> wrote:
>Hi Harbs,
>
>It look like to me that Maven is doing everything what you are showing me
>in
>build.xml at some point automatically.
>
>Cause generated by maven compile config look similar to yours.
>
>I get errors when compile-as-config.xml is being processed.
>
>Error: Missing builtin type Object
>
>
>When compile-js-config.xml, is being processed with arguments
>-compiler.exclude-defaults-css-files=HTML-0.8.0-SNAPSHOT.swc:defaults.css,
>-js-output-type=FLEXJS, -compiler.strict-xml=true
>
>I'm getting errors like this:
>
>col: 4 Incorrect number of arguments. Expected no more than 4
> btn.addEventListener(MouseEvent.CLICK, onBtnClick, false, 0, true);
>
>Code in js library do not use COMPILE::JS switch, but I think in case of
>JS
>only compilation it don't have to.
>
>Thanks,
>Piotr
>
>
>
>
>
>
>-----
>Apache Flex PMC
>piotrzarzycki21@gmail.com
>--
>View this message in context:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fle
>x-development.2333347.n4.nabble.com%2FFlexJS-Maven-Build-library-project-t
>ype-to-js-only-swc-tp61001p61003.html&data=02%7C01%7C%7C88dec366725a47a3de
>6008d47be89951%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63626968631686
>5699&sdata=jvHAKZV%2BDgvfGdyeZmC6TmkbYJGRP5DIBgy7RwCrC%2FY%3D&reserved=0
>Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [FlexJS, Maven] Build library project type to js only swc
Posted by piotrz <pi...@gmail.com>.
Chris,
Thank you that was it. I was able to build library, but the swc result do
not contain information which I required.
In generated swc I see all js files, but in catalog.xml library tag is empty
and I don't see components tag as it is in other swc inside FlexJS SDK etc,
I have only in tag files list of files. Example how it look like [1].
My pom [2]
Without swf compilation how classes from library would be visible in mxml ?
[1] https://paste.apache.org/dg3M
[2] https://paste.apache.org/NLO6
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Maven-Build-library-project-type-to-js-only-swc-tp61001p61030.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [FlexJS, Maven] Build library project type to js only swc
Posted by Christofer Dutz <ch...@c-ware.de>.
Glad to hear that ;-)
Keep up the good work (
Chris
Am 27.04.17, 17:25 schrieb "piotrz" <pi...@gmail.com>:
Hi Chris,
I would like to report that I was able to build library + my project by
Maven.
MAVEN ROX! :)
Thank you!!
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Maven-Build-library-project-type-to-js-only-swc-tp61001p61391.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [FlexJS, Maven] Build library project type to js only swc
Posted by piotrz <pi...@gmail.com>.
Hi Chris,
I would like to report that I was able to build library + my project by
Maven.
MAVEN ROX! :)
Thank you!!
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Maven-Build-library-project-type-to-js-only-swc-tp61001p61391.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [FlexJS, Maven] Build library project type to js only swc
Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Piotr,
I guess the reason for the build failing is the following:
You are not using the default maven structure (src/main/resources) for the directory containing the template.
Therefore, Maven is not automatically processing this. Usually the maven resources plugin copies resources to the output and optionally does some replacing of maven-properties. If you need that, you need to specify the resource directory. Then the build will copy the resources and replace the properties to the final output directory (in case of a debug build to the debug-js directory, in case of a release to the js-release directory). The htmlTemplate needs to reference the correct directory.
If you don’t need any maven-properties such as versions etc. replaced, you need to specify the location of the template to a place it can find it.
In your case the build succeeds, if you use this:
<htmlTemplate>${basedir}/src/resources/mdl-js-index-template.html</htmlTemplate>
Hope that explains things and helps you continune (
Chris
Am 23.04.17, 12:21 schrieb "piotrz" <pi...@gmail.com>:
Hi Chris,
I definitely moved forward with build of my project, but I have one weird
exception [1] which I really do not know what's mean.
It occurs when I'm adding following option to my pom:
<htmlTemplate>${basedir}/target/javascript/bin/js-debug/mdl-js-index-template.html</htmlTemplate>
Everything is building fine without that option. I've prepared project
example [2] if you wanted to try it out. You need to build "lib" and then
"app".
Appreciate for help.
[1] https://paste.apache.org/G6Sa
[2] https://1drv.ms/u/s!ApVpLyjpHDC2zR-rU7tggib25h46
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Maven-Build-library-project-type-to-js-only-swc-tp61001p61287.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [FlexJS, Maven] Build library project type to js only swc
Posted by piotrz <pi...@gmail.com>.
Hi Chris,
I definitely moved forward with build of my project, but I have one weird
exception [1] which I really do not know what's mean.
It occurs when I'm adding following option to my pom:
<htmlTemplate>${basedir}/target/javascript/bin/js-debug/mdl-js-index-template.html</htmlTemplate>
Everything is building fine without that option. I've prepared project
example [2] if you wanted to try it out. You need to build "lib" and then
"app".
Appreciate for help.
[1] https://paste.apache.org/G6Sa
[2] https://1drv.ms/u/s!ApVpLyjpHDC2zR-rU7tggib25h46
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Maven-Build-library-project-type-to-js-only-swc-tp61001p61287.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [FlexJS, Maven] Build library project type to js only swc
Posted by piotrz <pi...@gmail.com>.
Chris,
Results are pretty similar even if I used typedefs. I think I will try to
creat simple example which reproduce the issue and get back to you.
Thanks,
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Maven-Build-library-project-type-to-js-only-swc-tp61001p61112.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [FlexJS, Maven] Build library project type to js only swc
Posted by piotrz <pi...@gmail.com>.
Chris,
I'm using swc, but will try to create extern swc and get back to you with
the results.
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Maven-Build-library-project-type-to-js-only-swc-tp61001p61106.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [FlexJS, Maven] Build library project type to js only swc
Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Piotr,
Are you using the swc or the extern swc … I would suggest having a look at the extern swc and see if it contains what you are looking for.
In any other case please just wait a little while … as soon as develop is blue again I’ll start working on FlexJS and as far as I understood things, that will be pretty soon.
Chris
Am 11.04.17, 17:04 schrieb "piotrz" <pi...@gmail.com>:
But in that case for some reason using this swc in the project as dependency
is unusable. My project do not see any class during Maven compilation. I'm
getting an errors that classes which are in swc do not exists.
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Maven-Build-library-project-type-to-js-only-swc-tp61001p61103.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [FlexJS, Maven] Build library project type to js only swc
Posted by piotrz <pi...@gmail.com>.
But in that case for some reason using this swc in the project as dependency
is unusable. My project do not see any class during Maven compilation. I'm
getting an errors that classes which are in swc do not exists.
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Maven-Build-library-project-type-to-js-only-swc-tp61001p61103.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [FlexJS, Maven] Build library project type to js only swc
Posted by Christofer Dutz <ch...@c-ware.de>.
I guess so … I know the compilation of the swc will create the flashbytcode stuff in the swc and the javascript code in the swc and the js-actionscript in the external swc … but I guess Alex knows more about that.
Chris
Am 11.04.17, 16:28 schrieb "piotrz" <pi...@gmail.com>:
Hi Chris,
So you are saying that JS only compilation of some library will not produce
anything in
<libraries>
</libraries>
as I mentioned earlier.
Thanks,
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Maven-Build-library-project-type-to-js-only-swc-tp61001p61100.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [FlexJS, Maven] Build library project type to js only swc
Posted by piotrz <pi...@gmail.com>.
Hi Chris,
So you are saying that JS only compilation of some library will not produce
anything in
<libraries>
</libraries>
as I mentioned earlier.
Thanks,
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Maven-Build-library-project-type-to-js-only-swc-tp61001p61100.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [FlexJS, Maven] Build library project type to js only swc
Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Piotr,
I’ll look into this as soon as I find some time. To me it seems as If we have three compilations at the moment:
- AS compilation (produces the catalog.xml and the swf content (Flash Version) inside the swc
- JS compilation (produces the js code inside the swc
- Extern compilation (produces the catalog.xml and the swf content (JS Version) inside the extern swc
Hope I’m correct.
How about referencing the extern instead of the normal swc.
The swc externs are different than the typdef externs …
(Hope I am somehow starting to get this stuff sorted in my head)
Chris
Am 07.04.17, 06:41 schrieb "piotrz" <pi...@gmail.com>:
Chris, Harbs
When I'm using compiled swc library in the other project it completely do
not see classes from those library. I think the reason is for sure cause
catalog.xml do not contain anything in library tag.
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Maven-Build-library-project-type-to-js-only-swc-tp61001p61037.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [FlexJS, Maven] Build library project type to js only swc
Posted by piotrz <pi...@gmail.com>.
Chris, Harbs
When I'm using compiled swc library in the other project it completely do
not see classes from those library. I think the reason is for sure cause
catalog.xml do not contain anything in library tag.
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Maven-Build-library-project-type-to-js-only-swc-tp61001p61037.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [FlexJS, Maven] Build library project type to js only swc
Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Piotr,
You can tell Maven to skip the flash compilation by setting the configuration option “skipAS” to true.
You can tell Maven to skip js by setting the configuration option “skipJS” to true.
Think that was what you were looking for, correct?
Chris
Am 05.04.17, 07:48 schrieb "piotrz" <pi...@gmail.com>:
Hi Harbs,
It look like to me that Maven is doing everything what you are showing me in
build.xml at some point automatically.
Cause generated by maven compile config look similar to yours.
I get errors when compile-as-config.xml is being processed.
Error: Missing builtin type Object
When compile-js-config.xml, is being processed with arguments
-compiler.exclude-defaults-css-files=HTML-0.8.0-SNAPSHOT.swc:defaults.css,
-js-output-type=FLEXJS, -compiler.strict-xml=true
I'm getting errors like this:
col: 4 Incorrect number of arguments. Expected no more than 4
btn.addEventListener(MouseEvent.CLICK, onBtnClick, false, 0, true);
Code in js library do not use COMPILE::JS switch, but I think in case of JS
only compilation it don't have to.
Thanks,
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Maven-Build-library-project-type-to-js-only-swc-tp61001p61003.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [FlexJS, Maven] Build library project type to js only swc
Posted by piotrz <pi...@gmail.com>.
Hi Harbs,
It look like to me that Maven is doing everything what you are showing me in
build.xml at some point automatically.
Cause generated by maven compile config look similar to yours.
I get errors when compile-as-config.xml is being processed.
Error: Missing builtin type Object
When compile-js-config.xml, is being processed with arguments
-compiler.exclude-defaults-css-files=HTML-0.8.0-SNAPSHOT.swc:defaults.css,
-js-output-type=FLEXJS, -compiler.strict-xml=true
I'm getting errors like this:
col: 4 Incorrect number of arguments. Expected no more than 4
btn.addEventListener(MouseEvent.CLICK, onBtnClick, false, 0, true);
Code in js library do not use COMPILE::JS switch, but I think in case of JS
only compilation it don't have to.
Thanks,
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Maven-Build-library-project-type-to-js-only-swc-tp61001p61003.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [FlexJS, Maven] Build library project type to js only swc
Posted by Harbs <ha...@gmail.com>.
Take a look at what I did here:
https://github.com/unhurdle/cep-flexjs/tree/master/CEPTools <https://github.com/unhurdle/cep-flexjs/tree/master/CEPTools>
> On Apr 4, 2017, at 7:04 PM, piotrz <pi...@gmail.com> wrote:
>
> Hi All,
>
> I have need to built some FlexJS library which contains my components to JS
> only swc. How actually should I do this ? Let's take as a reference HTML
> module in our framework [1].
>
> During build it is checking whether something is COMPILE::JS or COMPILE:SWF
> - I would like to avoid it in my build and just force compiler to treat my
> files as JS only.
>
> Any tips would be good.
>
> [1] https://paste.apache.org/Xd74
>
> Thanks,
> Piotr
>
>
>
> -----
> Apache Flex PMC
> piotrzarzycki21@gmail.com
> --
> View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Maven-Build-library-project-type-to-js-only-swc-tp61001.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.