You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Avi L <av...@gmail.com> on 2008/03/23 18:28:40 UTC

package does not exit error with 3rd party jar dependency

hi,
im trying to build my project which depended on a 3rd party jar.

i made "mvn install:install-file" [1] and then added the dependency to my
project's pom.xml [2].
but still when i do "mvn compile" i get the message "package X does not
exist.

why is that?

Avi.

[1] mvn install:install-file -Dfile=c:\SOMEPATH\JSpaces.jar
-DgroupId=gigaspaces -DartifactId=JSpaces -Dversion=6.5 -Dpackaging=jar
-DgeneratePom=true

[2] <dependency>
      <groupId>gigaspaces</groupId>
      <artifactId>JSpaces</artifactId>
      <version>6.5</version>
    </dependency>


-- 
View this message in context: http://www.nabble.com/package-does-not-exit-error-with-3rd-party-jar-dependency-tp16238648s177p16238648.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: package does not exit error with 3rd party jar dependency

Posted by Avi Laviad <av...@gmail.com>.
yep, same .jar file, no error on eclipse, yes error on maven...

On Mon, Mar 24, 2008 at 11:32 AM, simon <si...@chello.at> wrote:

> When you are compiling with Eclipse, is eclipse configured to use
> *exactly* the same jarfile that maven is putting on the classpath, ie
> something under ~/.m2/repository/gigaspaces? If not try that, and see
> what happens.
>
> If eclipse is using exactly the same file, then I have no idea what the
> problem might be. Nobody else using maven has this problem, so it's
> something specific to you. But I don't know what it might be.
>
> Regards, Simon
>
>
> On Mon, 2008-03-24 at 11:03 +0200, Avi Laviad wrote:
> > ok, thanks for the mailing tip - didn't thought about it. im using gmail
> and
> > it made it automatically.
> > i will keep replying at top for now like you for not having more mess.
> >
> > the error is broken bcuz the command line print it like that. nothing to
> do
> > with the code.
> >
> > the project is compiled fine at Eclipse.
> > i just "mvn install:install-file" the jar i reference to from Eclipse.
> so
> > the files im sure the file i need is there.
> >
> > is there a chance that maven try to compile without this jar?
> >
> > On Mon, Mar 24, 2008 at 10:56 AM, simon <si...@chello.at>
> wrote:
> >
> > > Hi Avi,
> > >
> > > First, when someone replies by adding their comments at the bottom of
> > > the reply email, please do not then add your comments at the top. It's
> > > rude and makes the email hard to read. I'm posting at the top here
> only
> > > to avoid making things worse.
> > >
> > > The error message looks suspicious:
> > >  package com.gigaspace
> > >  s does not exist
> > > Is the package-name really being broken across two lines like this? If
> > > so, maybe your import statement has a non-ascii character embedded
> into
> > > it that is confusing the compiler.
> > >
> > > I suggest also running "jar tf" on the file in the repository, ie
> under
> > > "~/.m2/repository/gigaspaces/.." and checking that the files you
> expect
> > > are really in that jar.
> > >
> > > Regards,
> > >
> > > Simon
> > >
> > > On Mon, 2008-03-24 at 10:48 +0200, Avi Laviad wrote:
> > > > well, unfortunely you guessed wrong... im using <dependencies>.
> > > > and the classpath element included my wanted ,jar file.
> > > >
> > > > my pom.xml is:
> > > > <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> > > > http://www.w3.org/2001/XMLSchema-instance"
> > > >   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> > > > http://maven.apache.org/maven-v4_0_0.xsd">
> > > >   <modelVersion>4.0.0</modelVersion>
> > > >   <groupId>com.MyProjectName</groupId>
> > > >   <artifactId>MyProjectName</artifactId>
> > > >   <packaging>jar</packaging>
> > > >   <version>1.0-SNAPSHOT</version>
> > > >   <name>MyProjectName</name>
> > > >   <url>http://maven.apache.org</url>
> > > >   <dependencies>
> > > >     <dependency>
> > > >       <groupId>gigaspaces</groupId>
> > > >       <artifactId>JSpaces</artifactId>
> > > >       <version>6.5</version>
> > > >     </dependency>
> > > >     <dependency>
> > > >       <groupId>junit</groupId>
> > > >       <artifactId>junit</artifactId>
> > > >       <version>3.8.1</version>
> > > >       <scope>test</scope>
> > > >     </dependency>
> > > >   </dependencies>
> > > > </project>
> > > > and the error is:
> > > > [ERROR] BUILD FAILURE
> > > > [INFO]
> > > >
> ------------------------------------------------------------------------
> > > > [INFO] Compilation failure
> > > >
> C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
> > > > package com.gigaspace
> > > > s does not exist
> > > >
> > > >
> C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
> > > > package com.gigaspace
> > > > s does not exist
> > > >
> > > > [INFO]
> > > >
> ------------------------------------------------------------------------
> > > > [DEBUG] Trace
> > > > org.apache.maven.BuildFailureException: Compilation failure
> > > >
> C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
> > > > package com.gigaspace
> > > > s does not exist
> > > > Is these details are any help?
> > > > Avi.
> > > >
> > > >
> > > >
> > > > On Sun, Mar 23, 2008 at 9:06 PM, Wendy Smoak <ws...@gmail.com>
> wrote:
> > > >
> > > > > On Sun, Mar 23, 2008 at 11:51 AM, Avi Laviad <avi.laviad@gmail.com
> >
> > > wrote:
> > > > > >  the project is compiled and build successfully when i try it on
> > > > > Eclipse.
> > > > > >  the error is "package com.gigaspaces.* does not exist".
> > > > > >  I think its compile error because it doesn't find the .jar file
> it
> > > > > should
> > > > > >  reference to - and this is my problem - i added a dependency in
> the
> > > > > >  pom.xmlfor the .jar that i need but it seems that maven ignores
> it
> > > and
> > > > > >  try to compile without it.
> > > > >
> > > > > We need to see more of the pom and the error in order to help.
>  I'll
> > > > > take one more guess... any chance that dependency you posted is
> inside
> > > > > <dependencyManagement> instead of just <dependencies> ?
> > > > >
> > > > > Add -X to the command line and Maven will print out a lot of
> > > > > information, including the classpath.  Then you can see if the jar
> is
> > > > > on the classpath at all.
> > > > >
> > > > > --
> > > > >  Wendy
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > 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
> > >
> > >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: package does not exit error with 3rd party jar dependency

