0

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?

sydd
  • 1,824
  • 2
  • 30
  • 54
  • Manually specifying the content root shouldn't normally be a problem, if it is a static location. You only need to define it once, right? – vikingsteve Sep 26 '14 at 08:32
  • Eventually using the build-helper-maven-plugin (http://mojo.codehaus.org/build-helper-maven-plugin/add-source-mojo.html) could help. I know that IntelliJ understands this. – Christofer Dutz Oct 12 '14 at 18:34

0 Answers0