You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by boyetp <bo...@yahoo.com> on 2009/10/06 08:03:23 UTC
Problem compiling FlexLibrary using include directive
Hi All,
I hope someone can help me with my issue using Maven to compile Flex Library
Project.
I got this following files.
---- the class App.as
package com.test {
public class App {
include "TestIncl.as";
public function App(){
super();
}
public static function greeting(name:String):String {
return "Hello, " + name;
}
}
}
---- the TestIncl.as as file "not a class"
private var _test:String;
public function set test(p:String):void{
_test = p;
}
public function get test():String{
return _test;
}
When package using mvn package.
I got this following errors.
It tries to compile the TestIncl.as script file.
How do I solve this?
[ERROR] C:\Users\boyetp\Documents\Flex Builder
3\MavenTestLib\src\main\flex\com\test\TestIncl.as:[2,1] The private
attribute may be used only on class property definitions.private var
_test:String;
[ERROR] C:\Users\boyetp\Documents\Flex Builder
3\MavenTestLib\src\main\flex\com\
test\TestIncl.as:[4,1] The public attribute can only be used inside a packag
e.public function set test(p:String):void{
[ERROR] C:\Users\boyetp\Documents\Flex Builder
3\MavenTestLib\src\main\flex\com\
test\TestIncl.as:[8,1] The public attribute can only be used inside a packag
e.public function get test():String{
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error compiling!
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 13 seconds
[INFO] Finished at: Mon Oct 05 22:53:53 PDT 2009
[INFO] Final Memory: 17M/127M
[INFO]
------------------------------------------------------------------------
Best,
Boyetp
--
View this message in context: http://www.nabble.com/Problem-compiling-FlexLibrary-using-include-directive-tp25763364p25763364.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Problem compiling FlexLibrary using include directive
Posted by Marvin Froeder <ve...@gmail.com>.
What maven plugin are you using?
VELO
On Tue, Oct 6, 2009 at 3:03 AM, boyetp <bo...@yahoo.com> wrote:
>
> Hi All,
>
> I hope someone can help me with my issue using Maven to compile Flex
> Library
> Project.
>
> I got this following files.
> ---- the class App.as
> package com.test {
> public class App {
> include "TestIncl.as";
> public function App(){
> super();
> }
>
> public static function greeting(name:String):String {
> return "Hello, " + name;
> }
> }
> }
>
> ---- the TestIncl.as as file "not a class"
>
> private var _test:String;
>
> public function set test(p:String):void{
> _test = p;
> }
>
> public function get test():String{
> return _test;
> }
>
>
> When package using mvn package.
>
> I got this following errors.
> It tries to compile the TestIncl.as script file.
> How do I solve this?
>
>
> [ERROR] C:\Users\boyetp\Documents\Flex Builder
> 3\MavenTestLib\src\main\flex\com\test\TestIncl.as:[2,1] The private
> attribute may be used only on class property definitions.private var
> _test:String;
> [ERROR] C:\Users\boyetp\Documents\Flex Builder
> 3\MavenTestLib\src\main\flex\com\
> test\TestIncl.as:[4,1] The public attribute can only be used inside a
> packag
> e.public function set test(p:String):void{
> [ERROR] C:\Users\boyetp\Documents\Flex Builder
> 3\MavenTestLib\src\main\flex\com\
> test\TestIncl.as:[8,1] The public attribute can only be used inside a
> packag
> e.public function get test():String{
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error compiling!
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 13 seconds
> [INFO] Finished at: Mon Oct 05 22:53:53 PDT 2009
> [INFO] Final Memory: 17M/127M
> [INFO]
> ------------------------------------------------------------------------
>
>
> Best,
>
> Boyetp
> --
> View this message in context:
> http://www.nabble.com/Problem-compiling-FlexLibrary-using-include-directive-tp25763364p25763364.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: Problem compiling FlexLibrary using include directive
Posted by Viral B <vd...@yahoo.com>.
Flex builder or command line will throw error for your case since you are
compiling TestIncl.as file.
One way to resolve this error is by not compiling TestIncl.as file you could
do this in Flex Builder as well as your build script, but this is not a
clean
solution.
Other option which I use is rename the file with some other extension so say
"TestIncl.asinclude"
, with this flex wont compile your file since it does not end with .as.
Try and let me know if it works for you.
boyetp wrote:
>
> Hi All,
>
> I hope someone can help me with my issue using Maven to compile Flex
> Library Project.
>
> I got this following files.
> ---- the class App.as
> package com.test {
> public class App {
> include "TestIncl.as";
> public function App(){
> super();
> }
>
> public static function greeting(name:String):String {
> return "Hello, " + name;
> }
> }
> }
>
> ---- the TestIncl.as as file "not a class"
>
> private var _test:String;
>
> public function set test(p:String):void{
> _test = p;
> }
>
> public function get test():String{
> return _test;
> }
>
>
> When package using mvn package.
>
> I got this following errors.
> It tries to compile the TestIncl.as script file.
> How do I solve this?
>
>
> [ERROR] C:\Users\boyetp\Documents\Flex Builder
> 3\MavenTestLib\src\main\flex\com\test\TestIncl.as:[2,1] The private
> attribute may be used only on class property definitions.private var
> _test:String;
> [ERROR] C:\Users\boyetp\Documents\Flex Builder
> 3\MavenTestLib\src\main\flex\com\
> test\TestIncl.as:[4,1] The public attribute can only be used inside a
> packag
> e.public function set test(p:String):void{
> [ERROR] C:\Users\boyetp\Documents\Flex Builder
> 3\MavenTestLib\src\main\flex\com\
> test\TestIncl.as:[8,1] The public attribute can only be used inside a
> packag
> e.public function get test():String{
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error compiling!
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 13 seconds
> [INFO] Finished at: Mon Oct 05 22:53:53 PDT 2009
> [INFO] Final Memory: 17M/127M
> [INFO]
> ------------------------------------------------------------------------
>
>
> Best,
>
> Boyetp
>
--
View this message in context: http://old.nabble.com/Problem-compiling-FlexLibrary-using-include-directive-tp25763364p28323530.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org