finmath / finmath-lib

Mathematical Finance Library: Algorithms and methodologies related to mathematical finance.
Apache License 2.0
488 stars 168 forks source link

enable maven profile activation with idk version #7

Closed William1104 closed 8 years ago

William1104 commented 8 years ago

Hi Christian,

I updated the pom.xml a bit to make the maven select the right profile (java-6 or java-8) automatically. Hope it simplifies the project building.

Best regards, William

cfries commented 8 years ago

Hi William.

I am not sure if I am merging that pull request. I have the following problem: If the pom contains the activation, I can no longer select the profile using mvn -Pjava-6 or mvn -Pjava-8. However, I still like to run the Java 6 builds, even if I am on a Java 8 JDK.

But maybe it is better to run the builds on their target JDKs, in which case your change is perfect. Or is there any way to alter the activation?

Best Christian

William1104 commented 8 years ago

Hi Christian,

http://stackoverflow.com/questions/25201430/de-activate-a-maven-profile-from-command-line

I am sorry the trouble it may cause. To force java6 build with a jdk8, we may use the option like > mvn -P\!java-8 -Pjava-6. The ! helps to turn off a profile with force. Hope it helps.

Best regards, William

On Thu, 4 Feb 2016 at 4:43 PM, Christian Fries notifications@github.com wrote:

Hi William.

I am not sure if I am merging that pull request. I have the following problem: If the pom contains the activation, I can no longer select the profile using mvn -Pjava-6 or mvn -Pjava-8. However, I still like to run the Java 6 builds, even if I am on a Java 8 JDK.

But maybe it is better to run the builds on their target JDKs, in which case your change is perfect. Or is there any way to alter the activation?

Best Christian

— Reply to this email directly or view it on GitHub https://github.com/finmath/finmath-lib/pull/7#issuecomment-179711525.

cfries commented 8 years ago

Thank you William. Sorry for the late merge.