0 Replies Latest reply on May 23, 2007 5:47 AM by JasperFlex

    Problems with configuring Eclipse workspace (Flex, Java, JBoss)

    JasperFlex
      I have a workspace in Eclipse 3.2.2 (with WTP 1.5.4 and Flex plugin) with one Dynamic Web Project. This dynamic web project contains my Flex application and some Java files as well. I would like to be able to do the following:
      - deploy this as a war-file to JBoss (version 4.0.2)
      - be able to debug the Java as well as the Flex files
      - have the Flex Development Perspective work correctly (ie. Design Mode should work correctly)
      - have hot deployment of changes in the Java and Flex files to JBoss (perhaps a different issue)

      First let me explain the source folder structure.

      <WebProject>
      |-> locale (contains resourcebundles for each language the application needs to support (in seperate directories))
      |-> src
      |------> main
      |--------------> java (all my java source files)
      |--------------> flex (all my flex source files)
      |--------------> webapp (contains WEB-INF, META-INF, main application mxml, images etc)
      |------> test
      |--------------> java (all my java test source files)
      |--------------> flex (all my flex test source files)

      The Dynamic Web Project has the Java Nature as well as the Flex Nature.
      The build path for Java is as follows:
      - <WebProject>/locale/en_US (output folder: <WebProject>/src/main/webapp/WEB-INF/flex/user_classes)
      - <WebProject>/src/main/flex (output folder: <WebProject>/src/main/webapp/WEB-INF/flex/user_classes)
      - <WebProject>/src/test/flex (output folder: <WebProject>/src/main/webapp/WEB-INF/flex/user_classes)
      - <WebProject>/src/test/java (output folder: <WebProject>/src/main/webapp/WEB-INF/classes)
      (Default output folder is <WebProject>/src/main/webapp/WEB-INF/classes)

      The build path for Flex is as follows:
      Main source folder: <WebProject>/src/main/webapp
      Output folder: <WebProject>/src/main/webapp/WEB-INF/flex/user_classes
      Additional source folders outside main source folders:
      - WebProject/locale/en_US
      - WebProject/src/main/flex
      - WebProject/src/test/flex

      Problem 1: in Design Mode in the Flex Development Perspective all components present in the src/main/flex directory are not found, they appear as a red cross. However I have no compile errors. When I deploy the WebProject to JBoss the application works fine. I can debug the Java code (when JBoss is started in Debug mode), and debug the Flex application (by debugging the Flex Application which points to the location where JBoss is running). It seems the Flex Development Perspective is having trouble with recognizing the additional source paths in the Design Mode.

      When I move the components from the src/main/flex directory to the main source folder of Flex (src/main/webapp) it does work correctly. However I no longer have a separation between the Flex source and test files, plus this means I have to change the Maven build file and that's something I'd rather not do.

      Problem 2: When I make a change in a mxml, I would like to see this change immediately a my JBoss server. I can understand that I would have to reload the application, but currently it's necessary to stop and start JBoss.

      So my questions are: What should I do to fix the problem in Design Mode? And is it possible to have Flex do hot deployment to JBoss (or any other server)?