You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by balu001 <ja...@gmail.com> on 2009/07/14 14:13:23 UTC

Exception while testing with maven

   Hello,

      I am using maven to build a multimodule webapplication project.

      For that i am moduling the totla project as four part.

     First the core classes,compiling them and building it as a jar file.

    LIKE
   
   In the pom file by saying like this
 
     <modelVersion>4.0.0</modelVersion>
  <groupId>org.scivas.books</groupId>
  <artifactId>PROJCORE</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name> core</name>
  <url>http://maven.apache.org</url>


   After compiling it builds the jar successfully in the repostory.

After that i am using the same jar by including the dependency  for the test
module to run test.


   <dependency>
      <groupId>org.scivas.books</groupId>
      <artifactId>PROJCORE</artifactId>
      <version>1.0-SNAPSHOT</version>
    </dependency>

 Even though i am adding this dependency,the class files are not available
when testing is done.

 while the spring application context file is trying to build one bean for a
specific class,it resluts an exception like 


  "
Initialization of bean failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name
'org.springframework.transaction.config.internalTransactionAdvisor': Cannot
create inner bean '(inner bean)' of type
[org.springframework.transaction.interceptor.TransactionInterceptor] while
setting bean property 'transactionInterceptor'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name '(inner bean)': Cannot resolve reference to bean
'transactionManager' while setting bean property 'transactionManager';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'transactionManager' defined in file
[configPath\applicationContext.xml]: Cannot resolve reference to bean
'entityManagerFactory' while setting bean property 'entityManagerFactory';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'entityManagerFactory' defined in file
[configPath\applicationContext.xml]: Invocation of init method failed;
nested exception is java.lang.IllegalStateException: "


Is the issue arising due to the failure in adding the dependency for the jar
file?

Thanks in advance


  
 
-- 
View this message in context: http://www.nabble.com/Exception-while-testing-with-maven-tp24478265p24478265.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: Run ANT script first

Posted by Mick Knutson <mi...@gmail.com>.
create an antrun plugin and attach it to the phase you want it to run.

---
Thank You…

Mick Knutson, President

BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring & Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233

Website: http://baselogic.com
Linked IN: http://linkedin.com/in/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---



On Tue, Jul 14, 2009 at 9:10 AM, REMIJAN, MICHAEL J [AG/1000] <
michael.j.remijan@monsanto.com> wrote:

> I have an ANT script which I want to make sure runs first before any
> maven goal is run.  How would I go about configuring this?
>
>
> ---------------------------------------------------------------------------------------------------------
> This e-mail message may contain privileged and/or confidential information,
> and is intended to be received only by persons entitled to receive such
> information. If you have received this e-mail in error, please notify the
> sender immediately. Please delete it and all attachments from any servers,
> hard drives or any other media. Other use of this e-mail by you is strictly
> prohibited.
>
>
> All e-mails and attachments sent and received are subject to monitoring,
> reading and archival by Monsanto, including its subsidiaries. The recipient
> of this e-mail is solely responsible for checking for the presence of
> "Viruses" or other "Malware". Monsanto, along with its subsidiaries, accepts
> no liability for any damage caused by any such code transmitted by or
> accompanying this e-mail or any attachment.
>
> ---------------------------------------------------------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Run ANT script first

Posted by Tim O'Brien <to...@discursive.com>.
When you run Maven, you usually specify a lifecycle phase such as
install or package or deploy.     Maven will then execute every
lifecycle phase sequentially until it reaches the specified phase.
If you want a full list of lifecycle phases take a look at the Maven
docs here:  http://tr.im/shS4   - I would suggest attaching your build
script to either verify or initialize.

If you have a build.xml file and you want it to run before anything
interesting happens, hook it up to the verify phase...

<project>
  [...]
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>verify</phase>
            <configuration>
              <tasks>
                  <ant antfile="build.xml" target="whatever"/>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  [...]
</project>


On Tue, Jul 14, 2009 at 8:10 AM, REMIJAN, MICHAEL J
[AG/1000]<mi...@monsanto.com> wrote:
> I have an ANT script which I want to make sure runs first before any
> maven goal is run.  How would I go about configuring this?
>
> ---------------------------------------------------------------------------------------------------------
> This e-mail message may contain privileged and/or confidential information, and is intended to be received only by persons entitled to receive such information. If you have received this e-mail in error, please notify the sender immediately. Please delete it and all attachments from any servers, hard drives or any other media. Other use of this e-mail by you is strictly prohibited.
>
>
> All e-mails and attachments sent and received are subject to monitoring, reading and archival by Monsanto, including its subsidiaries. The recipient of this e-mail is solely responsible for checking for the presence of "Viruses" or other "Malware". Monsanto, along with its subsidiaries, accepts no liability for any damage caused by any such code transmitted by or accompanying this e-mail or any attachment.
> ---------------------------------------------------------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Run ANT script first

Posted by "REMIJAN, MICHAEL J [AG/1000]" <mi...@monsanto.com>.
I have an ANT script which I want to make sure runs first before any
maven goal is run.  How would I go about configuring this?

---------------------------------------------------------------------------------------------------------
This e-mail message may contain privileged and/or confidential information, and is intended to be received only by persons entitled to receive such information. If you have received this e-mail in error, please notify the sender immediately. Please delete it and all attachments from any servers, hard drives or any other media. Other use of this e-mail by you is strictly prohibited.


All e-mails and attachments sent and received are subject to monitoring, reading and archival by Monsanto, including its subsidiaries. The recipient of this e-mail is solely responsible for checking for the presence of "Viruses" or other "Malware". Monsanto, along with its subsidiaries, accepts no liability for any damage caused by any such code transmitted by or accompanying this e-mail or any attachment.
---------------------------------------------------------------------------------------------------------


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