0

Finding it difficult to express myself easily around this issue so thought best to start with a context section:

Context:

I have a Flex based application (a rather complex system) that can be compiled using "conditional compilation" into various use cases eg:

Compilation One = portalProjectUserOne Compilation two = portalProjectUserTwo

Whether using conditional compilation is a sound idea is a completly different argument and therefore lets assume one is forced down this road, I then however decide to create a project for each of my desired compilations:

portalProjectUserOne -branches -tags -trunk -src -pom

portalProjectUserTwo -branches -tags -trunk -src -{NEEDS TO USE PROJECT ONES SOURCE}

As I do not want to break the ever rigid laws of programming and not duplicate anything I need a way of accessing the source of project ONE and using the source to do a CUSTOM compilation.

Things I have tried:

  1. I tried using relative paths (../../portalProjectUserOne/trunk/src/etc...) with successful compilation but when it came time to release a final product to the nexus repo it had a few issues with reaching out the project structure, that and it felt a bit dirty really.
  2. I attempted to use the "maven-dependency-plugin" to try and copy the sources from the first project, maybe this a pure lack of understanding on my part but I can not get my head around how you generate your classes in one project and access them from another.

This is my first question on stackoverflow and if I have been far to broad please let me know and I shall update with more extensive examples if required.

Thanks for listening/reading/being a coder.

MonkeyMagiic
  • 126
  • 1
  • 7
  • Just a short question: What is the reason for you trying to do this? I know that you state that you don't want to discuss this, but I think it is essential to answering your question. I think that what you are trying is not possible and not desirable. If we understand what you are trying to do we might be able to guide you in the right direction. Perhaps this helps: http://stackoverflow.com/questions/270445/maven-compile-with-multiple-src-directories – Christofer Dutz Jul 30 '12 at 10:05
  • Hi Chrisdutz, thanks for the reply, the project I am working require maven released artifacts of dev and release versions (dev versions can be used inside applications outside of portal that requires different compilation). The link you publish is/was the final approach and proved to be ideal (in my situation). thanks for publishing that – MonkeyMagiic Aug 17 '12 at 15:19

0 Answers0