You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Nafter <Hd...@allshare.nl> on 2010/06/03 22:18:47 UTC

What is a good alternative for maven-itblast-plugin ?

At the moment I'm using cargo codehause together with the
maven-itblast-plugin to run the Junit tests.
This was all perfectly running using maven 2.0.9, but since moving to maven
2.1.0 the maven-itblast-plugin has stopped working.

Not the plugin itself doesn´t work any more, it´s more that with the jboss
application server (in which the junit tests are being done) can´t find the
spring beans any more.

Has anybody a solution for this?

Thx.
Nafter
-- 
View this message in context: http://old.nabble.com/What-is-a-good-alternative-for-maven-itblast-plugin---tp28772452p28772452.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: What is a good alternative for maven-itblast-plugin ?

Posted by Nafter <Hd...@allshare.nl>.
The problem is solved !

The reason this didn't work was caused by the following code:
/**
     * Initialises the registry
     */
    private static synchronized void init(String fileName)
    {
        appLog.debug(null, "init", "Initialising registry [" + fileName +
"]");
        context = new ClassPathXmlApplicationContext(fileName);
        initialised = true;
        
       if (fileName.equals(CONFIG_XML_UNITTEST))
        {
            String[] config = {"spring-unittest-beans.xml",
"spring-unittest-databases.xml"};
            context = new ClassPathXmlApplicationContext(config);
        }
    }

For CONFIG_XML_UNITTEST you can't use spring-unittest-*, but you have to
fully qualify the names of the xml files which have to be used.
This has changed from Maven 2.0.9 to 2.1.0 and higher !!
Solved!



Wayne Fay wrote:
> 
>> Something went wrong
>> org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
>> named 'environmentManager' is defined
>>        at
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:504)
> 
> Seems like a reasonable question for a Spring forum, or perhaps ask
> the people behind itblast? Is "environmentManager" a common Spring
> bean and you're just missing some configuration?
> 
> Wayne
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/What-is-a-good-alternative-for-maven-itblast-plugin---tp28772452p28802352.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: What is a good alternative for maven-itblast-plugin ?

Posted by Wayne Fay <wa...@gmail.com>.
> Something went wrong
> org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
> named 'environmentManager' is defined
>        at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:504)

Seems like a reasonable question for a Spring forum, or perhaps ask
the people behind itblast? Is "environmentManager" a common Spring
bean and you're just missing some configuration?

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: What is a good alternative for maven-itblast-plugin ?

Posted by Stephen Connolly <st...@gmail.com>.
have you tried changing the forkMode?

Additionally the version of surefire that is locked down is AFAIK different
between 2.0.9 and 2.2.1.

I think, but I am not sure, that 2.0.9 uses 2.4.2 unless you have locked
down the plugin version
whereas 2.1.0 and 2.2.1 use 2.4.3 unless you have locked down the plugin
version.

One of the changes between 2.4.2 and 2.4.3 is
http://jira.codehaus.org/browse/SUREFIRE-491 (see
http://jira.codehaus.org/browse/SUREFIRE/fixforversion/14255)

I am going to make a wild stab in the dark and guess that it is SUREFIRE-491
that is causing your test failures, i.e. your tests were relying on a bug in
surefire

