[ 
http://jira.codehaus.org/browse/SUREFIRE-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=134680#action_134680
 ] 

Richard Opalka commented on SUREFIRE-497:
-----------------------------------------

I was able to force endorsed mechanism for tests using really ugly workaround.
However this workaround is absolutely unacceptable for me because it affects 
all maven plugins.
My current workaround is the following:

export MAVEN_OPTS=-Djava.endorsed.dirs=$JBOSS_HOME/lib/endorsed
mvn -Pjboss500 test

The only acceptable and right solution for me is to setup endorsed mechanism 
for surefire tests only.


> Unable to force Java endorsed mechanism for tests
> -------------------------------------------------
>
>                 Key: SUREFIRE-497
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-497
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: classloading
>    Affects Versions: 2.4.2
>         Environment: java version "1.5.0_15", Linux version 
> 2.6.21-1.3194.fc7, Maven 2.0.9
>            Reporter: Richard Opalka
>
> I tried the following without success:
>  * I added java.endorsed.dirs to systemProperties
>     <profile>
>       <id>jboss500</id>
>       <build>
>         <plugins>
>           <plugin>
>             <artifactId>maven-surefire-plugin</artifactId>
>             <configuration>
>               <systemProperties>
>                 <property>
>                   <name>java.endorsed.dirs</name>
>                   <value>${jboss500.home}/lib/endorsed</value>
>                 </property>
>               </systemProperties>
>             </configuration>
>           </plugin>
>         </plugins>
>       </build>
>     </profile>
>  * I added java.endorsed.dirs JVM property to argLine:
>     <profile>
>       <id>jboss500</id>
>       <build>
>         <plugins>
>           <plugin>
>             <artifactId>maven-surefire-plugin</artifactId>
>             <configuration>
>               
> <argLine>-Djava.endorsed.dirs=${jboss501.home}/lib/endorsed</argLine>
>             </configuration>
>           </plugin>
>         </plugins>
>       </build>
>     </profile>
>  * I tried to propagate it from commandline using command:
> mvn -Pjboss500 -Djava.endorsed.dirs=$JBOSS_HOME/lib/endorsed test

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to