Hi All,

I have determined the cause of the test execution failures in 
SingleThreadedFeedUpdaterTest and RomeFeedFetcherTest, just thought I'd share 
my solution in case anyone else is affected in the same way.
Both tests require internet access and the failures were caused by lack of 
non-proxied outbound access whilst at work. As soon as I set a proxy the tests 
all passed.

I believe that Maven executes tests in a spawned JVM, hence the proxy settings 
need to be given to the maven-surefire-plugin rather than to the main Maven 
JVM. This can be done by setting the following system properties in the plugin 
configuration:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>    
    <configuration>
      <systemProperties>
      <!-- existing system properties snipped for brevity... -->
        <property>
          <name>http.proxyHost</name>
          <value>10.233.152.33</value>
        </property>
        <property>
          <name>http.proxyPort</name>
          <value>8080</value>
        </property>                        
      </systemProperties>
    </configuration>
</plugin>

I did try and set this in the <pluginmanagement> element of the top level POM 
hoping that the settings would be inherited in child POMs, but I think due to 
the re-definition of the surefire plugin in certain child POMs the settings 
never get inherited.

Cheers,

Edd



On Tue, 2 Feb 2010 11:48:46 -0600, jason mayer <[email protected]> wrote:
> I'm using 905720, and I do not have that problem.  Idle curiousity: do
> you have the same problem if you do 'mvn install' from a path that
> doesn't have white space in it?
> 
> On Tue, Feb 2, 2010 at 11:29 AM, Edd Grant <[email protected]> wrote:
>> Hi All,
>>
>> I have checked out the latest SVN trunk (revision 905673) and am trying
> to
>> build Roller using Maven. The following tests are failing:
>>
>> 1:
>>
> testUpdateSubscription(org.apache.roller.planet.business.SingleThreadedFeedUpdaterTest)
>> 2: testFetchFeed(org.apache.roller.planet.business.RomeFeedFetcherTest)
>> 3:
>>
> testFetchFeedConditionally(org.apache.roller.planet.business.RomeFeedFetcherTest)
>>
>> To cheekily try and build the roller distributable by ignoring the test
>> failures I have run mvn install setting -Dmaven.test.error.ignore=true
> and
>> -Dmaven.test.failure.ignore=true, however when I do this I get the
> following
>> error at the end of the test phase:
>>
>> [INFO] [jar:jar {execution: default-jar}]
>> [INFO] Building jar: C:\Data\granedd\My
>>
> Documents\Programming\roller\planet-business\target\roller-planet-business-5.0-BETA2-SNAPSHOT.jar
>> [INFO] [antrun:run {execution: stopdb}]
>> [INFO] Executing tasks
>> Stopping Derby
>> 2010-02-02 17:03:11.232 GMT : Apache Derby Network Server - 10.5.3.0 -
> (802917)
>> shutdown
>>   [delete] Deleting directory C:\Data\granedd\My
>>
> Documents\Programming\roller\planet-business\target\test-classes\derby-system
>> [INFO]
> ------------------------------------------------------------------------
>> [ERROR] BUILD ERROR
>> [INFO]
> ------------------------------------------------------------------------
>> [INFO] An Ant BuildException has occured: Unable to delete file
>> C:\Data\granedd\My
>>
> Documents\Programming\roller\planet-business\target\test-classes\derby-system\planet_business\derby.log
>>
>> Interestingly I get exactly the same build error if I skip the tests
> altogether
>> by setting -Dmaven.test.skip=true
>>
>> Has anyone experienced the above issues? I'd be most grateful for any
> input as
>> I would like to determine whether this is my own personal problem or
> whether
>> it's an issue with the currently committed code?
>>
>> In case it's of any relevance i'm using the following bits and pieces:
>> Maven: v2.2.1 (r801777)
>> JDK: java version "1.5.0_10"
>> Ant: v1.7.1 (not sure if there are any ant calls in the roller maven
> poms).
>>
>> Many thanks,
>>
>> Edd
>>
>>
>>

Reply via email to