The solution is to define for the surefire plugin exactly what system
properties you want to pass through to the forked JVM (or else use forkMode
= none (not recommended)

-Stephen

On 4 June 2010 08:00, Nafter <Hd...@allshare.nl> wrote:

>
> Hi Wayne.
>
> Thx for your quick reply. I tried Maven 2.2.1 as well, but resulted in the
> same error.
> Normally when using 2.0.9 it is possible to run all the Junit tests, but
> when switching to 2.1.0 or 2.2.1 I always get the same exception:
> NoSuchBeanDefinitionException.
>
> And I do have to switch to 2.2.1 because I need to transform the junit
> (XML)
> test results into a HTML page which has to be delivered as part of the
> build. This is done by JUnitReport which relies on maven 2.1.0 or
> higher...... So I'm in a deadlock right now.
>
> Hopefully somebody knows a trick to solve this
> NoSuchBeanDefinitionException......
>
>
> [INFO] [talledLocalContainer] 08:53:54,758 INFO  [AjpProtocol] Starting
> Coyote AJP/1.3 on ajp-127.0.0.1-48009
> [INFO] [talledLocalContainer] 08:53:54,773 INFO  [Server] JBoss (MX
> MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)]
> Started in 31s:625ms
> [INFO] [talledLocalContainer] JBoss 4.2.3 started on port [48080]
> [INFO] [surefire:test {execution: virtual-execution}]
> [INFO] Surefire report directory:
> c:\_composer\_build\war\jboss42x\surefire-reports
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running nl.allshare.unittests.util.TestSuiteSingleClass
> log4j:WARN No appenders could be found for logger
> (nl.allshare.pvcomposer.EHCacheManager).
> log4j:WARN Please initialize the log4j system properly.
> Something went wrong
> org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
> named 'environmentManager' is defined
>        at
>
> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:504)
>        at
>
> org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1041)
>        at
>
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:273)
>        at
>
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
>
>
> Wayne Fay wrote:
> >
> >> This was all perfectly running using maven 2.0.9, but since moving to
> >> maven
> >> 2.1.0 the maven-itblast-plugin has stopped working.
> >
> > Have you tried with Maven 2.2.1? There were serveral things wrong with
> > 2.1.0, as I recall.
> >
> > Wayne
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/What-is-a-good-alternative-for-maven-itblast-plugin---tp28772452p28776383.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: What is a good alternative for maven-itblast-plugin ?

Posted by Nafter <Hd...@allshare.nl>.
Hi Wayne.

Thx for your quick reply. I tried Maven 2.2.1 as well, but resulted in the
same error.
Normally when using 2.0.9 it is possible to run all the Junit tests, but
when switching to 2.1.0 or 2.2.1 I always get the same exception:
NoSuchBeanDefinitionException.

And I do have to switch to 2.2.1 because I need to transform the junit (XML)
test results into a HTML page which has to be delivered as part of the
build. This is done by JUnitReport which relies on maven 2.1.0 or
higher...... So I'm in a deadlock right now.

Hopefully somebody knows a trick to solve this
NoSuchBeanDefinitionException......


[INFO] [talledLocalContainer] 08:53:54,758 INFO  [AjpProtocol] Starting
Coyote AJP/1.3 on ajp-127.0.0.1-48009
[INFO] [talledLocalContainer] 08:53:54,773 INFO  [Server] JBoss (MX
MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)]
Started in 31s:625ms
[INFO] [talledLocalContainer] JBoss 4.2.3 started on port [48080]
[INFO] [surefire:test {execution: virtual-execution}]
[INFO] Surefire report directory:
c:\_composer\_build\war\jboss42x\surefire-reports
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running nl.allshare.unittests.util.TestSuiteSingleClass
log4j:WARN No appenders could be found for logger
(nl.allshare.pvcomposer.EHCacheManager).
log4j:WARN Please initialize the log4j system properly.
Something went wrong
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
named 'environmentManager' is defined
	at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:504)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1041)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:273)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)


Wayne Fay wrote:
> 
>> This was all perfectly running using maven 2.0.9, but since moving to
>> maven
>> 2.1.0 the maven-itblast-plugin has stopped working.
> 
> Have you tried with Maven 2.2.1? There were serveral things wrong with
> 2.1.0, as I recall.
> 
> Wayne
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/What-is-a-good-alternative-for-maven-itblast-plugin---tp28772452p28776383.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: What is a good alternative for maven-itblast-plugin ?

Posted by Wayne Fay <wa...@gmail.com>.
> This was all perfectly running using maven 2.0.9, but since moving to maven
> 2.1.0 the maven-itblast-plugin has stopped working.

Have you tried with Maven 2.2.1? There were serveral things wrong with
2.1.0, as I recall.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org