Posted by simon <si...@chello.at>.
When you are compiling with Eclipse, is eclipse configured to use
*exactly* the same jarfile that maven is putting on the classpath, ie
something under ~/.m2/repository/gigaspaces? If not try that, and see
what happens.

If eclipse is using exactly the same file, then I have no idea what the
problem might be. Nobody else using maven has this problem, so it's
something specific to you. But I don't know what it might be.

Regards, Simon


On Mon, 2008-03-24 at 11:03 +0200, Avi Laviad wrote:
> ok, thanks for the mailing tip - didn't thought about it. im using gmail and
> it made it automatically.
> i will keep replying at top for now like you for not having more mess.
> 
> the error is broken bcuz the command line print it like that. nothing to do
> with the code.
> 
> the project is compiled fine at Eclipse.
> i just "mvn install:install-file" the jar i reference to from Eclipse. so
> the files im sure the file i need is there.
> 
> is there a chance that maven try to compile without this jar?
> 
> On Mon, Mar 24, 2008 at 10:56 AM, simon <si...@chello.at> wrote:
> 
> > Hi Avi,
> >
> > First, when someone replies by adding their comments at the bottom of
> > the reply email, please do not then add your comments at the top. It's
> > rude and makes the email hard to read. I'm posting at the top here only
> > to avoid making things worse.
> >
> > The error message looks suspicious:
> >  package com.gigaspace
> >  s does not exist
> > Is the package-name really being broken across two lines like this? If
> > so, maybe your import statement has a non-ascii character embedded into
> > it that is confusing the compiler.
> >
> > I suggest also running "jar tf" on the file in the repository, ie under
> > "~/.m2/repository/gigaspaces/.." and checking that the files you expect
> > are really in that jar.
> >
> > Regards,
> >
> > Simon
> >
> > On Mon, 2008-03-24 at 10:48 +0200, Avi Laviad wrote:
> > > well, unfortunely you guessed wrong... im using <dependencies>.
> > > and the classpath element included my wanted ,jar file.
> > >
> > > my pom.xml is:
> > > <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> > > http://www.w3.org/2001/XMLSchema-instance"
> > >   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> > > http://maven.apache.org/maven-v4_0_0.xsd">
> > >   <modelVersion>4.0.0</modelVersion>
> > >   <groupId>com.MyProjectName</groupId>
> > >   <artifactId>MyProjectName</artifactId>
> > >   <packaging>jar</packaging>
> > >   <version>1.0-SNAPSHOT</version>
> > >   <name>MyProjectName</name>
> > >   <url>http://maven.apache.org</url>
> > >   <dependencies>
> > >     <dependency>
> > >       <groupId>gigaspaces</groupId>
> > >       <artifactId>JSpaces</artifactId>
> > >       <version>6.5</version>
> > >     </dependency>
> > >     <dependency>
> > >       <groupId>junit</groupId>
> > >       <artifactId>junit</artifactId>
> > >       <version>3.8.1</version>
> > >       <scope>test</scope>
> > >     </dependency>
> > >   </dependencies>
> > > </project>
> > > and the error is:
> > > [ERROR] BUILD FAILURE
> > > [INFO]
> > > ------------------------------------------------------------------------
> > > [INFO] Compilation failure
> > > C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
> > > package com.gigaspace
> > > s does not exist
> > >
> > > C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
> > > package com.gigaspace
> > > s does not exist
> > >
> > > [INFO]
> > > ------------------------------------------------------------------------
> > > [DEBUG] Trace
> > > org.apache.maven.BuildFailureException: Compilation failure
> > > C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
> > > package com.gigaspace
> > > s does not exist
> > > Is these details are any help?
> > > Avi.
> > >
> > >
> > >
> > > On Sun, Mar 23, 2008 at 9:06 PM, Wendy Smoak <ws...@gmail.com> wrote:
> > >
> > > > On Sun, Mar 23, 2008 at 11:51 AM, Avi Laviad <av...@gmail.com>
> > wrote:
> > > > >  the project is compiled and build successfully when i try it on
> > > > Eclipse.
> > > > >  the error is "package com.gigaspaces.* does not exist".
> > > > >  I think its compile error because it doesn't find the .jar file it
> > > > should
> > > > >  reference to - and this is my problem - i added a dependency in the
> > > > >  pom.xmlfor the .jar that i need but it seems that maven ignores it
> > and
> > > > >  try to compile without it.
> > > >
> > > > We need to see more of the pom and the error in order to help.  I'll
> > > > take one more guess... any chance that dependency you posted is inside
> > > > <dependencyManagement> instead of just <dependencies> ?
> > > >
> > > > Add -X to the command line and Maven will print out a lot of
> > > > information, including the classpath.  Then you can see if the jar is
> > > > on the classpath at all.
> > > >
> > > > --
> > > >  Wendy
> > > >
> > > > ---------------------------------------------------------------------
> > > > 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
> >
> >


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


