You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Iktorn <ik...@interia.pl> on 2005/05/10 09:29:52 UTC

maven vs intellij

Hi , 
I have got a problem,
I try to compile my project in maven and I get following errors:

....
C:\Projekte\am_applic\implementation\appserver\connectors\src\test\java\de\mypac
kage\mail\om\connectors\cms\CMSAccountDataTest.java:260: cannot resolve symbo
l
symbol  : method fail (java.lang.String)
location: class de.mypackage.mail.om.connectors.cms.CMSAccountDataTest
                fail("getCustomerSaldo: " + testObjekt.getCustomerSaldo().getVal
ue());
                ^
C:\Projekte\am_applic\implementation\appserver\connectors\src\test\java\de\mypac
kage\mail\om\connectors\cms\CMSAccountDataTest.java:262: cannot resolve symbo
l
symbol  : method fail (java.lang.String)
location: class de.mypackage.mail.om.connectors.cms.CMSAccountDataTest
                fail("getActualLimit: " + testObjekt.getActualLimit().getValue()
);
...

And in intellij everything is ok, fail method corresponds to 
junit.framework.Assert
Anybody has any idea what should I do ? 

Thanks in advance 
Artur 


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


Re: maven vs intellij

Posted by Brett Porter <br...@gmail.com>.
The test goal will try to use "junit:junit" not "am_fremd_lib:junit",
so that might be the problem. If you run Maven with -X it should so
the classpath it uses to compile with.

In addition, check the <include /> tag is incorrect, this indicates a
package of java.de.mypackage.mail.om.connectors.base.configuration

(Note: the dependency technique you are using is not recommended by
Maven's best practices, and <jar/> will not be supported in future
versions of Maven).

- Brett

On 5/10/05, Iktorn <ik...@interia.pl> wrote:
> Brett Porter <brett.porter <at> gmail.com> writes:
> 
> >
> > add a dependency on junit in your project.xml file.
> >
> > Cheers,
> > Brett
> >
> 
> Hi,
> I've done that (below is the content of my project.xml file)
> The problem occurs when I try to make 'maven test' goal.
> The library in intellij is set to the same junit.jar file.
> 
> Artur
> 
> <project>
>     <extend>${basedir}/../project.xml</extend>
>   <groupId>connectors</groupId>
>   <artifactId>connectors</artifactId>
>   <currentVersion>current-SNAPSHOT</currentVersion>
> 
>   <dependencies>
>        <dependency>
>       <groupId>domainom</groupId>
>       <artifactId>domainom</artifactId>
>       <jar>domainom-current-SNAPSHOT.jar</jar>
>      </dependency>
> 
>      <dependency>
>       <groupId>am_fremd_lib</groupId>
>       <artifactId>backbone</artifactId>
>       <jar>backbone.jar</jar>
>      </dependency>
> 
>      <dependency>
>       <groupId>am_fremd_lib</groupId>
>       <artifactId>axis</artifactId>
>       <jar>axis.jar</jar>
>      </dependency>
> 
>      <dependency>
>       <groupId>am_fremd_lib</groupId>
>       <artifactId>jaxrpc</artifactId>
>       <jar>jaxrpc.jar</jar>
>      </dependency>
> 
>      <dependency>
>       <groupId>am_fremd_lib</groupId>
>       <artifactId>junit</artifactId>
>       <jar>junit.jar</jar>
>      </dependency>
> 
>   </dependencies>
>   <build>
>     <sourceDirectory>src/main/java</sourceDirectory>
>     <unitTestSourceDirectory>src/test/java</unitTestSourceDirectory>
>     <resources>
>       <resource>
>         <directory>src/main/resources</directory>
>       </resource>
>     </resources>
> 
>    <unitTest>
>       <includes>
> 
> <include>java/de/mypackage/mail/om/connectors/base/configuration/TestConnectorCo
> nfiguration.java</include>
>       </includes>
>     </unitTest>
>   </build>
> </project>
> 
> 
> ---------------------------------------------------------------------
> 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


Re: maven vs intellij

Posted by Iktorn <ik...@interia.pl>.
Brett Porter <brett.porter <at> gmail.com> writes:

> 
> add a dependency on junit in your project.xml file.
> 
> Cheers,
> Brett
> 

Hi, 
I've done that (below is the content of my project.xml file)
The problem occurs when I try to make 'maven test' goal. 
The library in intellij is set to the same junit.jar file.

Artur 


<project>
    <extend>${basedir}/../project.xml</extend>
  <groupId>connectors</groupId>
  <artifactId>connectors</artifactId>
  <currentVersion>current-SNAPSHOT</currentVersion>

  <dependencies> 
       <dependency>
      <groupId>domainom</groupId>
      <artifactId>domainom</artifactId>
      <jar>domainom-current-SNAPSHOT.jar</jar>
     </dependency>
     
     <dependency>
      <groupId>am_fremd_lib</groupId>
      <artifactId>backbone</artifactId>
      <jar>backbone.jar</jar>
     </dependency> 
     
     <dependency>
      <groupId>am_fremd_lib</groupId>
      <artifactId>axis</artifactId>
      <jar>axis.jar</jar>
     </dependency>
     
     <dependency>
      <groupId>am_fremd_lib</groupId>
      <artifactId>jaxrpc</artifactId>
      <jar>jaxrpc.jar</jar>
     </dependency> 
     
     <dependency>
      <groupId>am_fremd_lib</groupId>
      <artifactId>junit</artifactId>
      <jar>junit.jar</jar>
     </dependency>  
     
  </dependencies>
  <build>
    <sourceDirectory>src/main/java</sourceDirectory>
    <unitTestSourceDirectory>src/test/java</unitTestSourceDirectory>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
    </resources>

   <unitTest>
      <includes>
        
<include>java/de/mypackage/mail/om/connectors/base/configuration/TestConnectorCo
nfiguration.java</include>
      </includes>
    </unitTest>
  </build>
</project> 




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


Re: maven vs intellij

Posted by Brett Porter <br...@gmail.com>.
add a dependency on junit in your project.xml file.

Cheers,
Brett

On 5/10/05, Iktorn <ik...@interia.pl> wrote:
> 
> Hi ,
> I have got a problem,
> I try to compile my project in maven and I get following errors:
> 
> ....
> C:\Projekte\am_applic\implementation\appserver\connectors\src\test\java\de\mypac
> kage\mail\om\connectors\cms\CMSAccountDataTest.java:260: cannot resolve symbo
> l
> symbol  : method fail (java.lang.String)
> location: class de.mypackage.mail.om.connectors.cms.CMSAccountDataTest
>                 fail("getCustomerSaldo: " + testObjekt.getCustomerSaldo().getVal
> ue());
>                 ^
> C:\Projekte\am_applic\implementation\appserver\connectors\src\test\java\de\mypac
> kage\mail\om\connectors\cms\CMSAccountDataTest.java:262: cannot resolve symbo
> l
> symbol  : method fail (java.lang.String)
> location: class de.mypackage.mail.om.connectors.cms.CMSAccountDataTest
>                 fail("getActualLimit: " + testObjekt.getActualLimit().getValue()
> );
> ...
> 
> And in intellij everything is ok, fail method corresponds to
> junit.framework.Assert
> Anybody has any idea what should I do ?
> 
> Thanks in advance
> Artur
> 
> ---------------------------------------------------------------------
> 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