I have got a library project (written in ActionScript), that has two build outputs: One is made by including library A, the other is made by including library B.
My goal is to mavenize this library, and I've come up with the following solution: I have a multi module Maven project that looks like this:
myLib-Mobile
\- pom.xml
myLib-Web
\- pom.xml
src
\- main
\- actionScript
...code is here
pom.xml
The parent pom.xml holds everything except the one dependency that changes based on the build target (and the FlexMojos compiler, since one needs to be built with AIR the other with Flash). Since the code is not at the usual location I define it this way in the pom files of the children:
<build>
<sourceDirectory>../src/main/actionscript</sourceDirectory>
...
This works fine if I build it in the console, but when I import this as a Maven project in IntelliJ, it does not find the source files - it seems to me that IntelliJ cannot handle if the <sourceDirectory>
tag has a reference to the parent directory. The only workaround I found was to manually specify the content root in the project settings.
Anyone knows a better solution? Maybe using modules is not the way to go?