glassfish 3.1 system properties deployment

779 Views Asked by At

I had a log4j error (see here) and the suggested fix worked. I set the org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES system property to false in the console with asadmin.

As I am working with maven in a project using glassfish 3.1 I have to insert this fix in my code somewhere to make it run for everybody. I figured out this can be done with the maven-embedded-glassfish-plugin as a command. So i wrote this code and put it in my pom.xml:

 <plugin>
  <groupId>org.glassfish</groupId>
  <artifactId>maven-embedded-glassfish-plugin</artifactId>
  <version>3.1</version>
   <configuration>
    <commands>
     <command>create-system-properties org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false</command>
    </commands>
   </configuration>
</plugin>

But the server will not create the system property. What am I missing here? Is there another way to realize this? Any help is appreciated.

0

There are 0 best solutions below