Re: package does not exit error with 3rd party jar dependency

Posted by Wayne Fay <wa...@gmail.com>.
On 3/24/08, simon <si...@chello.at> wrote:
> +1, good idea to add this to the FAQ.

Thanks Simon. Posted as MNG-3481.

Wayne

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


Re: package does not exit error with 3rd party jar dependency

Posted by simon <si...@chello.at>.
On Mon, 2008-03-24 at 09:22 -0500, Wayne Fay wrote:
> We need to put an entry in the FAQ:
> 
> Q: My project compiles in Eclipse and not Maven. Why is Maven broken?
> A: Eclipse has its own compiler (JDT) that does things differently
> than Maven (which uses your JDK's javac). Try compiling your project
> with javac from the JDK and specifying your dependencies with -cp. If
> this works, then Maven should have no issues compiling it either.
> 
> This stuff just makes me love/hate Eclipse even more than I already do...

+1, good idea to add this to the FAQ.




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


Re: package does not exit error with 3rd party jar dependency

Posted by Wayne Fay <wa...@gmail.com>.
We need to put an entry in the FAQ:

Q: My project compiles in Eclipse and not Maven. Why is Maven broken?
A: Eclipse has its own compiler (JDT) that does things differently
than Maven (which uses your JDK's javac). Try compiling your project
with javac from the JDK and specifying your dependencies with -cp. If
this works, then Maven should have no issues compiling it either.

This stuff just makes me love/hate Eclipse even more than I already do...

Wayne

On 3/24/08, Avi Laviad <av...@gmail.com> wrote:
> hi,
> i think i found the problem.
> i tried to compile the .java file with javac and it failed (in eclipse it
> was successful).
> when i make some change at the .java file and javac worked well then maven
> worked well also.
>
> thanks for your help.
> Avi.
>
> On Mon, Mar 24, 2008 at 12:33 PM, Tim Kettler <ti...@udo.edu> wrote:
>
> > Hi,
> >
> > As Simon guessed, too, I guess it's just a char-set/file-encoding issue.
> > Can you go to a plain texteditor available on your platform (notepad,
> > gedit, kate, nano ... whatever is available) and create a simple test
> > class in src/main/java:
> >
> > Test.java:
> > import com.gigaspaces.*;
> >
> > public class Test {}
> >
> > and try if this is compiled by maven. If yes, then it's really just an
> > encoding issue. Then just try to delete the import statement from
> > App.java and the readd it.
> >
> > And no, there is no chance that maven tries to compile without your
> > specified jar dependency. You can double check by invoking maven with
> > debug output enabled 'mvn -X ...' Maven then prints the classpath it's
> > using for compilation.
> >
> > -Tim
> >
> > Avi Laviad schrieb:
> > > ok, thanks for the mailing tip - didn't thought about it. im using
> > gmail and
> > > it made it automatically.
> > > i will keep replying at top for now like you for not having more mess.
> > >
> > > the error is broken bcuz the command line print it like that. nothing to
> > do
> > > with the code.
> > >
> > > the project is compiled fine at Eclipse.
> > > i just "mvn install:install-file" the jar i reference to from Eclipse.
> > so
> > > the files im sure the file i need is there.
> > >
> > > is there a chance that maven try to compile without this jar?
> > >
> > > On Mon, Mar 24, 2008 at 10:56 AM, simon <si...@chello.at>
> > wrote:
> > >
> > >> Hi Avi,
> > >>
> > >> First, when someone replies by adding their comments at the bottom of
> > >> the reply email, please do not then add your comments at the top. It's
> > >> rude and makes the email hard to read. I'm posting at the top here only
> > >> to avoid making things worse.
> > >>
> > >> The error message looks suspicious:
> > >> package com.gigaspace
> > >> s does not exist
> > >> Is the package-name really being broken across two lines like this? If
> > >> so, maybe your import statement has a non-ascii character embedded into
> > >> it that is confusing the compiler.
> > >>
> > >> I suggest also running "jar tf" on the file in the repository, ie under
> > >> "~/.m2/repository/gigaspaces/.." and checking that the files you expect
> > >> are really in that jar.
> > >>
> > >> Regards,
> > >>
> > >> Simon
> > >>
> > >> On Mon, 2008-03-24 at 10:48 +0200, Avi Laviad wrote:
> > >>> well, unfortunely you guessed wrong... im using <dependencies>.
> > >>> and the classpath element included my wanted ,jar file.
> > >>>
> > >>> my pom.xml is:
> > >>> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> > >>> http://www.w3.org/2001/XMLSchema-instance"
> > >>> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> > >>> http://maven.apache.org/maven-v4_0_0.xsd">
> > >>> <modelVersion>4.0.0</modelVersion>
> > >>> <groupId>com.MyProjectName</groupId>
> > >>> <artifactId>MyProjectName</artifactId>
> > >>> <packaging>jar</packaging>
> > >>> <version>1.0-SNAPSHOT</version>
> > >>> <name>MyProjectName</name>
> > >>> <url>http://maven.apache.org</url>
> > >>> <dependencies>
> > >>> <dependency>
> > >>> <groupId>gigaspaces</groupId>
> > >>> <artifactId>JSpaces</artifactId>
> > >>> <version>6.5</version>
> > >>> </dependency>
> > >>> <dependency>
> > >>> <groupId>junit</groupId>
> > >>> <artifactId>junit</artifactId>
> > >>> <version>3.8.1</version>
> > >>> <scope>test</scope>
> > >>> </dependency>
> > >>> </dependencies>
> > >>> </project>
> > >>> and the error is:
> > >>> [ERROR] BUILD FAILURE
> > >>> [INFO]
> > >>>
> > ------------------------------------------------------------------------
> > >>> [INFO] Compilation failure
> > >>>
> > C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
> > >>> package com.gigaspace
> > >>> s does not exist
> > >>>
> > >>>
> > C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
> > >>> package com.gigaspace
> > >>> s does not exist
> > >>>
> > >>> [INFO]
> > >>>
> > ------------------------------------------------------------------------
> > >>> [DEBUG] Trace
> > >>> org.apache.maven.BuildFailureException: Compilation failure
> > >>>
> > C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
> > >>> package com.gigaspace
> > >>> s does not exist
> > >>> Is these details are any help?
> > >>> Avi.
> > >>>
> > >>>
> > >>>
> > >>> On Sun, Mar 23, 2008 at 9:06 PM, Wendy Smoak <ws...@gmail.com> wrote:
> > >>>
> > >>>> On Sun, Mar 23, 2008 at 11:51 AM, Avi Laviad <av...@gmail.com>
> > >> wrote:
> > >>>>> the project is compiled and build successfully when i try it on
> > >>>> Eclipse.
> > >>>>> the error is "package com.gigaspaces.* does not exist".
> > >>>>> I think its compile error because it doesn't find the .jar file it
> > >>>> should
> > >>>>> reference to - and this is my problem - i added a dependency in the
> > >>>>> pom.xmlfor the .jar that i need but it seems that maven ignores it
> > >> and
> > >>>>> try to compile without it.
> > >>>> We need to see more of the pom and the error in order to help. I'll
> > >>>> take one more guess... any chance that dependency you posted is
> > inside
> > >>>> <dependencyManagement> instead of just <dependencies> ?
> > >>>>
> > >>>> Add -X to the command line and Maven will print out a lot of
> > >>>> information, including the classpath. Then you can see if the jar is
> > >>>> on the classpath at all.
> > >>>>
> > >>>> --
> > >>>> Wendy
> > >>>>
> > >>>> ---------------------------------------------------------------------
> > >>>> 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
> > >>
> > >>
> > >
> >
> >
> > ---------------------------------------------------------------------
> > 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: package does not exit error with 3rd party jar dependency

Posted by Avi Laviad <av...@gmail.com>.
hi,
i think i found the problem.
i tried to compile the .java file with javac and it failed (in eclipse it
was successful).
when i make some change at the .java file and javac worked well then maven
worked well also.

thanks for your help.
Avi.

On Mon, Mar 24, 2008 at 12:33 PM, Tim Kettler <ti...@udo.edu> wrote:

> Hi,
>
> As Simon guessed, too, I guess it's just a char-set/file-encoding issue.
> Can you go to a plain texteditor available on your platform (notepad,
> gedit, kate, nano ... whatever is available) and create a simple test
> class in src/main/java:
>
> Test.java:
>   import com.gigaspaces.*;
>
>   public class Test {}
>
> and try if this is compiled by maven. If yes, then it's really just an
> encoding issue. Then just try to delete the import statement from
> App.java and the readd it.
>
> And no, there is no chance that maven tries to compile without your
> specified jar dependency. You can double check by invoking maven with
> debug output enabled 'mvn -X ...' Maven then prints the classpath it's
> using for compilation.
>
> -Tim
>
> Avi Laviad schrieb:
>  > ok, thanks for the mailing tip - didn't thought about it. im using
> gmail and
> > it made it automatically.
> > i will keep replying at top for now like you for not having more mess.
> >
> > the error is broken bcuz the command line print it like that. nothing to
> do
> > with the code.
> >
> > the project is compiled fine at Eclipse.
> > i just "mvn install:install-file" the jar i reference to from Eclipse.
> so
> > the files im sure the file i need is there.
> >
> > is there a chance that maven try to compile without this jar?
> >
> > On Mon, Mar 24, 2008 at 10:56 AM, simon <si...@chello.at>
> wrote:
> >
> >> Hi Avi,
> >>
> >> First, when someone replies by adding their comments at the bottom of
> >> the reply email, please do not then add your comments at the top. It's
> >> rude and makes the email hard to read. I'm posting at the top here only
> >> to avoid making things worse.
> >>
> >> The error message looks suspicious:
> >>  package com.gigaspace
> >>  s does not exist
> >> Is the package-name really being broken across two lines like this? If
> >> so, maybe your import statement has a non-ascii character embedded into
> >> it that is confusing the compiler.
> >>
> >> I suggest also running "jar tf" on the file in the repository, ie under
> >> "~/.m2/repository/gigaspaces/.." and checking that the files you expect
> >> are really in that jar.
> >>
> >> Regards,
> >>
> >> Simon
> >>
> >> On Mon, 2008-03-24 at 10:48 +0200, Avi Laviad wrote:
> >>> well, unfortunely you guessed wrong... im using <dependencies>.
> >>> and the classpath element included my wanted ,jar file.
> >>>
> >>> my pom.xml is:
> >>> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> >>> http://www.w3.org/2001/XMLSchema-instance"
> >>>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> >>> http://maven.apache.org/maven-v4_0_0.xsd">
> >>>   <modelVersion>4.0.0</modelVersion>
> >>>   <groupId>com.MyProjectName</groupId>
> >>>   <artifactId>MyProjectName</artifactId>
> >>>   <packaging>jar</packaging>
> >>>   <version>1.0-SNAPSHOT</version>
> >>>   <name>MyProjectName</name>
> >>>   <url>http://maven.apache.org</url>
> >>>   <dependencies>
> >>>     <dependency>
> >>>       <groupId>gigaspaces</groupId>
> >>>       <artifactId>JSpaces</artifactId>
> >>>       <version>6.5</version>
> >>>     </dependency>
> >>>     <dependency>
> >>>       <groupId>junit</groupId>
> >>>       <artifactId>junit</artifactId>
> >>>       <version>3.8.1</version>
> >>>       <scope>test</scope>
> >>>     </dependency>
> >>>   </dependencies>
> >>> </project>
> >>> and the error is:
> >>> [ERROR] BUILD FAILURE
> >>> [INFO]
> >>>
> ------------------------------------------------------------------------
> >>> [INFO] Compilation failure
> >>>
> C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
> >>> package com.gigaspace
> >>> s does not exist
> >>>
> >>>
> C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
> >>> package com.gigaspace
> >>> s does not exist
> >>>
> >>> [INFO]
> >>>
> ------------------------------------------------------------------------
> >>> [DEBUG] Trace
> >>> org.apache.maven.BuildFailureException: Compilation failure
> >>>
> C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
> >>> package com.gigaspace
> >>> s does not exist
> >>> Is these details are any help?
> >>> Avi.
> >>>
> >>>
> >>>
> >>> On Sun, Mar 23, 2008 at 9:06 PM, Wendy Smoak <ws...@gmail.com> wrote:
> >>>
> >>>> On Sun, Mar 23, 2008 at 11:51 AM, Avi Laviad <av...@gmail.com>
> >> wrote:
> >>>>>  the project is compiled and build successfully when i try it on
> >>>> Eclipse.
> >>>>>  the error is "package com.gigaspaces.* does not exist".
> >>>>>  I think its compile error because it doesn't find the .jar file it
> >>>> should
> >>>>>  reference to - and this is my problem - i added a dependency in the
> >>>>>  pom.xmlfor the .jar that i need but it seems that maven ignores it
> >> and
> >>>>>  try to compile without it.
> >>>> We need to see more of the pom and the error in order to help.  I'll
> >>>> take one more guess... any chance that dependency you posted is
> inside
> >>>> <dependencyManagement> instead of just <dependencies> ?
> >>>>
> >>>> Add -X to the command line and Maven will print out a lot of
> >>>> information, including the classpath.  Then you can see if the jar is
> >>>> on the classpath at all.
> >>>>
> >>>> --
> >>>>  Wendy
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> 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
> >>
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: package does not exit error with 3rd party jar dependency

Posted by Tim Kettler <ti...@udo.edu>.
Hi,

As Simon guessed, too, I guess it's just a char-set/file-encoding issue. 
Can you go to a plain texteditor available on your platform (notepad, 
gedit, kate, nano ... whatever is available) and create a simple test 
class in src/main/java:

Test.java:
   import com.gigaspaces.*;

   public class Test {}

and try if this is compiled by maven. If yes, then it's really just an 
encoding issue. Then just try to delete the import statement from 
App.java and the readd it.

And no, there is no chance that maven tries to compile without your 
specified jar dependency. You can double check by invoking maven with 
debug output enabled 'mvn -X ...' Maven then prints the classpath it's 
using for compilation.

-Tim

Avi Laviad schrieb:
> ok, thanks for the mailing tip - didn't thought about it. im using gmail and
> it made it automatically.
> i will keep replying at top for now like you for not having more mess.
> 
> the error is broken bcuz the command line print it like that. nothing to do
> with the code.
> 
> the project is compiled fine at Eclipse.
> i just "mvn install:install-file" the jar i reference to from Eclipse. so
> the files im sure the file i need is there.
> 
> is there a chance that maven try to compile without this jar?
> 
> On Mon, Mar 24, 2008 at 10:56 AM, simon <si...@chello.at> wrote:
> 
>> Hi Avi,
>>
>> First, when someone replies by adding their comments at the bottom of
>> the reply email, please do not then add your comments at the top. It's
>> rude and makes the email hard to read. I'm posting at the top here only
>> to avoid making things worse.
>>
>> The error message looks suspicious:
>>  package com.gigaspace
>>  s does not exist
>> Is the package-name really being broken across two lines like this? If
>> so, maybe your import statement has a non-ascii character embedded into
>> it that is confusing the compiler.
>>
>> I suggest also running "jar tf" on the file in the repository, ie under
>> "~/.m2/repository/gigaspaces/.." and checking that the files you expect
>> are really in that jar.
>>
>> Regards,
>>
>> Simon
>>
>> On Mon, 2008-03-24 at 10:48 +0200, Avi Laviad wrote:
>>> well, unfortunely you guessed wrong... im using <dependencies>.
>>> and the classpath element included my wanted ,jar file.
>>>
>>> my pom.xml is:
>>> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
>>> http://www.w3.org/2001/XMLSchema-instance"
>>>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>>> http://maven.apache.org/maven-v4_0_0.xsd">
>>>   <modelVersion>4.0.0</modelVersion>
>>>   <groupId>com.MyProjectName</groupId>
>>>   <artifactId>MyProjectName</artifactId>
>>>   <packaging>jar</packaging>
>>>   <version>1.0-SNAPSHOT</version>
>>>   <name>MyProjectName</name>
>>>   <url>http://maven.apache.org</url>
>>>   <dependencies>
>>>     <dependency>
>>>       <groupId>gigaspaces</groupId>
>>>       <artifactId>JSpaces</artifactId>
>>>       <version>6.5</version>
>>>     </dependency>
>>>     <dependency>
>>>       <groupId>junit</groupId>
>>>       <artifactId>junit</artifactId>
>>>       <version>3.8.1</version>
>>>       <scope>test</scope>
>>>     </dependency>
>>>   </dependencies>
>>> </project>
>>> and the error is:
>>> [ERROR] BUILD FAILURE
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Compilation failure
>>> C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
>>> package com.gigaspace
>>> s does not exist
>>>
>>> C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
>>> package com.gigaspace
>>> s does not exist
>>>
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [DEBUG] Trace
>>> org.apache.maven.BuildFailureException: Compilation failure
>>> C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
>>> package com.gigaspace
>>> s does not exist
>>> Is these details are any help?
>>> Avi.
>>>
>>>
>>>
>>> On Sun, Mar 23, 2008 at 9:06 PM, Wendy Smoak <ws...@gmail.com> wrote:
>>>
>>>> On Sun, Mar 23, 2008 at 11:51 AM, Avi Laviad <av...@gmail.com>
>> wrote:
>>>>>  the project is compiled and build successfully when i try it on
>>>> Eclipse.
>>>>>  the error is "package com.gigaspaces.* does not exist".
>>>>>  I think its compile error because it doesn't find the .jar file it
>>>> should
>>>>>  reference to - and this is my problem - i added a dependency in the
>>>>>  pom.xmlfor the .jar that i need but it seems that maven ignores it
>> and
>>>>>  try to compile without it.
>>>> We need to see more of the pom and the error in order to help.  I'll
>>>> take one more guess... any chance that dependency you posted is inside
>>>> <dependencyManagement> instead of just <dependencies> ?
>>>>
>>>> Add -X to the command line and Maven will print out a lot of
>>>> information, including the classpath.  Then you can see if the jar is
>>>> on the classpath at all.
>>>>
>>>> --
>>>>  Wendy
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>
>>
> 


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


Re: package does not exit error with 3rd party jar dependency

Posted by Avi Laviad <av...@gmail.com>.
ok, thanks for the mailing tip - didn't thought about it. im using gmail and
it made it automatically.
i will keep replying at top for now like you for not having more mess.

the error is broken bcuz the command line print it like that. nothing to do
with the code.

the project is compiled fine at Eclipse.
i just "mvn install:install-file" the jar i reference to from Eclipse. so
the files im sure the file i need is there.

is there a chance that maven try to compile without this jar?

On Mon, Mar 24, 2008 at 10:56 AM, simon <si...@chello.at> wrote:

> Hi Avi,
>
> First, when someone replies by adding their comments at the bottom of
> the reply email, please do not then add your comments at the top. It's
> rude and makes the email hard to read. I'm posting at the top here only
> to avoid making things worse.
>
> The error message looks suspicious:
>  package com.gigaspace
>  s does not exist
> Is the package-name really being broken across two lines like this? If
> so, maybe your import statement has a non-ascii character embedded into
> it that is confusing the compiler.
>
> I suggest also running "jar tf" on the file in the repository, ie under
> "~/.m2/repository/gigaspaces/.." and checking that the files you expect
> are really in that jar.
>
> Regards,
>
> Simon
>
> On Mon, 2008-03-24 at 10:48 +0200, Avi Laviad wrote:
> > well, unfortunely you guessed wrong... im using <dependencies>.
> > and the classpath element included my wanted ,jar file.
> >
> > my pom.xml is:
> > <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance"
> >   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> > http://maven.apache.org/maven-v4_0_0.xsd">
> >   <modelVersion>4.0.0</modelVersion>
> >   <groupId>com.MyProjectName</groupId>
> >   <artifactId>MyProjectName</artifactId>
> >   <packaging>jar</packaging>
> >   <version>1.0-SNAPSHOT</version>
> >   <name>MyProjectName</name>
> >   <url>http://maven.apache.org</url>
> >   <dependencies>
> >     <dependency>
> >       <groupId>gigaspaces</groupId>
> >       <artifactId>JSpaces</artifactId>
> >       <version>6.5</version>
> >     </dependency>
> >     <dependency>
> >       <groupId>junit</groupId>
> >       <artifactId>junit</artifactId>
> >       <version>3.8.1</version>
> >       <scope>test</scope>
> >     </dependency>
> >   </dependencies>
> > </project>
> > and the error is:
> > [ERROR] BUILD FAILURE
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Compilation failure
> > C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
> > package com.gigaspace
> > s does not exist
> >
> > C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
> > package com.gigaspace
> > s does not exist
> >
> > [INFO]
> > ------------------------------------------------------------------------
> > [DEBUG] Trace
> > org.apache.maven.BuildFailureException: Compilation failure
> > C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
> > package com.gigaspace
> > s does not exist
> > Is these details are any help?
> > Avi.
> >
> >
> >
> > On Sun, Mar 23, 2008 at 9:06 PM, Wendy Smoak <ws...@gmail.com> wrote:
> >
> > > On Sun, Mar 23, 2008 at 11:51 AM, Avi Laviad <av...@gmail.com>
> wrote:
> > > >  the project is compiled and build successfully when i try it on
> > > Eclipse.
> > > >  the error is "package com.gigaspaces.* does not exist".
> > > >  I think its compile error because it doesn't find the .jar file it
> > > should
> > > >  reference to - and this is my problem - i added a dependency in the
> > > >  pom.xmlfor the .jar that i need but it seems that maven ignores it
> and
> > > >  try to compile without it.
> > >
> > > We need to see more of the pom and the error in order to help.  I'll
> > > take one more guess... any chance that dependency you posted is inside
> > > <dependencyManagement> instead of just <dependencies> ?
> > >
> > > Add -X to the command line and Maven will print out a lot of
> > > information, including the classpath.  Then you can see if the jar is
> > > on the classpath at all.
> > >
> > > --
> > >  Wendy
> > >
> > > ---------------------------------------------------------------------
> > > 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: package does not exit error with 3rd party jar dependency

Posted by simon <si...@chello.at>.
Hi Avi,

First, when someone replies by adding their comments at the bottom of
the reply email, please do not then add your comments at the top. It's
rude and makes the email hard to read. I'm posting at the top here only
to avoid making things worse.

The error message looks suspicious:
  package com.gigaspace
  s does not exist
Is the package-name really being broken across two lines like this? If
so, maybe your import statement has a non-ascii character embedded into
it that is confusing the compiler.

I suggest also running "jar tf" on the file in the repository, ie under
"~/.m2/repository/gigaspaces/.." and checking that the files you expect
are really in that jar.

Regards,

Simon

On Mon, 2008-03-24 at 10:48 +0200, Avi Laviad wrote:
> well, unfortunely you guessed wrong... im using <dependencies>.
> and the classpath element included my wanted ,jar file.
> 
> my pom.xml is:
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>com.MyProjectName</groupId>
>   <artifactId>MyProjectName</artifactId>
>   <packaging>jar</packaging>
>   <version>1.0-SNAPSHOT</version>
>   <name>MyProjectName</name>
>   <url>http://maven.apache.org</url>
>   <dependencies>
>     <dependency>
>       <groupId>gigaspaces</groupId>
>       <artifactId>JSpaces</artifactId>
>       <version>6.5</version>
>     </dependency>
>     <dependency>
>       <groupId>junit</groupId>
>       <artifactId>junit</artifactId>
>       <version>3.8.1</version>
>       <scope>test</scope>
>     </dependency>
>   </dependencies>
> </project>
> and the error is:
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Compilation failure
> C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
> package com.gigaspace
> s does not exist
> 
> C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
> package com.gigaspace
> s does not exist
> 
> [INFO]
> ------------------------------------------------------------------------
> [DEBUG] Trace
> org.apache.maven.BuildFailureException: Compilation failure
> C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
> package com.gigaspace
> s does not exist
> Is these details are any help?
> Avi.
> 
> 
> 
> On Sun, Mar 23, 2008 at 9:06 PM, Wendy Smoak <ws...@gmail.com> wrote:
> 
> > On Sun, Mar 23, 2008 at 11:51 AM, Avi Laviad <av...@gmail.com> wrote:
> > >  the project is compiled and build successfully when i try it on
> > Eclipse.
> > >  the error is "package com.gigaspaces.* does not exist".
> > >  I think its compile error because it doesn't find the .jar file it
> > should
> > >  reference to - and this is my problem - i added a dependency in the
> > >  pom.xmlfor the .jar that i need but it seems that maven ignores it and
> > >  try to compile without it.
> >
> > We need to see more of the pom and the error in order to help.  I'll
> > take one more guess... any chance that dependency you posted is inside
> > <dependencyManagement> instead of just <dependencies> ?
> >
> > Add -X to the command line and Maven will print out a lot of
> > information, including the classpath.  Then you can see if the jar is
> > on the classpath at all.
> >
> > --
> >  Wendy
> >
> > ---------------------------------------------------------------------
> > 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: package does not exit error with 3rd party jar dependency

Posted by Avi Laviad <av...@gmail.com>.
well, unfortunely you guessed wrong... im using <dependencies>.
and the classpath element included my wanted ,jar file.

my pom.xml is:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.MyProjectName</groupId>
  <artifactId>MyProjectName</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>MyProjectName</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>gigaspaces</groupId>
      <artifactId>JSpaces</artifactId>
      <version>6.5</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>
and the error is:
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Compilation failure
C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
package com.gigaspace
s does not exist

C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
package com.gigaspace
s does not exist

[INFO]
------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.BuildFailureException: Compilation failure
C:\Projects\MyProjectName\src\main\java\com\MyProjectName\App.java:[3,0]
package com.gigaspace
s does not exist
Is these details are any help?
Avi.



On Sun, Mar 23, 2008 at 9:06 PM, Wendy Smoak <ws...@gmail.com> wrote:

> On Sun, Mar 23, 2008 at 11:51 AM, Avi Laviad <av...@gmail.com> wrote:
> >  the project is compiled and build successfully when i try it on
> Eclipse.
> >  the error is "package com.gigaspaces.* does not exist".
> >  I think its compile error because it doesn't find the .jar file it
> should
> >  reference to - and this is my problem - i added a dependency in the
> >  pom.xmlfor the .jar that i need but it seems that maven ignores it and
> >  try to compile without it.
>
> We need to see more of the pom and the error in order to help.  I'll
> take one more guess... any chance that dependency you posted is inside
> <dependencyManagement> instead of just <dependencies> ?
>
> Add -X to the command line and Maven will print out a lot of
> information, including the classpath.  Then you can see if the jar is
> on the classpath at all.
>
> --
>  Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: package does not exit error with 3rd party jar dependency

Posted by Wendy Smoak <ws...@gmail.com>.
On Sun, Mar 23, 2008 at 11:51 AM, Avi Laviad <av...@gmail.com> wrote:
>  the project is compiled and build successfully when i try it on Eclipse.
>  the error is "package com.gigaspaces.* does not exist".
>  I think its compile error because it doesn't find the .jar file it should
>  reference to - and this is my problem - i added a dependency in the
>  pom.xmlfor the .jar that i need but it seems that maven ignores it and
>  try to compile without it.

We need to see more of the pom and the error in order to help.  I'll
take one more guess... any chance that dependency you posted is inside
<dependencyManagement> instead of just <dependencies> ?

Add -X to the command line and Maven will print out a lot of
information, including the classpath.  Then you can see if the jar is
on the classpath at all.

-- 
Wendy

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


Re: package does not exit error with 3rd party jar dependency

Posted by Avi Laviad <av...@gmail.com>.
hi,
the project is compiled and build successfully when i try it on Eclipse.
the error is "package com.gigaspaces.* does not exist".
I think its compile error because it doesn't find the .jar file it should
reference to - and this is my problem - i added a dependency in the
pom.xmlfor the .jar that i need but it seems that maven ignores it and
try to
compile without it.

am i missing something here?

On Sun, Mar 23, 2008 at 7:41 PM, Wendy Smoak <ws...@gmail.com> wrote:

> On Sun, Mar 23, 2008 at 10:28 AM, Avi L <av...@gmail.com> wrote:
>
> >  hi,
> >  im trying to build my project which depended on a 3rd party jar.
> >
> >  i made "mvn install:install-file" [1] and then added the dependency to
> my
> >  project's pom.xml [2].
> >  but still when i do "mvn compile" i get the message "package X does not
> >  exist.
>
> That sounds like a message from the compiler, not from Maven.  Can you
> paste the exact error?
>
> It's hard to tell from here, it might just be a typo in the code, or
> maybe the jar you installed really doesn't contain that package.
>
> --
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: package does not exit error with 3rd party jar dependency

Posted by Wendy Smoak <ws...@gmail.com>.
On Sun, Mar 23, 2008 at 10:28 AM, Avi L <av...@gmail.com> wrote:

>  hi,
>  im trying to build my project which depended on a 3rd party jar.
>
>  i made "mvn install:install-file" [1] and then added the dependency to my
>  project's pom.xml [2].
>  but still when i do "mvn compile" i get the message "package X does not
>  exist.

That sounds like a message from the compiler, not from Maven.  Can you
paste the exact error?

It's hard to tell from here, it might just be a typo in the code, or
maybe the jar you installed really doesn't contain that package.

-- 
Wendy

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