Hi all,
following Jody advice (to look in the oracle module) I tried to create a 
profile that activates when a certain system variable is missing.

<profile>
   <id>classpath.jai</id>
   <activation>
     <property>
       <name>!native.jai</name>
     </property>
   </activation>
   <dependencies>
     <dependency>
       <groupId>javax.media</groupId>
       <artifactId>jai_core</artifactId>
       <version>1.1.3</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>javax.media</groupId>
       <artifactId>jai_codec</artifactId>
       <version>1.1.3</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>javax.media</groupId>
       <artifactId>jai_imageio</artifactId>
       <version>1.1</version>
       <scope>provided</scope>
     </dependency>
   </dependencies>
</profile>

Now, this profile activates if you don't have the native.jai
system variable set, and deactivates otherwise.
The crux is that otherwise. The only way to set that damn
system variable seems to use -Dnative.jai on maven invocation,
setting native.jai as an enviroment variable or trying to
put the variable as a property in the settings.xml (in an
active by default profile) simply does not wok (at least, it does
not on Windows).

Having to declare -Dnative.jai each time you call maven is tedious...
The only escape I see is to suggest those developers to alter
their maven execution scripts so that the actual maven invocation becomes:

%MAVEN_JAVA_EXE% %MAVEN_OPTS% -classpath %CLASSWORLDS_JAR% 
"-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" 
org.codehaus.classworlds.Launcher -Dnative.jai %MAVEN_CMD_LINE_ARGS%

(warning, setting MAVEN_OPTS won't work, I do think the maven launcher
does some magic and makes whatever you set in MAVEN_OPTS unavailabe...)

Would you consider this to be a viable solution? I can't say I like
it much, but I see no other ways?
Cheers
Andrea

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to