├── .gitignore
├── 1-Simple
├── README.md
├── pom.xml
└── src
│ └── Main.mxml
├── 10-FlexModules
├── README.md
├── application
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── flex
│ │ ├── Main.mxml
│ │ └── MyModule.mxml
├── library
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ └── flex
│ │ │ └── org
│ │ │ └── justinjmoses
│ │ │ └── flexmojos_intro
│ │ │ └── RandomCity.as
│ │ └── test
│ │ └── flex
│ │ └── org
│ │ └── justinjmoses
│ │ └── flexmojos_intro
│ │ └── TestRandomCity.as
├── libs
│ └── as3-signals-0.8.swc
├── module
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── flex
│ │ └── MyModule.mxml
└── pom.xml
├── 11-ASDoc
├── README.md
├── application
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── flex
│ │ └── Main.mxml
├── library
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ └── flex
│ │ │ └── org
│ │ │ └── justinjmoses
│ │ │ └── flexmojos_intro
│ │ │ └── RandomCity.as
│ │ └── test
│ │ └── flex
│ │ └── org
│ │ └── justinjmoses
│ │ └── flexmojos_intro
│ │ └── TestRandomCity.as
├── libs
│ └── as3-signals-0.8.swc
└── pom.xml
├── 12-WARPackaging
├── README.md
├── application
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── flex
│ │ └── Main.mxml
├── library
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ └── flex
│ │ │ └── org
│ │ │ └── justinjmoses
│ │ │ └── flexmojos_intro
│ │ │ └── RandomCity.as
│ │ └── test
│ │ └── flex
│ │ └── org
│ │ └── justinjmoses
│ │ └── flexmojos_intro
│ │ └── TestRandomCity.as
├── libs
│ └── as3-signals-0.8.swc
├── module
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── flex
│ │ └── MyModule.mxml
├── pom.xml
└── war
│ ├── pom.xml
│ └── src
│ └── main
│ └── webapp
│ └── WEB-INF
│ └── web.xml
├── 13-CustomRSL
├── README.md
├── application
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── flex
│ │ └── Main.mxml
├── library
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ └── flex
│ │ │ └── org
│ │ │ └── justinjmoses
│ │ │ └── flexmojos_intro
│ │ │ └── RandomCity.as
│ │ └── test
│ │ └── flex
│ │ └── org
│ │ └── justinjmoses
│ │ └── flexmojos_intro
│ │ └── TestRandomCity.as
├── libs
│ ├── as3-signals-0.8.swc
│ ├── robotlegs-framework-1.5.1.swc
│ └── robotlegs-framework-1.5.1.swf
├── pom.xml
└── war
│ ├── pom.xml
│ └── src
│ └── main
│ └── webapp
│ └── WEB-INF
│ └── web.xml
├── 2-UnitTests
├── README.md
├── pom.xml
└── src
│ ├── main
│ └── flex
│ │ ├── Main.mxml
│ │ └── org
│ │ └── justinjmoses
│ │ └── flexmojos_intro
│ │ └── RandomCity.as
│ └── test
│ └── flex
│ └── org
│ └── justinjmoses
│ └── flexmojos_intro
│ └── TestRandomCity.as
├── 3-Dependencies
├── README.md
├── command.txt
├── libs
│ └── as3-signals-0.8.swc
├── pom.xml
└── src
│ └── main
│ └── flex
│ ├── Main.mxml
│ └── org
│ └── justinjmoses
│ └── flexmojos_intro
│ └── RandomCity.as
├── 4-Flashbuilder-Goal
├── README.md
├── command.txt
├── libs
│ └── as3-signals-0.8.swc
├── pom.xml
└── src
│ ├── main
│ └── flex
│ │ ├── Main.mxml
│ │ └── org
│ │ └── justinjmoses
│ │ └── flexmojos_intro
│ │ └── RandomCity.as
│ └── test
│ └── flex
│ └── org
│ └── justinjmoses
│ └── flexmojos_intro
│ └── TestRandomCity.as
├── 5-Archetypes
├── README
├── application-command.txt
├── library-command.txt
└── modular-command.txt
├── 6-Libraries
├── README.md
├── application
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── flex
│ │ └── Main.mxml
├── library
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ └── flex
│ │ │ └── org
│ │ │ └── justinjmoses
│ │ │ └── flexmojos_intro
│ │ │ └── RandomCity.as
│ │ └── test
│ │ └── flex
│ │ └── org
│ │ └── justinjmoses
│ │ └── flexmojos_intro
│ │ └── TestRandomCity.as
├── libs
│ └── as3-signals-0.8.swc
└── pom.xml
├── 7-Profiles
├── README.md
├── application
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── flex
│ │ └── Main.mxml
├── library
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ └── flex
│ │ │ └── org
│ │ │ └── justinjmoses
│ │ │ └── flexmojos_intro
│ │ │ └── RandomCity.as
│ │ └── test
│ │ └── flex
│ │ └── org
│ │ └── justinjmoses
│ │ └── flexmojos_intro
│ │ └── TestRandomCity.as
├── libs
│ └── as3-signals-0.8.swc
└── pom.xml
├── 8-Nexus
├── README.md
├── application
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── flex
│ │ └── Main.mxml
├── library
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ └── flex
│ │ │ └── org
│ │ │ └── justinjmoses
│ │ │ └── flexmojos_intro
│ │ │ └── RandomCity.as
│ │ └── test
│ │ └── flex
│ │ └── org
│ │ └── justinjmoses
│ │ └── flexmojos_intro
│ │ └── TestRandomCity.as
├── libs
│ └── as3-signals-0.8.swc
├── pom.xml
└── settings.xml
├── 9-FrameworkRSLs
├── README.md
├── application
│ ├── application-1.0.0-SNAPSHOT.swf
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── flex
│ │ └── Main.mxml
├── library
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ └── flex
│ │ │ └── org
│ │ │ └── justinjmoses
│ │ │ └── flexmojos_intro
│ │ │ └── RandomCity.as
│ │ └── test
│ │ └── flex
│ │ └── org
│ │ └── justinjmoses
│ │ └── flexmojos_intro
│ │ └── TestRandomCity.as
├── libs
│ └── as3-signals-0.8.swc
└── pom.xml
├── README.md
└── libs
└── as3-signals-0.8.swc
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | bin
3 |
4 | target
5 |
6 | */*/target
7 |
8 | html-template
9 |
10 | bin-debug
11 |
12 | bin-release
13 |
14 | .*
15 |
16 | FlexUnit*Application.mxml
17 |
--------------------------------------------------------------------------------
/1-Simple/README.md:
--------------------------------------------------------------------------------
1 | install via: > mvn clean install
2 |
3 | this will create the "target" folder containing the SWF to run.
4 |
--------------------------------------------------------------------------------
/1-Simple/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | 4.0.0
7 | org.justinjmoses.flexmojos-introduction
8 | flexmojos-simplist
9 | Flexmojos Simple Example
10 | 1.0.0-SNAPSHOT
11 | swf
12 |
13 |
14 | 4.5.1.21328
15 | 4.6.b.23201
16 |
17 |
18 |
19 | src
20 |
21 |
22 | org.sonatype.flexmojos
23 | flexmojos-maven-plugin
24 | 4.0-RC2
25 | true
26 |
27 | ./Main.mxml
28 | true
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | com.adobe.flex.framework
37 | flex-framework
38 | ${flex.sdk.version}
39 | pom
40 |
41 |
42 |
43 |
44 |
45 | flex-mojos-repository
46 | http://repository.sonatype.org/content/groups/flexgroup
47 |
48 | true
49 |
50 |
51 | false
52 |
53 |
54 |
55 |
56 |
57 | flex-mojos-plugin-repository
58 | http://repository.sonatype.org/content/groups/flexgroup
59 |
60 | true
61 |
62 |
63 | false
64 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/1-Simple/src/Main.mxml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/10-FlexModules/README.md:
--------------------------------------------------------------------------------
1 | #10. Flex Modules
2 | This project offers two different mechanisms for using runtime flex modules. The first adds a module into the application POM, the latter creates a new POM for the flex module and builds it separately.
3 |
4 | mvn clean install
5 |
6 |
--------------------------------------------------------------------------------
/10-FlexModules/application/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 | org.justinjmoses.flexmojos-introduction.flexmodules-example
9 | parent
10 | 1.0.0-SNAPSHOT
11 |
12 |
13 | 4.0.0
14 | application
15 | Flexmojos Flex Module Example - Application
16 | swf
17 |
18 |
19 |
20 | src/main/flex
21 |
22 |
23 |
24 | org.sonatype.flexmojos
25 | flexmojos-maven-plugin
26 | ${flexmojos.version}
27 | true
28 |
29 |
30 | ./Main.mxml
31 |
32 |
33 | MyModule.mxml
34 | true
35 | MyModule
36 |
37 |
38 |
40 | true
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | ${project.groupId}
50 | library
51 | ${project.version}
52 | swc
53 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/10-FlexModules/application/src/main/flex/Main.mxml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/10-FlexModules/application/src/main/flex/MyModule.mxml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/10-FlexModules/library/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 | org.justinjmoses.flexmojos-introduction.flexmodules-example
9 | parent
10 | 1.0.0-SNAPSHOT
11 |
12 |
13 | 4.0.0
14 | library
15 | Flexmojos Flex Modules Example - SWC Library
16 | swc
17 |
18 |
19 | src/main/flex
20 | src/test/flex
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/10-FlexModules/library/src/main/flex/org/justinjmoses/flexmojos_intro/RandomCity.as:
--------------------------------------------------------------------------------
1 | package org.justinjmoses.flexmojos_intro
2 | {
3 | public class RandomCity
4 | {
5 | private const cities:Array =
6 | [ 'Santiago, Chile',
7 | 'Sydney, Australia',
8 | 'San Francisco, US',
9 | 'London, England',
10 | 'Paris, France',
11 | 'Buenos Aires, Argentina',
12 | 'Rio de Janerio, Brazil',
13 | 'Lima, Peru',
14 | 'Lisbon, Portugal',
15 | 'Barcelona, Spain',
16 | 'Athens, Greece',
17 | 'Moscow, Russia'
18 | ]
19 |
20 | public function get next():String
21 | {
22 | const index:int = Math.round(Math.random() * cities.length)
23 |
24 | return (cities[index]) ? cities[index] : next;
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/10-FlexModules/library/src/test/flex/org/justinjmoses/flexmojos_intro/TestRandomCity.as:
--------------------------------------------------------------------------------
1 | package org.justinjmoses.flexmojos_intro
2 | {
3 | public class TestRandomCity
4 | {
5 | protected var cities:RandomCity;
6 |
7 | [Before]
8 | public function setUp():void
9 | {
10 | cities = new RandomCity();
11 | }
12 |
13 | [Test]
14 | public function testGetNext():void
15 | {
16 | for (var i:int = 1; i < 100; i++)
17 | {
18 | var city:String = cities.next;
19 | }
20 | }
21 |
22 | [After]
23 | public function tearDown():void
24 | {
25 | cities = null;
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/10-FlexModules/libs/as3-signals-0.8.swc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjgonecrypto/flexmojos-introduction/ef30e1dc909593a66bf83e189ebdd500520d9b34/10-FlexModules/libs/as3-signals-0.8.swc
--------------------------------------------------------------------------------
/10-FlexModules/module/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 | org.justinjmoses.flexmojos-introduction.flexmodules-example
9 | parent
10 | 1.0.0-SNAPSHOT
11 |
12 |
13 | 4.0.0
14 | module
15 | Flexmojos Flex Module Example - Module
16 | swf
17 |
18 |
19 |
20 | src/main/flex
21 |
22 |
23 |
24 | org.sonatype.flexmojos
25 | flexmojos-maven-plugin
26 | ${flexmojos.version}
27 | true
28 |
29 |
30 | ./MyModule.mxml
31 | true
32 | MyModule
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | ${project.groupId}
42 | application
43 | ${project.version}
44 | xml
45 | link-report
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/10-FlexModules/module/src/main/flex/MyModule.mxml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/10-FlexModules/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | 4.0.0
7 | org.justinjmoses.flexmojos-introduction.flexmodules-example
8 | parent
9 | Flexmojos Flex Modules Example
10 | 1.0.0-SNAPSHOT
11 |
12 |
13 |
14 | pom
15 |
16 |
17 | library
18 | application
19 | module
20 |
21 |
22 |
23 |
24 | 4.5.1.21328
25 | 2.0.0.232
26 | 1.0.0.16316
27 | 4.0-RC2
28 | 4.0-rc-1
29 | 0.8
30 |
31 |
32 |
33 |
34 |
35 |
36 | org.sonatype.flexmojos
37 | flexmojos-maven-plugin
38 | ${flexmojos.version}
39 | true
40 |
41 |
42 | true
43 |
44 | false
45 |
46 |
47 |
48 | http://fpdownload.adobe.com/pub/swz/crossdomain.xml
49 | http://fpdownload.adobe.com/pub/swz/crossdomain.xml
50 | http://fpdownload.adobe.com/pub/swz/crossdomain.xml
51 |
52 |
53 |
54 | http://fpdownload.adobe.com/pub/{extension}/flex/${flex.sdk.version}/{artifactId}_{version}.{extension}
55 |
56 |
57 | http://fpdownload.adobe.com/pub/{extension}/tlf/${flex.tlf.version}/{artifactId}_${flex.tlf.version}.{extension}
58 |
59 |
60 | http://fpdownload.adobe.com/pub/{extension}/flex/${flex.sdk.version}/{artifactId}_${flex.osmf.version}.{extension}
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | com.adobe.flex.framework
71 | framework
72 | ${flex.sdk.version}
73 | swc
74 | caching
75 |
76 |
77 |
78 | com.adobe.flex.framework
79 | textLayout
80 | ${flex.sdk.version}
81 | swc
82 | caching
83 |
84 |
85 |
86 | com.adobe.flex.framework
87 | spark
88 | ${flex.sdk.version}
89 | swc
90 | caching
91 |
92 |
93 |
94 | com.adobe.flex.framework
95 | sparkskins
96 | ${flex.sdk.version}
97 | swc
98 | caching
99 |
100 |
101 |
102 | com.adobe.flex.framework
103 | rpc
104 | ${flex.sdk.version}
105 | swc
106 | caching
107 |
108 |
109 |
110 | com.adobe.flex.framework
111 | charts
112 | ${flex.sdk.version}
113 | swc
114 | caching
115 |
116 |
117 |
118 | com.adobe.flex.framework
119 | spark_dmv
120 | ${flex.sdk.version}
121 | swc
122 | caching
123 |
124 |
125 |
126 | com.adobe.flex.framework
127 | osmf
128 | ${flex.sdk.version}
129 | swc
130 | caching
131 |
132 |
133 |
134 | com.adobe.flex.framework
135 | mx
136 | ${flex.sdk.version}
137 | swc
138 | caching
139 |
140 |
141 |
142 | com.adobe.flex.framework
143 | advancedgrids
144 | ${flex.sdk.version}
145 | swc
146 | caching
147 |
148 |
149 |
150 |
151 | com.adobe.flex.framework
152 | flex-framework
153 | ${flex.sdk.version}
154 | pom
155 |
156 |
157 |
158 |
159 | com.adobe.flexunit
160 | flexunit
161 | ${flexunit.version}
162 | swc
163 | test
164 |
165 |
166 |
167 | org.osflash
168 | as3-signals
169 | ${as3-signals.version}
170 | swc
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 | flex-mojos-repository
179 | http://repository.sonatype.org/content/groups/flexgroup
180 |
181 | true
182 |
183 |
184 | false
185 |
186 |
187 |
188 |
189 |
190 | flex-mojos-plugin-repository
191 | http://repository.sonatype.org/content/groups/flexgroup
192 |
193 | true
194 |
195 |
196 | false
197 |
198 |
199 |
200 |
201 |
202 |
--------------------------------------------------------------------------------
/11-ASDoc/README.md:
--------------------------------------------------------------------------------
1 | #6. Libraries
2 | This project splits the functionality of the other projects into an application SWF and a library SWC.
3 |
4 | To process, simply run an install on the base POM (both the SWF and the SWC have their own POMs that are referenced via `module` definitions in the parent POM).
5 |
6 | mvn clean install
7 |
8 |
--------------------------------------------------------------------------------
/11-ASDoc/application/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 | org.justinjmoses.flexmojos-introduction.asdoc-example
9 | parent
10 | 1.0.0-SNAPSHOT
11 |
12 |
13 | 4.0.0
14 | application
15 | Flexmojos ASDoc Example - Application
16 | swf
17 |
18 |
19 |
20 | src/main/flex
21 |
22 |
23 |
24 | org.sonatype.flexmojos
25 | flexmojos-maven-plugin
26 |
27 |
28 | ./Main.mxml
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | ${project.groupId}
38 | library
39 | ${project.version}
40 | swc
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/11-ASDoc/application/src/main/flex/Main.mxml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/11-ASDoc/library/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 | org.justinjmoses.flexmojos-introduction.asdoc-example
9 | parent
10 | 1.0.0-SNAPSHOT
11 |
12 |
13 | 4.0.0
14 | library
15 | Flexmojos ASDoc Example - SWC Library
16 | swc
17 |
18 |
19 | src/main/flex
20 | src/test/flex
21 |
22 |
23 |
24 | org.sonatype.flexmojos
25 | flexmojos-maven-plugin
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/11-ASDoc/library/src/main/flex/org/justinjmoses/flexmojos_intro/RandomCity.as:
--------------------------------------------------------------------------------
1 | package org.justinjmoses.flexmojos_intro
2 | {
3 | public class RandomCity
4 | {
5 | private const cities:Array =
6 | [ 'Santiago, Chile',
7 | 'Sydney, Australia',
8 | 'San Francisco, US',
9 | 'London, England',
10 | 'Paris, France',
11 | 'Buenos Aires, Argentina',
12 | 'Rio de Janerio, Brazil',
13 | 'Lima, Peru',
14 | 'Lisbon, Portugal',
15 | 'Barcelona, Spain',
16 | 'Athens, Greece',
17 | 'Moscow, Russia'
18 | ]
19 |
20 | public function get next():String
21 | {
22 | const index:int = Math.round(Math.random() * cities.length)
23 |
24 | return (cities[index]) ? cities[index] : next;
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/11-ASDoc/library/src/test/flex/org/justinjmoses/flexmojos_intro/TestRandomCity.as:
--------------------------------------------------------------------------------
1 | package org.justinjmoses.flexmojos_intro
2 | {
3 | public class TestRandomCity
4 | {
5 | protected var cities:RandomCity;
6 |
7 | [Before]
8 | public function setUp():void
9 | {
10 | cities = new RandomCity();
11 | }
12 |
13 | [Test]
14 | public function testGetNext():void
15 | {
16 | for (var i:int = 1; i < 100; i++)
17 | {
18 | var city:String = cities.next;
19 | }
20 | }
21 |
22 | [After]
23 | public function tearDown():void
24 | {
25 | cities = null;
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/11-ASDoc/libs/as3-signals-0.8.swc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjgonecrypto/flexmojos-introduction/ef30e1dc909593a66bf83e189ebdd500520d9b34/11-ASDoc/libs/as3-signals-0.8.swc
--------------------------------------------------------------------------------
/11-ASDoc/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | 4.0.0
7 | org.justinjmoses.flexmojos-introduction.asdoc-example
8 | parent
9 | Flexmojos ASDoc Example
10 | 1.0.0-SNAPSHOT
11 |
12 |
13 |
14 | pom
15 |
16 |
17 | library
18 | application
19 |
20 |
21 |
22 |
23 | 4.5.1.21328
24 | 4.0-RC2
25 | 4.0-rc-1
26 | 0.8
27 |
28 |
29 |
30 |
31 |
32 |
33 | org.sonatype.flexmojos
34 | flexmojos-maven-plugin
35 | ${flexmojos.version}
36 | true
37 |
38 |
39 |
40 | asdoc
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | com.adobe.flex.framework
55 | flex-framework
56 | ${flex.sdk.version}
57 | pom
58 |
59 |
60 |
61 | com.adobe.flexunit
62 | flexunit
63 | ${flexunit.version}
64 | swc
65 | test
66 |
67 |
68 |
69 | org.osflash
70 | as3-signals
71 | ${as3-signals.version}
72 | swc
73 |
74 |
75 |
76 |
77 |
78 |
79 | flex-mojos-repository
80 | http://repository.sonatype.org/content/groups/flexgroup
81 |
82 | true
83 |
84 |
85 | false
86 |
87 |
88 |
89 |
90 |
91 | flex-mojos-plugin-repository
92 | http://repository.sonatype.org/content/groups/flexgroup
93 |
94 | true
95 |
96 |
97 | false
98 |
99 |
100 |
101 |
102 |
103 |
--------------------------------------------------------------------------------
/12-WARPackaging/README.md:
--------------------------------------------------------------------------------
1 | #12. WAR Packaging
2 | This project bundles both an application and a runtime flex module into a WAR for web deployment.
3 |
4 | mvn clean install
5 |
6 |
--------------------------------------------------------------------------------
/12-WARPackaging/application/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | org.justinjmoses.flexmojos-introduction.war-example
8 | parent
9 | 1.0.0-SNAPSHOT
10 |
11 |
12 | 4.0.0
13 | application
14 | Flexmojos WAR Example - Application
15 | swf
16 |
17 |
18 |
19 | src/main/flex
20 |
21 |
22 |
23 | org.sonatype.flexmojos
24 | flexmojos-maven-plugin
25 | ${flexmojos.version}
26 | true
27 |
28 |
29 | ./Main.mxml
30 |
31 |
33 | true
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | ${project.groupId}
43 | library
44 | ${project.version}
45 | swc
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/12-WARPackaging/application/src/main/flex/Main.mxml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/12-WARPackaging/library/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 | org.justinjmoses.flexmojos-introduction.war-example
9 | parent
10 | 1.0.0-SNAPSHOT
11 |
12 |
13 | 4.0.0
14 | library
15 | Flexmojos WAR Example - SWC Library
16 | swc
17 |
18 |
19 | src/main/flex
20 | src/test/flex
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/12-WARPackaging/library/src/main/flex/org/justinjmoses/flexmojos_intro/RandomCity.as:
--------------------------------------------------------------------------------
1 | package org.justinjmoses.flexmojos_intro
2 | {
3 | public class RandomCity
4 | {
5 | private const cities:Array =
6 | [ 'Santiago, Chile',
7 | 'Sydney, Australia',
8 | 'San Francisco, US',
9 | 'London, England',
10 | 'Paris, France',
11 | 'Buenos Aires, Argentina',
12 | 'Rio de Janerio, Brazil',
13 | 'Lima, Peru',
14 | 'Lisbon, Portugal',
15 | 'Barcelona, Spain',
16 | 'Athens, Greece',
17 | 'Moscow, Russia'
18 | ]
19 |
20 | public function get next():String
21 | {
22 | const index:int = Math.round(Math.random() * cities.length)
23 |
24 | return (cities[index]) ? cities[index] : next;
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/12-WARPackaging/library/src/test/flex/org/justinjmoses/flexmojos_intro/TestRandomCity.as:
--------------------------------------------------------------------------------
1 | package org.justinjmoses.flexmojos_intro
2 | {
3 | public class TestRandomCity
4 | {
5 | protected var cities:RandomCity;
6 |
7 | [Before]
8 | public function setUp():void
9 | {
10 | cities = new RandomCity();
11 | }
12 |
13 | [Test]
14 | public function testGetNext():void
15 | {
16 | for (var i:int = 1; i < 100; i++)
17 | {
18 | var city:String = cities.next;
19 | }
20 | }
21 |
22 | [After]
23 | public function tearDown():void
24 | {
25 | cities = null;
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/12-WARPackaging/libs/as3-signals-0.8.swc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjgonecrypto/flexmojos-introduction/ef30e1dc909593a66bf83e189ebdd500520d9b34/12-WARPackaging/libs/as3-signals-0.8.swc
--------------------------------------------------------------------------------
/12-WARPackaging/module/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 | org.justinjmoses.flexmojos-introduction.war-example
9 | parent
10 | 1.0.0-SNAPSHOT
11 |
12 |
13 | 4.0.0
14 | module
15 | Flexmojos WAR Example - Module
16 | swf
17 |
18 |
19 |
20 | src/main/flex
21 |
22 |
23 |
24 | org.sonatype.flexmojos
25 | flexmojos-maven-plugin
26 | ${flexmojos.version}
27 | true
28 |
29 |
30 | ./MyModule.mxml
31 | true
32 | MyModule
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | ${project.groupId}
42 | application
43 | ${project.version}
44 | xml
45 | link-report
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/12-WARPackaging/module/src/main/flex/MyModule.mxml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/12-WARPackaging/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | 4.0.0
7 | org.justinjmoses.flexmojos-introduction.war-example
8 | parent
9 | Flexmojos WAR Example
10 | 1.0.0-SNAPSHOT
11 |
12 |
13 |
14 | pom
15 |
16 |
17 | library
18 | application
19 | module
20 | war
21 |
22 |
23 |
24 |
25 | 4.5.1.21328
26 | 4.0-RC2
27 | 4.0-rc-1
28 | 0.8
29 |
30 |
31 |
32 |
33 |
34 |
35 | org.sonatype.flexmojos
36 | flexmojos-maven-plugin
37 | ${flexmojos.version}
38 | true
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | com.adobe.flex.framework
50 | flex-framework
51 | ${flex.sdk.version}
52 | pom
53 |
54 |
55 |
56 | com.adobe.flexunit
57 | flexunit
58 | ${flexunit.version}
59 | swc
60 | test
61 |
62 |
63 |
64 | org.osflash
65 | as3-signals
66 | ${as3-signals.version}
67 | swc
68 |
69 |
70 |
71 |
72 |
73 |
74 | flex-mojos-repository
75 | http://repository.sonatype.org/content/groups/flexgroup
76 |
77 | true
78 |
79 |
80 | false
81 |
82 |
83 |
84 |
85 |
86 | flex-mojos-plugin-repository
87 | http://repository.sonatype.org/content/groups/flexgroup
88 |
89 | true
90 |
91 |
92 | false
93 |
94 |
95 |
96 |
97 |
98 |
--------------------------------------------------------------------------------
/12-WARPackaging/war/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | org.justinjmoses.flexmojos-introduction.war-example
8 | parent
9 | 1.0.0-SNAPSHOT
10 |
11 |
12 | 4.0.0
13 | war
14 | Flexmojos WAR Example - WAR
15 | war
16 |
17 |
18 |
19 |
20 | org.sonatype.flexmojos
21 | flexmojos-maven-plugin
22 |
23 |
24 |
25 |
26 | copy-flex-resources
27 |
28 |
29 | true
30 |
31 |
32 |
33 |
34 |
35 | org.mortbay.jetty
36 | maven-jetty-plugin
37 | 6.1.17
38 |
39 |
40 |
41 |
42 |
43 |
44 | ${project.groupId}
45 | application
46 | ${project.version}
47 | swf
48 |
49 |
50 |
51 | ${project.groupId}
52 | module
53 | ${project.version}
54 | swf
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/12-WARPackaging/war/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 | My WAR
9 |
10 |
11 | {artifactId}-{version}.swf
12 |
13 |
14 |
--------------------------------------------------------------------------------
/13-CustomRSL/README.md:
--------------------------------------------------------------------------------
1 | #13. Custom RSL
2 | This project illustrates two various custom RSL techniques.
3 |
4 | In order for this to work, you must first install the robotlegs SWC.
5 |
6 | mvn install:install-file -Dfile=./libs/robotlegs-framework-1.5.1.swc -DgroupId=org.robotlegs -DartifactId=robotlegs-framework -Dversion=1.5.1 -Dpackaging=swc
7 |
8 | then the RSL (which is just the optimized library.swf from the unpacked SWC)
9 |
10 | mvn install:install-file -Dfile=./libs/robotlegs-framework-1.5.1.swf -DgroupId=org.robotlegs -DartifactId=robotlegs-framework -Dversion=1.5.1 -Dpackaging=swf
11 |
12 | then you can run
13 |
14 | mvn clean install
15 |
16 |
--------------------------------------------------------------------------------
/13-CustomRSL/application/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | org.justinjmoses.flexmojos-introduction.customrsl-example
8 | parent
9 | 1.0.0-SNAPSHOT
10 |
11 |
12 | 4.0.0
13 | application
14 | Flexmojos WAR Example - Application
15 | swf
16 |
17 |
18 |
19 | src/main/flex
20 |
21 |
22 |
23 | org.sonatype.flexmojos
24 | flexmojos-maven-plugin
25 | ${flexmojos.version}
26 | true
27 |
28 |
29 | ./Main.mxml
30 |
31 | rsl/{artifactId}-{version}.{extension}
32 |
33 |
35 | true
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | ${project.groupId}
45 | library
46 | ${project.version}
47 | swc
48 | rsl
49 |
50 |
51 |
52 | org.robotlegs
53 | robotlegs-framework
54 | 1.5.1
55 | swc
56 | rsl
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/13-CustomRSL/application/src/main/flex/Main.mxml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/13-CustomRSL/library/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | org.justinjmoses.flexmojos-introduction.customrsl-example
8 | parent
9 | 1.0.0-SNAPSHOT
10 |
11 |
12 | 4.0.0
13 | library
14 | Flexmojos CustomRSL Example - SWC Library
15 | swc
16 |
17 |
18 | src/main/flex
19 | src/test/flex
20 |
21 |
22 |
23 | org.sonatype.flexmojos
24 | flexmojos-maven-plugin
25 |
26 |
27 |
28 |
29 | create-rsl
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/13-CustomRSL/library/src/main/flex/org/justinjmoses/flexmojos_intro/RandomCity.as:
--------------------------------------------------------------------------------
1 | package org.justinjmoses.flexmojos_intro
2 | {
3 | public class RandomCity
4 | {
5 | private const cities:Array =
6 | [ 'Santiago, Chile',
7 | 'Sydney, Australia',
8 | 'San Francisco, US',
9 | 'London, England',
10 | 'Paris, France',
11 | 'Buenos Aires, Argentina',
12 | 'Rio de Janerio, Brazil',
13 | 'Lima, Peru',
14 | 'Lisbon, Portugal',
15 | 'Barcelona, Spain',
16 | 'Athens, Greece',
17 | 'Moscow, Russia'
18 | ]
19 |
20 | public function get next():String
21 | {
22 | const index:int = Math.round(Math.random() * cities.length)
23 |
24 | return (cities[index]) ? cities[index] : next;
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/13-CustomRSL/library/src/test/flex/org/justinjmoses/flexmojos_intro/TestRandomCity.as:
--------------------------------------------------------------------------------
1 | package org.justinjmoses.flexmojos_intro
2 | {
3 | public class TestRandomCity
4 | {
5 | protected var cities:RandomCity;
6 |
7 | [Before]
8 | public function setUp():void
9 | {
10 | cities = new RandomCity();
11 | }
12 |
13 | [Test]
14 | public function testGetNext():void
15 | {
16 | for (var i:int = 1; i < 100; i++)
17 | {
18 | var city:String = cities.next;
19 | }
20 | }
21 |
22 | [After]
23 | public function tearDown():void
24 | {
25 | cities = null;
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/13-CustomRSL/libs/as3-signals-0.8.swc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjgonecrypto/flexmojos-introduction/ef30e1dc909593a66bf83e189ebdd500520d9b34/13-CustomRSL/libs/as3-signals-0.8.swc
--------------------------------------------------------------------------------
/13-CustomRSL/libs/robotlegs-framework-1.5.1.swc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjgonecrypto/flexmojos-introduction/ef30e1dc909593a66bf83e189ebdd500520d9b34/13-CustomRSL/libs/robotlegs-framework-1.5.1.swc
--------------------------------------------------------------------------------
/13-CustomRSL/libs/robotlegs-framework-1.5.1.swf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjgonecrypto/flexmojos-introduction/ef30e1dc909593a66bf83e189ebdd500520d9b34/13-CustomRSL/libs/robotlegs-framework-1.5.1.swf
--------------------------------------------------------------------------------
/13-CustomRSL/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | 4.0.0
7 | org.justinjmoses.flexmojos-introduction.customrsl-example
8 | parent
9 | Flexmojos CustomRSL Example
10 | 1.0.0-SNAPSHOT
11 |
12 |
13 |
14 | pom
15 |
16 |
17 | library
18 | application
19 | war
20 |
21 |
22 |
23 |
24 | 4.5.1.21328
25 | 4.0-RC2
26 | 4.0-rc-1
27 | 0.8
28 |
29 |
30 |
31 |
32 |
33 |
34 | org.sonatype.flexmojos
35 | flexmojos-maven-plugin
36 | ${flexmojos.version}
37 | true
38 |
39 |
40 | true
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | com.adobe.flex.framework
49 | flex-framework
50 | ${flex.sdk.version}
51 | pom
52 |
53 |
54 |
55 | com.adobe.flexunit
56 | flexunit
57 | ${flexunit.version}
58 | swc
59 | test
60 |
61 |
62 |
63 | org.osflash
64 | as3-signals
65 | ${as3-signals.version}
66 | swc
67 |
68 |
69 |
70 |
71 |
72 |
73 | flex-mojos-repository
74 | http://repository.sonatype.org/content/groups/flexgroup
75 |
76 | true
77 |
78 |
79 | false
80 |
81 |
82 |
83 |
84 |
85 | flex-mojos-plugin-repository
86 | http://repository.sonatype.org/content/groups/flexgroup
87 |
88 | true
89 |
90 |
91 | false
92 |
93 |
94 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/13-CustomRSL/war/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | org.justinjmoses.flexmojos-introduction.customrsl-example
8 | parent
9 | 1.0.0-SNAPSHOT
10 |
11 |
12 | 4.0.0
13 | war
14 | Flexmojos CustomRSL Example - WAR
15 | war
16 |
17 |
18 |
19 |
20 | org.sonatype.flexmojos
21 | flexmojos-maven-plugin
22 |
23 |
24 |
25 |
26 | copy-flex-resources
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | org.mortbay.jetty
36 | maven-jetty-plugin
37 | 6.1.17
38 |
39 |
40 |
41 |
42 |
43 |
44 | ${project.groupId}
45 | application
46 | ${project.version}
47 | swf
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/13-CustomRSL/war/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 | My WAR
9 |
10 |
11 | {artifactId}-{version}.swf
12 |
13 |
14 |
--------------------------------------------------------------------------------
/2-UnitTests/README.md:
--------------------------------------------------------------------------------
1 | #2. UnitTests
2 | This adds on a single unit test to the simple project.
3 |
4 | *Note*: In order to run the unit tests, Flexmojos needs to be able to find the Flashplayer executable. You should ensure Flashplayer (`Flash Player` on OS X and `Flashplayer.exe` on WinX) is available on your PATH. You can download the standalone Flashplayer *Projector* from [Adobe](http://www.adobe.com/support/flashplayer/downloads.html). In Windows, you can copy Flashplayer.exe to some location and add it to your PATH via `My Computer > Advanced > Environment Variables`. On OS X, I installed `Flash Player` to `usr/local/bin` and added the following to my `~/.bash_profile`
5 |
6 | export FLASH_PLAYER='/usr/local/bin/Flash Player.app/Contents/MacOS'
7 | export PATH=${M2_HOME}/bin:$FLASH_PLAYER:${PATH}
8 |
9 | For more information, check out [this post](https://docs.sonatype.org/display/FLEXMOJOS/Running+unit+tests).
--------------------------------------------------------------------------------
/2-UnitTests/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | 4.0.0
7 | org.justinjmoses.flexmojos-introduction
8 | flexmojos-unittests
9 | Flexmojos UnitTest Example
10 | 1.0.0-SNAPSHOT
11 | swf
12 |
13 |
14 |
15 |
16 | src/main/flex
17 | src/test/flex
18 |
19 |
20 |
21 | org.sonatype.flexmojos
22 | flexmojos-maven-plugin
23 | 4.0-RC2
24 | true
25 |
26 |
27 | ./Main.mxml
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | com.adobe.flex.framework
36 | flex-framework
37 | 4.5.1.21328
38 | pom
39 |
40 |
41 |
42 |
43 | com.adobe.flexunit
44 | flexunit
45 | 4.0-rc-1
46 | swc
47 | test
48 |
49 |
50 |
51 |
52 |
53 |
54 | flex-mojos-repository
55 | http://repository.sonatype.org/content/groups/flexgroup
56 |
57 | true
58 |
59 |
60 | false
61 |
62 |
63 |
64 |
65 |
66 | flex-mojos-plugin-repository
67 | http://repository.sonatype.org/content/groups/flexgroup
68 |
69 | true
70 |
71 |
72 | false
73 |
74 |
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/2-UnitTests/src/main/flex/Main.mxml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/2-UnitTests/src/main/flex/org/justinjmoses/flexmojos_intro/RandomCity.as:
--------------------------------------------------------------------------------
1 | package org.justinjmoses.flexmojos_intro
2 | {
3 | public class RandomCity
4 | {
5 | private const cities:Array =
6 | [ 'Santiago, Chile',
7 | 'Sydney, Australia',
8 | 'San Francisco, US',
9 | 'London, England',
10 | 'Paris, France',
11 | 'Buenos Aires, Argentina',
12 | 'Rio de Janerio, Brazil',
13 | 'Lima, Peru',
14 | 'Lisbon, Portugal',
15 | 'Barcelona, Spain',
16 | 'Athens, Greece',
17 | 'Moscow, Russia'
18 | ]
19 |
20 | public function get next():String
21 | {
22 | const index:int = Math.round(Math.random() * cities.length)
23 |
24 | return (cities[index]) ? cities[index] : next;
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/2-UnitTests/src/test/flex/org/justinjmoses/flexmojos_intro/TestRandomCity.as:
--------------------------------------------------------------------------------
1 | package org.justinjmoses.flexmojos_intro
2 | {
3 | import org.flexunit.assertThat;
4 |
5 | public class TestRandomCity
6 | {
7 | protected var cities:RandomCity;
8 |
9 | [Before]
10 | public function setUp():void
11 | {
12 | cities = new RandomCity();
13 | }
14 |
15 | [Test]
16 | public function testGetNext():void
17 | {
18 | for (var i:int = 1; i < 100; i++)
19 | assertThat(cities.next);
20 | }
21 |
22 | [After]
23 | public function tearDown():void
24 | {
25 | cities = null;
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/3-Dependencies/README.md:
--------------------------------------------------------------------------------
1 | #3. Dependencies
2 | This project adds on a simple third party dependency to the simple project. In order to build this, you must first `install` the as3-signals dependency (see above).
3 |
4 | To install the third party dependency, you need to run the following command from the project root:
5 |
6 | mvn install:install-file -Dfile=./libs/as3-signals-0.8.swc -DgroupId=org.osflash -DartifactId=as3-signals -Dversion=0.8 -Dpackaging=swc
7 |
8 | This will add the SWC to your local repository to ensure Maven can find it whenever it encounters the dependency.
9 |
10 | For more information on as3-signals, [checkout the project home](https://github.com/robertpenner/as3-signals/).
11 |
--------------------------------------------------------------------------------
/3-Dependencies/command.txt:
--------------------------------------------------------------------------------
1 | mvn install:install-file -Dfile=./libs/as3-signals-0.8.swc -DgroupId=org.osflash -DartifactId=as3-signals -Dversion=0.8 -Dpackaging=swc
2 |
--------------------------------------------------------------------------------
/3-Dependencies/libs/as3-signals-0.8.swc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjgonecrypto/flexmojos-introduction/ef30e1dc909593a66bf83e189ebdd500520d9b34/3-Dependencies/libs/as3-signals-0.8.swc
--------------------------------------------------------------------------------
/3-Dependencies/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | 4.0.0
7 | org.justinjmoses.flexmojos-introduction
8 | flexmojos-dependencies
9 | Flexmojos Dependencies Example
10 | 1.0.0-SNAPSHOT
11 | swf
12 |
13 |
14 | 4.5.1.21328
15 |
16 |
17 |
18 | src/main/flex
19 |
20 |
21 |
22 | org.sonatype.flexmojos
23 | flexmojos-maven-plugin
24 | 4.0-RC2
25 | true
26 |
27 |
28 | ./Main.mxml
29 |
30 | false
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | com.adobe.flex.framework
41 | flex-framework
42 | ${flex.version}
43 | pom
44 |
45 |
46 |
47 |
48 | org.osflash
49 | as3-signals
50 | 0.8
51 | swc
52 |
53 |
54 |
55 |
56 |
57 |
58 | flex-mojos-repository
59 | http://repository.sonatype.org/content/groups/flexgroup
60 |
61 | true
62 |
63 |
64 | false
65 |
66 |
67 |
68 |
69 |
70 | flex-mojos-plugin-repository
71 | http://repository.sonatype.org/content/groups/flexgroup
72 |
73 | true
74 |
75 |
76 | false
77 |
78 |
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/3-Dependencies/src/main/flex/Main.mxml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/3-Dependencies/src/main/flex/org/justinjmoses/flexmojos_intro/RandomCity.as:
--------------------------------------------------------------------------------
1 | package org.justinjmoses.flexmojos_intro
2 | {
3 | public class RandomCity
4 | {
5 | private const cities:Array =
6 | [ 'Santiago, Chile',
7 | 'Sydney, Australia',
8 | 'San Francisco, US',
9 | 'London, England',
10 | 'Paris, France',
11 | 'Buenos Aires, Argentina',
12 | 'Rio de Janerio, Brazil',
13 | 'Lima, Peru',
14 | 'Lisbon, Portugal',
15 | 'Barcelona, Spain',
16 | 'Athens, Greece',
17 | 'Moscow, Russia'
18 | ]
19 |
20 | public function get next():String
21 | {
22 | const index:int = Math.round(Math.random() * cities.length)
23 |
24 | return (cities[index]) ? cities[index] : next;
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/4-Flashbuilder-Goal/README.md:
--------------------------------------------------------------------------------
1 | #4. Flashbuilder Goal
2 | This combines the unit tests and dependencies project.
3 |
4 | Try generating a Flashbuilder project via the following Maven command:
5 |
6 | mvn org.sonatype.flexmojos:flexmojos-maven-plugin:3.9:flashbuilder
--------------------------------------------------------------------------------
/4-Flashbuilder-Goal/command.txt:
--------------------------------------------------------------------------------
1 | mvn org.sonatype.flexmojos:flexmojos-maven-plugin:3.9:flashbuilder
--------------------------------------------------------------------------------
/4-Flashbuilder-Goal/libs/as3-signals-0.8.swc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjgonecrypto/flexmojos-introduction/ef30e1dc909593a66bf83e189ebdd500520d9b34/4-Flashbuilder-Goal/libs/as3-signals-0.8.swc
--------------------------------------------------------------------------------
/4-Flashbuilder-Goal/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | 4.0.0
7 | org.justinjmoses.flexmojos-introduction
8 | flexmojos-flashbuilder
9 | Flexmojos Flashbuilder Example
10 | 1.0.0-SNAPSHOT
11 | swf
12 |
13 |
14 |
15 | 4.5.1.21328
16 | 4.0-RC2
17 | 4.0-rc-1
18 | 0.8
19 |
20 |
21 |
22 |
23 | src/main/flex
24 | src/test/flex
25 |
26 |
27 |
28 | org.sonatype.flexmojos
29 | flexmojos-maven-plugin
30 | ${flexmojos.version}
31 | true
32 |
33 |
34 | ./Main.mxml
35 |
36 | false
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | com.adobe.flex.framework
46 | flex-framework
47 | ${flex.sdk.version}
48 | pom
49 |
50 |
51 |
52 | com.adobe.flexunit
53 | flexunit
54 | ${flexunit.version}
55 | swc
56 | test
57 |
58 |
59 |
60 | org.osflash
61 | as3-signals
62 | ${as3-signals.version}
63 | swc
64 |
65 |
66 |
67 |
68 |
69 |
70 | flex-mojos-repository
71 | http://repository.sonatype.org/content/groups/flexgroup
72 |
73 | true
74 |
75 |
76 | false
77 |
78 |
79 |
80 |
81 |
82 | flex-mojos-plugin-repository
83 | http://repository.sonatype.org/content/groups/flexgroup
84 |
85 | true
86 |
87 |
88 | false
89 |
90 |
91 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/4-Flashbuilder-Goal/src/main/flex/Main.mxml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/4-Flashbuilder-Goal/src/main/flex/org/justinjmoses/flexmojos_intro/RandomCity.as:
--------------------------------------------------------------------------------
1 | package org.justinjmoses.flexmojos_intro
2 | {
3 | public class RandomCity
4 | {
5 | private const cities:Array =
6 | [ 'Santiago, Chile',
7 | 'Sydney, Australia',
8 | 'San Francisco, US',
9 | 'London, England',
10 | 'Paris, France',
11 | 'Buenos Aires, Argentina',
12 | 'Rio de Janerio, Brazil',
13 | 'Lima, Peru',
14 | 'Lisbon, Portugal',
15 | 'Barcelona, Spain',
16 | 'Athens, Greece',
17 | 'Moscow, Russia'
18 | ]
19 |
20 | public function get next():String
21 | {
22 | const index:int = Math.round(Math.random() * cities.length)
23 |
24 | return (cities[index]) ? cities[index] : next;
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/4-Flashbuilder-Goal/src/test/flex/org/justinjmoses/flexmojos_intro/TestRandomCity.as:
--------------------------------------------------------------------------------
1 | package org.justinjmoses.flexmojos_intro
2 | {
3 | public class TestRandomCity
4 | {
5 | protected var cities:RandomCity;
6 |
7 | [Before]
8 | public function setUp():void
9 | {
10 | cities = new RandomCity();
11 | }
12 |
13 | [Test]
14 | public function testGetNext():void
15 | {
16 | for (var i:int = 1; i < 100; i++)
17 | {
18 | var city:String = cities.next;
19 | }
20 | }
21 |
22 | [After]
23 | public function tearDown():void
24 | {
25 | cities = null;
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/5-Archetypes/README:
--------------------------------------------------------------------------------
1 | try running the various commands and inspecting the outputted template from each.
2 |
--------------------------------------------------------------------------------
/5-Archetypes/application-command.txt:
--------------------------------------------------------------------------------
1 | mvn archetype:generate -DarchetypeRepository=http://repository.sonatype.com/content/groups/flexgroup -DarchetypeGroupId=org.sonatype.flexmojos -DarchetypeArtifactId=flexmojos-archetypes-application -DarchetypeVersion=4.0-RC1
--------------------------------------------------------------------------------
/5-Archetypes/library-command.txt:
--------------------------------------------------------------------------------
1 | mvn archetype:generate -DarchetypeRepository=http://repository.sonatype.com/content/groups/flexgroup -DarchetypeGroupId=org.sonatype.flexmojos -DarchetypeArtifactId=flexmojos-archetypes-library -DarchetypeVersion=4.0-RC1
--------------------------------------------------------------------------------
/5-Archetypes/modular-command.txt:
--------------------------------------------------------------------------------
1 | mvn archetype:generate -DarchetypeRepository=http://repository.sonatype.com/content/groups/flexgroup -DarchetypeGroupId=org.sonatype.flexmojos -DarchetypeArtifactId=flexmojos-archetypes-modular-webapp -DarchetypeVersion=4.0-RC1
--------------------------------------------------------------------------------
/6-Libraries/README.md:
--------------------------------------------------------------------------------
1 | #6. Libraries
2 | This project splits the functionality of the other projects into an application SWF and a library SWC.
3 |
4 | To process, simply run an install on the base POM (both the SWF and the SWC have their own POMs that are referenced via `module` definitions in the parent POM).
5 |
6 | mvn clean install
7 |
8 |
--------------------------------------------------------------------------------
/6-Libraries/application/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 | org.justinjmoses.flexmojos-introduction.libraries-example
9 | parent
10 | 1.0.0-SNAPSHOT
11 |
12 |
13 | 4.0.0
14 | application
15 | Flexmojos Libraries Example - Application
16 | swf
17 |
18 |
19 |
20 | src/main/flex
21 |
22 |
23 |
24 | org.sonatype.flexmojos
25 | flexmojos-maven-plugin
26 | ${flexmojos.version}
27 | true
28 |
29 |
30 | ./Main.mxml
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 | ${project.groupId}
40 | library
41 | ${project.version}
42 | swc
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/6-Libraries/application/src/main/flex/Main.mxml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/6-Libraries/library/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 | org.justinjmoses.flexmojos-introduction.libraries-example
9 | parent
10 | 1.0.0-SNAPSHOT
11 |
12 |
13 | 4.0.0
14 | library
15 | Flexmojos Libraries Example - SWC Library
16 | swc
17 |
18 |
19 | src/main/flex
20 | src/test/flex
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/6-Libraries/library/src/main/flex/org/justinjmoses/flexmojos_intro/RandomCity.as:
--------------------------------------------------------------------------------
1 | package org.justinjmoses.flexmojos_intro
2 | {
3 | public class RandomCity
4 | {
5 | private const cities:Array =
6 | [ 'Santiago, Chile',
7 | 'Sydney, Australia',
8 | 'San Francisco, US',
9 | 'London, England',
10 | 'Paris, France',
11 | 'Buenos Aires, Argentina',
12 | 'Rio de Janerio, Brazil',
13 | 'Lima, Peru',
14 | 'Lisbon, Portugal',
15 | 'Barcelona, Spain',
16 | 'Athens, Greece',
17 | 'Moscow, Russia'
18 | ]
19 |
20 | public function get next():String
21 | {
22 | const index:int = Math.round(Math.random() * cities.length)
23 |
24 | return (cities[index]) ? cities[index] : next;
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/6-Libraries/library/src/test/flex/org/justinjmoses/flexmojos_intro/TestRandomCity.as:
--------------------------------------------------------------------------------
1 | package org.justinjmoses.flexmojos_intro
2 | {
3 | public class TestRandomCity
4 | {
5 | protected var cities:RandomCity;
6 |
7 | [Before]
8 | public function setUp():void
9 | {
10 | cities = new RandomCity();
11 | }
12 |
13 | [Test]
14 | public function testGetNext():void
15 | {
16 | for (var i:int = 1; i < 100; i++)
17 | {
18 | var city:String = cities.next;
19 | }
20 | }
21 |
22 | [After]
23 | public function tearDown():void
24 | {
25 | cities = null;
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/6-Libraries/libs/as3-signals-0.8.swc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjgonecrypto/flexmojos-introduction/ef30e1dc909593a66bf83e189ebdd500520d9b34/6-Libraries/libs/as3-signals-0.8.swc
--------------------------------------------------------------------------------
/6-Libraries/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | 4.0.0
7 | org.justinjmoses.flexmojos-introduction.libraries-example
8 | parent
9 | Flexmojos Libraries Example
10 | 1.0.0-SNAPSHOT
11 |
12 |
13 |
14 | pom
15 |
16 |
17 | library
18 | application
19 |
20 |
21 |
22 |
23 | 4.5.1.21328
24 | 4.0-RC2
25 | 4.0-rc-1
26 | 0.8
27 |
28 |
29 |
30 |
31 |
32 |
33 | org.sonatype.flexmojos
34 | flexmojos-maven-plugin
35 | ${flexmojos.version}
36 | true
37 |
38 |
39 | true
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | com.adobe.flex.framework
48 | flex-framework
49 | ${flex.sdk.version}
50 | pom
51 |
52 |
53 |
54 | com.adobe.flexunit
55 | flexunit
56 | ${flexunit.version}
57 | swc
58 | test
59 |
60 |
61 |
62 | org.osflash
63 | as3-signals
64 | ${as3-signals.version}
65 | swc
66 |
67 |
68 |
69 |
70 |
71 |
72 | flex-mojos-repository
73 | http://repository.sonatype.org/content/groups/flexgroup
74 |
75 | true
76 |
77 |
78 | false
79 |
80 |
81 |
82 |
83 |
84 | flex-mojos-plugin-repository
85 | http://repository.sonatype.org/content/groups/flexgroup
86 |
87 | true
88 |
89 |
90 | false
91 |
92 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/7-Profiles/README.md:
--------------------------------------------------------------------------------
1 | #7. Profiles
2 | This project adds to the SWF and SWC project with additional build parameters.
3 |
4 | To run the various profiles.
5 |
6 | * A release build
7 |
8 | mvn clean install -P release
9 |
10 | * Target specific Flex SDK
11 |
12 | mvn clean install -P flex4.1
13 |
14 | * Skip coverage
15 |
16 | mvn clean install -P no-coverage
17 |
18 | * Enable multiple profiles
19 |
20 | mvn clean install -P flex4.1, no-coverage
21 |
22 |
23 | * Alternative flashplayer location for unit tests (automatically enabled whenever that location is valid)
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/7-Profiles/application/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 | org.justinjmoses.flexmojos-introduction.profile-example
9 | parent
10 | 1.0.0-SNAPSHOT
11 |
12 |
13 | 4.0.0
14 | application
15 | Flexmojos Libraries Example - Application
16 | swf
17 |
18 |
19 |
20 | src/main/flex
21 |
22 |
23 |
24 | org.sonatype.flexmojos
25 | flexmojos-maven-plugin
26 | ${flexmojos.version}
27 | true
28 |
29 |
30 | ./Main.mxml
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 | ${project.groupId}
40 | library
41 | ${project.version}
42 | swc
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/7-Profiles/application/src/main/flex/Main.mxml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/7-Profiles/library/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 | org.justinjmoses.flexmojos-introduction.profile-example
9 | parent
10 | 1.0.0-SNAPSHOT
11 |
12 |
13 | 4.0.0
14 | library
15 | Flexmojos Libraries Example - SWC Library
16 | swc
17 |
18 |
19 | src/main/flex
20 | src/test/flex
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/7-Profiles/library/src/main/flex/org/justinjmoses/flexmojos_intro/RandomCity.as:
--------------------------------------------------------------------------------
1 | package org.justinjmoses.flexmojos_intro
2 | {
3 | public class RandomCity
4 | {
5 | private const cities:Array =
6 | [ 'Santiago, Chile',
7 | 'Sydney, Australia',
8 | 'San Francisco, US',
9 | 'London, England',
10 | 'Paris, France',
11 | 'Buenos Aires, Argentina',
12 | 'Rio de Janerio, Brazil',
13 | 'Lima, Peru',
14 | 'Lisbon, Portugal',
15 | 'Barcelona, Spain',
16 | 'Athens, Greece',
17 | 'Moscow, Russia'
18 | ]
19 |
20 | public function get next():String
21 | {
22 | const index:int = Math.round(Math.random() * cities.length)
23 |
24 | return (cities[index]) ? cities[index] : next;
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/7-Profiles/library/src/test/flex/org/justinjmoses/flexmojos_intro/TestRandomCity.as:
--------------------------------------------------------------------------------
1 | package org.justinjmoses.flexmojos_intro
2 | {
3 | public class TestRandomCity
4 | {
5 | protected var cities:RandomCity;
6 |
7 | [Before]
8 | public function setUp():void
9 | {
10 | cities = new RandomCity();
11 | }
12 |
13 | [Test]
14 | public function testGetNext():void
15 | {
16 | for (var i:int = 1; i < 100; i++)
17 | {
18 | var city:String = cities.next;
19 | }
20 | }
21 |
22 | [After]
23 | public function tearDown():void
24 | {
25 | cities = null;
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/7-Profiles/libs/as3-signals-0.8.swc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjgonecrypto/flexmojos-introduction/ef30e1dc909593a66bf83e189ebdd500520d9b34/7-Profiles/libs/as3-signals-0.8.swc
--------------------------------------------------------------------------------
/7-Profiles/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | 4.0.0
7 | org.justinjmoses.flexmojos-introduction.profile-example
8 | parent
9 | Flexmojos Libraries Example
10 | 1.0.0-SNAPSHOT
11 |
12 |
13 |
14 | pom
15 |
16 |
17 | library
18 | application
19 |
20 |
21 |
22 | 4.5.1.21328
23 | 4.0-RC2
24 | 4.0-rc-1
25 | 0.8
26 | true
27 |
28 |
29 |
30 |
31 | flex4.1
32 |
33 | 4.1.0.16076
34 |
35 |
36 |
37 |
38 | release
39 |
40 | false
41 | true
42 |
43 |
44 |
45 |
46 | alt-flashplayer
47 |
48 |
49 |
50 | /usr/local/bin/flashplayer
51 |
52 |
53 |
54 |
55 |
56 | org.sonatype.flexmojos
57 | flexmojos-maven-plugin
58 |
59 | /usr/local/bin/flashplayer
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 | xml-coverage
68 |
69 |
70 |
71 | unix
72 |
73 |
74 |
75 |
76 |
77 | org.sonatype.flexmojos
78 | flexmojos-maven-plugin
79 |
80 |
81 | xml
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 | no-coverage
91 |
92 |
93 |
94 | org.sonatype.flexmojos
95 | flexmojos-maven-plugin
96 |
97 | false
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 | org.sonatype.flexmojos
109 | flexmojos-maven-plugin
110 | ${flexmojos.version}
111 | true
112 |
113 |
114 | ${flex-debug}
115 | true
116 |
117 | html
118 |
119 |
120 |
121 |
123 |
124 | com.adobe.flex
125 | compiler
126 | ${flex.sdk.version}
127 | pom
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 | com.adobe.flex.framework
137 | flex-framework
138 | ${flex.sdk.version}
139 | pom
140 |
141 |
142 |
143 | com.adobe.flexunit
144 | flexunit
145 | ${flexunit.version}
146 | swc
147 | test
148 |
149 |
150 |
151 | org.osflash
152 | as3-signals
153 | ${as3-signals.version}
154 | swc
155 |
156 |
157 |
158 |
159 |
160 |
161 | flex-mojos-repository
162 | http://repository.sonatype.org/content/groups/flexgroup
163 |
164 | true
165 |
166 |
167 | false
168 |
169 |
170 |
171 |
172 |
173 | flex-mojos-plugin-repository
174 | http://repository.sonatype.org/content/groups/flexgroup
175 |
176 | true
177 |
178 |
179 | false
180 |
181 |
182 |
183 |
184 |
185 |
--------------------------------------------------------------------------------
/8-Nexus/README.md:
--------------------------------------------------------------------------------
1 | #8. Nexus
2 | This project moves the project to reference a local Nexus install.
3 |
4 | To use this:
5 |
6 | 1. Install Nexus on your local machine and start the Nexus process (on OSX it's ./nexus-oss-webapp-[version]-bundle/bin/jsw/macos-universal-[arch]/nexus start)
7 | * Go to Nexus in your browser: [http://localhost:8081/nexus](http://localhost:8081/nexus) and login (default credentials are admin:admin123)
8 | * Select Repositories from the left side bar
9 | * Add the Flexmojos group as a Proxy Repository (use "Flexmojos" as the id/name, use the defaults, and add the following remote location: http://repository.sonatype.org/content/groups/flexgroup)
10 | * Click the Refresh button on the repositories tab
11 | * Select Public Repositories group, choose the Configure tab, and move the new Flexmojos proxy to the box on the left. Save and exit.
12 |
13 | To run the build, execute:
14 |
15 | mvn clean install -s settings.xml
16 |
17 |
--------------------------------------------------------------------------------
/8-Nexus/application/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 | org.justinjmoses.flexmojos-introduction.nexus-example
9 | parent
10 | 1.0.0-SNAPSHOT
11 |
12 |
13 | 4.0.0
14 | application
15 | Flexmojos Libraries Example - Application
16 | swf
17 |
18 |
19 |
20 | src/main/flex
21 |
22 |
23 |
24 | org.sonatype.flexmojos
25 | flexmojos-maven-plugin
26 | ${flexmojos.version}
27 | true
28 |
29 |
30 | ./Main.mxml
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 | ${project.groupId}
40 | library
41 | ${project.version}
42 | swc
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/8-Nexus/application/src/main/flex/Main.mxml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/8-Nexus/library/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 | org.justinjmoses.flexmojos-introduction.nexus-example
9 | parent
10 | 1.0.0-SNAPSHOT
11 |
12 |
13 | 4.0.0
14 | library
15 | Flexmojos Libraries Example - SWC Library
16 | swc
17 |
18 |
19 | src/main/flex
20 | src/test/flex
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/8-Nexus/library/src/main/flex/org/justinjmoses/flexmojos_intro/RandomCity.as:
--------------------------------------------------------------------------------
1 | package org.justinjmoses.flexmojos_intro
2 | {
3 | public class RandomCity
4 | {
5 | private const cities:Array =
6 | [ 'Santiago, Chile',
7 | 'Sydney, Australia',
8 | 'San Francisco, US',
9 | 'London, England',
10 | 'Paris, France',
11 | 'Buenos Aires, Argentina',
12 | 'Rio de Janerio, Brazil',
13 | 'Lima, Peru',
14 | 'Lisbon, Portugal',
15 | 'Barcelona, Spain',
16 | 'Athens, Greece',
17 | 'Moscow, Russia'
18 | ]
19 |
20 | public function get next():String
21 | {
22 | const index:int = Math.round(Math.random() * cities.length)
23 |
24 | return (cities[index]) ? cities[index] : next;
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/8-Nexus/library/src/test/flex/org/justinjmoses/flexmojos_intro/TestRandomCity.as:
--------------------------------------------------------------------------------
1 | package org.justinjmoses.flexmojos_intro
2 | {
3 | public class TestRandomCity
4 | {
5 | protected var cities:RandomCity;
6 |
7 | [Before]
8 | public function setUp():void
9 | {
10 | cities = new RandomCity();
11 | }
12 |
13 | [Test]
14 | public function testGetNext():void
15 | {
16 | for (var i:int = 1; i < 100; i++)
17 | {
18 | var city:String = cities.next;
19 | }
20 | }
21 |
22 | [After]
23 | public function tearDown():void
24 | {
25 | cities = null;
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/8-Nexus/libs/as3-signals-0.8.swc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjgonecrypto/flexmojos-introduction/ef30e1dc909593a66bf83e189ebdd500520d9b34/8-Nexus/libs/as3-signals-0.8.swc
--------------------------------------------------------------------------------
/8-Nexus/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | 4.0.0
7 | org.justinjmoses.flexmojos-introduction.nexus-example
8 | parent
9 | Flexmojos Libraries Example
10 | 1.0.0-SNAPSHOT
11 |
12 |
13 |
14 | pom
15 |
16 |
17 | library
18 | application
19 |
20 |
21 |
22 |
23 | 4.5.1.21328
24 | 4.0-RC2
25 | 4.0-rc-1
26 | 0.8
27 |
28 |
29 |
30 |
31 |
32 |
33 | org.sonatype.flexmojos
34 | flexmojos-maven-plugin
35 | ${flexmojos.version}
36 | true
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | com.adobe.flex.framework
48 | flex-framework
49 | ${flex.sdk.version}
50 | pom
51 |
52 |
53 |
54 | com.adobe.flexunit
55 | flexunit
56 | ${flexunit.version}
57 | swc
58 | test
59 |
60 |
61 |
62 | org.osflash
63 | as3-signals
64 | ${as3-signals.version}
65 | swc
66 |
67 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/8-Nexus/settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 | internal-nexus
11 |
12 |
13 |
14 | internal-repository
15 | http://localhost:8081/nexus/content/groups/public
16 |
17 | true
18 | always
19 | warn
20 |
21 |
22 |
23 |
24 |
25 |
26 | internal-plugin-repository
27 | http://localhost:8081/nexus/content/groups/public
28 |
29 | true
30 | always
31 | warn
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | internal-nexus
42 |
43 |
44 |
45 |
52 |
53 |
--------------------------------------------------------------------------------
/9-FrameworkRSLs/README.md:
--------------------------------------------------------------------------------
1 | #9. Framework RSLs
2 | This project turns the Flex framework into an RSL dependency. As such, the resulting target SWF is much smaller.
3 |
4 | To build, run:
5 |
6 | mvn clean install
7 |
8 |
--------------------------------------------------------------------------------
/9-FrameworkRSLs/application/application-1.0.0-SNAPSHOT.swf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjgonecrypto/flexmojos-introduction/ef30e1dc909593a66bf83e189ebdd500520d9b34/9-FrameworkRSLs/application/application-1.0.0-SNAPSHOT.swf
--------------------------------------------------------------------------------
/9-FrameworkRSLs/application/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 | org.justinjmoses.flexmojos-introduction.framework-rsls
9 | parent
10 | 1.0.0-SNAPSHOT
11 |
12 |
13 | 4.0.0
14 | application
15 | Flexmojos Libraries Example - Application
16 | swf
17 |
18 |
19 |
20 | src/main/flex
21 |
22 |
23 |
24 | org.sonatype.flexmojos
25 | flexmojos-maven-plugin
26 | ${flexmojos.version}
27 | true
28 |
29 |
30 | ./Main.mxml
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 | ${project.groupId}
40 | library
41 | ${project.version}
42 | swc
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/9-FrameworkRSLs/application/src/main/flex/Main.mxml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/9-FrameworkRSLs/library/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 | org.justinjmoses.flexmojos-introduction.framework-rsls
9 | parent
10 | 1.0.0-SNAPSHOT
11 |
12 |
13 | 4.0.0
14 | library
15 | Flexmojos Libraries Example - SWC Library
16 | swc
17 |
18 |
19 | src/main/flex
20 | src/test/flex
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/9-FrameworkRSLs/library/src/main/flex/org/justinjmoses/flexmojos_intro/RandomCity.as:
--------------------------------------------------------------------------------
1 | package org.justinjmoses.flexmojos_intro
2 | {
3 | public class RandomCity
4 | {
5 | private const cities:Array =
6 | [ 'Santiago, Chile',
7 | 'Sydney, Australia',
8 | 'San Francisco, US',
9 | 'London, England',
10 | 'Paris, France',
11 | 'Buenos Aires, Argentina',
12 | 'Rio de Janerio, Brazil',
13 | 'Lima, Peru',
14 | 'Lisbon, Portugal',
15 | 'Barcelona, Spain',
16 | 'Athens, Greece',
17 | 'Moscow, Russia'
18 | ]
19 |
20 | public function get next():String
21 | {
22 | const index:int = Math.round(Math.random() * cities.length)
23 |
24 | return (cities[index]) ? cities[index] : next;
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/9-FrameworkRSLs/library/src/test/flex/org/justinjmoses/flexmojos_intro/TestRandomCity.as:
--------------------------------------------------------------------------------
1 | package org.justinjmoses.flexmojos_intro
2 | {
3 | public class TestRandomCity
4 | {
5 | protected var cities:RandomCity;
6 |
7 | [Before]
8 | public function setUp():void
9 | {
10 | cities = new RandomCity();
11 | }
12 |
13 | [Test]
14 | public function testGetNext():void
15 | {
16 | for (var i:int = 1; i < 100; i++)
17 | {
18 | var city:String = cities.next;
19 | }
20 | }
21 |
22 | [After]
23 | public function tearDown():void
24 | {
25 | cities = null;
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/9-FrameworkRSLs/libs/as3-signals-0.8.swc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjgonecrypto/flexmojos-introduction/ef30e1dc909593a66bf83e189ebdd500520d9b34/9-FrameworkRSLs/libs/as3-signals-0.8.swc
--------------------------------------------------------------------------------
/9-FrameworkRSLs/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | 4.0.0
7 | org.justinjmoses.flexmojos-introduction.framework-rsls
8 | parent
9 | Flexmojos Framework RSLs Example
10 | 1.0.0-SNAPSHOT
11 |
12 | pom
13 |
14 |
15 | library
16 | application
17 |
18 |
19 |
20 |
21 | 4.5.1.21328
22 | 2.0.0.232
23 | 1.0.0.16316
24 | 4.0-RC2
25 | 4.0-rc-1
26 | 0.8
27 |
28 |
29 |
30 |
31 |
32 |
33 | org.sonatype.flexmojos
34 | flexmojos-maven-plugin
35 | ${flexmojos.version}
36 | true
37 |
38 |
39 |
40 | false
41 |
42 |
43 |
44 | http://fpdownload.adobe.com/pub/swz/crossdomain.xml
45 | http://fpdownload.adobe.com/pub/swz/crossdomain.xml
46 | http://fpdownload.adobe.com/pub/swz/crossdomain.xml
47 |
48 |
49 |
50 | http://fpdownload.adobe.com/pub/{extension}/flex/${flex.sdk.version}/{artifactId}_{version}.{extension}
51 |
52 |
53 | http://fpdownload.adobe.com/pub/{extension}/tlf/${flex.tlf.version}/{artifactId}_${flex.tlf.version}.{extension}
54 |
55 |
56 | http://fpdownload.adobe.com/pub/{extension}/flex/${flex.sdk.version}/{artifactId}_${flex.osmf.version}.{extension}
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 | com.adobe.flex.framework
67 | framework
68 | ${flex.sdk.version}
69 | swc
70 | caching
71 |
72 |
73 |
74 | com.adobe.flex.framework
75 | textLayout
76 | ${flex.sdk.version}
77 | swc
78 | caching
79 |
80 |
81 |
82 | com.adobe.flex.framework
83 | spark
84 | ${flex.sdk.version}
85 | swc
86 | caching
87 |
88 |
89 |
90 | com.adobe.flex.framework
91 | sparkskins
92 | ${flex.sdk.version}
93 | swc
94 | caching
95 |
96 |
97 |
98 | com.adobe.flex.framework
99 | rpc
100 | ${flex.sdk.version}
101 | swc
102 | caching
103 |
104 |
105 |
106 | com.adobe.flex.framework
107 | charts
108 | ${flex.sdk.version}
109 | swc
110 | caching
111 |
112 |
113 |
114 | com.adobe.flex.framework
115 | spark_dmv
116 | ${flex.sdk.version}
117 | swc
118 | caching
119 |
120 |
121 |
122 | com.adobe.flex.framework
123 | osmf
124 | ${flex.sdk.version}
125 | swc
126 | caching
127 |
128 |
129 |
130 | com.adobe.flex.framework
131 | mx
132 | ${flex.sdk.version}
133 | swc
134 | caching
135 |
136 |
137 |
138 | com.adobe.flex.framework
139 | advancedgrids
140 | ${flex.sdk.version}
141 | swc
142 | caching
143 |
144 |
145 |
146 |
147 | com.adobe.flex.framework
148 | flex-framework
149 | ${flex.sdk.version}
150 | pom
151 |
152 |
153 |
154 |
155 | com.adobe.flexunit
156 | flexunit
157 | ${flexunit.version}
158 | swc
159 | test
160 |
161 |
162 |
163 | org.osflash
164 | as3-signals
165 | ${as3-signals.version}
166 | swc
167 |
168 |
169 |
170 |
171 |
172 |
173 | flex-mojos-repository
174 | http://repository.sonatype.org/content/groups/flexgroup
175 |
176 | true
177 |
178 |
179 | false
180 |
181 |
182 |
183 |
184 |
185 | flex-mojos-plugin-repository
186 | http://repository.sonatype.org/content/groups/flexgroup
187 |
188 | true
189 |
190 |
191 | false
192 |
193 |
194 |
195 |
196 |
197 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Flexmojos Introduction: Usage instructions
2 | This collection of examples provides some simple introductions to using Flexmojos.
3 |
4 | For each project you can build via:
5 |
6 | mvn clean install
7 |
8 | This will create a SWF in the `target` folder of the respective diretory.
9 |
10 | ## Versions
11 | Flexmojos target: *4.0-RC2*. Checkout the [full plugin info](https://repository.sonatype.org/content/sites/maven-sites/flexmojos/4.0-RC2/plugin-info.html).
12 |
13 | Flex SDK: *4.5.1.21328*
14 |
15 | ## Project breakdown
16 |
17 | ### 1. Simple
18 | This is an extremely simple project, designed simply as an example to get started.
19 |
20 | ### 2. UnitTests
21 | This adds on a single unit test to the simple project.
22 |
23 | *Note*: In order to run the unit tests, Flexmojos needs to be able to find the Flashplayer executable. You should ensure Flashplayer (`Flash Player` on OS X and `Flashplayer.exe` on WinX) is available on your PATH. You can download the standalone Flashplayer *Projector* from [Adobe](http://www.adobe.com/support/flashplayer/downloads.html). In Windows, you can copy Flashplayer.exe to some location and add it to your PATH via `My Computer > Advanced > Environment Variables`. On OS X, I installed `Flash Player` to `usr/local/bin` and added the following to my `~/.bash_profile`
24 |
25 | export FLASH_PLAYER='/usr/local/bin/Flash Player.app/Contents/MacOS'
26 | export PATH=${M2_HOME}/bin:$FLASH_PLAYER:${PATH}
27 |
28 | For more information, check out [this post](https://docs.sonatype.org/display/FLEXMOJOS/Running+unit+tests).
29 |
30 | ### 3. Dependencies
31 | This adds on a simple third party dependency to the simple project. In order to build this, you must first `install` the as3-signals dependency (see above).
32 |
33 | To install the third party dependency, you need to run the following command from the project root:
34 |
35 | mvn install:install-file -Dfile=./libs/as3-signals-0.8.swc -DgroupId=org.osflash -DartifactId=as3-signals -Dversion=0.8 -Dpackaging=swc
36 |
37 | This will add the SWC to your local repository to ensure Maven can find it whenever it encounters the dependency.
38 |
39 | For more information on as3-signals, [checkout the project home](https://github.com/robertpenner/as3-signals/).
40 |
41 |
42 | ### 4. Flashbuilder Goal
43 | This combines the unit tests and dependencies project.
44 |
45 | Try generating a Flashbuilder project via the following Maven command:
46 |
47 | mvn org.sonatype.flexmojos:flexmojos-maven-plugin:3.9:flashbuilder
48 |
49 | ### 5. Archetypes
50 | This is a collection of commands to generate simple starter projects for Flexmojos.
51 |
52 | ### 6. Libraries
53 | This project splits the functionality of the other projects into an application SWF and a library SWC.
54 |
55 |
--------------------------------------------------------------------------------
/libs/as3-signals-0.8.swc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjgonecrypto/flexmojos-introduction/ef30e1dc909593a66bf83e189ebdd500520d9b34/libs/as3-signals-0.8.swc
--------------------------------------------------------------------------------