Re: Maven2 compilation problem

2008-04-17 Thread Wayne Fay
I've run into this myself which is how I knew it might need to be
checked (not this exact artifact, but something similar). Its
annoying, but doesn't happen often.

Wayne

On 4/17/08, Granse, Erik A <[EMAIL PROTECTED]> wrote:
> Fixed -
>
> It turns out that j2ee.jar is (was) also a dependency and the version
> being used contained an older version of mail.InternetAddress.
>
> Thanks for your help.
>
> -Original Message-
> From: Wayne Fay [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 17, 2008 3:42 PM
> To: Maven Users List
> Subject: Re: Maven2 compilation problem
>
> Unjar the file, dig into the files, and make sure that method exists.
> You might even decompile it to be sure.
>
> Wayne
>
> On 4/17/08, Granse, Erik A <[EMAIL PROTECTED]> wrote:
> > I'm in the process of migrating from Maven1 to Maven2 (using v. 2.0.8)
> > and have run into a problem I'm unable to solve. When compiling one of
> > my projects, I receive the following error:
> >
> > cannot resolve symbol
> > symbol  : method validate ()
> > location: class javax.mail.internet.InternetAddress
> >
> > I've had no build problems in either Eclipse or with Maven1, and I
> > manually installed the the dependency jar (mail-1.3.1.jar) from my
> > Maven1 repo to my Maven2 repo, so I'm puzzled as to the cause of the
> > error.
> >
> > Compiling with debug turned on, I show that mvn is using the correct
> > JDK, and I only see the mail-1.3.1 dependency listed in the
> > classpathElements/classpath, so it doesn't look like there's a
> > dependency conflict anywhere. ([DEBUG]  C:\Documents and
> > Settings\egranse\.m2\repository\javax\mail\mail\1.3.1\mail-1.3.1.jar)
> >
> > Does anyone have any thoughts on what my next step should be? I'm out
> of
> > ideas.
> >
> > Thanks,
> >
> > Erik Granse
> >
> > Web Developer
> >
> > OptumHealth
> >
> > [EMAIL PROTECTED]
> >
> > 763-797-2572
> >
> >
> >
> >
> > This e-mail, including attachments, may include confidential and/or
> > proprietary information, and may be used only by the person or entity
> to
> > which it is addressed. If the reader of this e-mail is not the
> intended
> > recipient or his or her authorized agent, the reader is hereby
> notified
> > that any dissemination, distribution or copying of this e-mail is
> > prohibited. If you have received this e-mail in error, please notify
> the
> > sender by replying to this message and delete this e-mail immediately.
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> This e-mail, including attachments, may include confidential and/or
> proprietary information, and may be used only by the person or entity to
> which it is addressed. If the reader of this e-mail is not the intended
> recipient or his or her authorized agent, the reader is hereby notified
> that any dissemination, distribution or copying of this e-mail is
> prohibited. If you have received this e-mail in error, please notify the
> sender by replying to this message and delete this e-mail immediately.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Maven2 compilation problem

2008-04-17 Thread Granse, Erik A
Fixed - 

It turns out that j2ee.jar is (was) also a dependency and the version
being used contained an older version of mail.InternetAddress.

Thanks for your help.

-Original Message-
From: Wayne Fay [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 17, 2008 3:42 PM
To: Maven Users List
Subject: Re: Maven2 compilation problem

Unjar the file, dig into the files, and make sure that method exists.
You might even decompile it to be sure.

Wayne

On 4/17/08, Granse, Erik A <[EMAIL PROTECTED]> wrote:
> I'm in the process of migrating from Maven1 to Maven2 (using v. 2.0.8)
> and have run into a problem I'm unable to solve. When compiling one of
> my projects, I receive the following error:
>
> cannot resolve symbol
> symbol  : method validate ()
> location: class javax.mail.internet.InternetAddress
>
> I've had no build problems in either Eclipse or with Maven1, and I
> manually installed the the dependency jar (mail-1.3.1.jar) from my
> Maven1 repo to my Maven2 repo, so I'm puzzled as to the cause of the
> error.
>
> Compiling with debug turned on, I show that mvn is using the correct
> JDK, and I only see the mail-1.3.1 dependency listed in the
> classpathElements/classpath, so it doesn't look like there's a
> dependency conflict anywhere. ([DEBUG]  C:\Documents and
> Settings\egranse\.m2\repository\javax\mail\mail\1.3.1\mail-1.3.1.jar)
>
> Does anyone have any thoughts on what my next step should be? I'm out
of
> ideas.
>
> Thanks,
>
> Erik Granse
>
> Web Developer
>
> OptumHealth
>
> [EMAIL PROTECTED]
>
> 763-797-2572
>
>
>
>
> This e-mail, including attachments, may include confidential and/or
> proprietary information, and may be used only by the person or entity
to
> which it is addressed. If the reader of this e-mail is not the
intended
> recipient or his or her authorized agent, the reader is hereby
notified
> that any dissemination, distribution or copying of this e-mail is
> prohibited. If you have received this e-mail in error, please notify
the
> sender by replying to this message and delete this e-mail immediately.
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


This e-mail, including attachments, may include confidential and/or 
proprietary information, and may be used only by the person or entity to 
which it is addressed. If the reader of this e-mail is not the intended 
recipient or his or her authorized agent, the reader is hereby notified 
that any dissemination, distribution or copying of this e-mail is 
prohibited. If you have received this e-mail in error, please notify the 
sender by replying to this message and delete this e-mail immediately.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Maven2 compilation problem

2008-04-17 Thread Wayne Fay
Unjar the file, dig into the files, and make sure that method exists.
You might even decompile it to be sure.

Wayne

On 4/17/08, Granse, Erik A <[EMAIL PROTECTED]> wrote:
> I'm in the process of migrating from Maven1 to Maven2 (using v. 2.0.8)
> and have run into a problem I'm unable to solve. When compiling one of
> my projects, I receive the following error:
>
> cannot resolve symbol
> symbol  : method validate ()
> location: class javax.mail.internet.InternetAddress
>
> I've had no build problems in either Eclipse or with Maven1, and I
> manually installed the the dependency jar (mail-1.3.1.jar) from my
> Maven1 repo to my Maven2 repo, so I'm puzzled as to the cause of the
> error.
>
> Compiling with debug turned on, I show that mvn is using the correct
> JDK, and I only see the mail-1.3.1 dependency listed in the
> classpathElements/classpath, so it doesn't look like there's a
> dependency conflict anywhere. ([DEBUG]  C:\Documents and
> Settings\egranse\.m2\repository\javax\mail\mail\1.3.1\mail-1.3.1.jar)
>
> Does anyone have any thoughts on what my next step should be? I'm out of
> ideas.
>
> Thanks,
>
> Erik Granse
>
> Web Developer
>
> OptumHealth
>
> [EMAIL PROTECTED]
>
> 763-797-2572
>
>
>
>
> This e-mail, including attachments, may include confidential and/or
> proprietary information, and may be used only by the person or entity to
> which it is addressed. If the reader of this e-mail is not the intended
> recipient or his or her authorized agent, the reader is hereby notified
> that any dissemination, distribution or copying of this e-mail is
> prohibited. If you have received this e-mail in error, please notify the
> sender by replying to this message and delete this e-mail immediately.
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: maven2 compilation problem

2007-11-14 Thread Stuart McCulloch
On 14/11/2007, Christian Andersson <[EMAIL PROTECTED]> wrote:
>
> Thank you that was the problem, I had a written multiline 
> tag in the pom.xml for the first project.
>
> the best would be if either maven2 complained about this when creating
> my first project OR convert "illegal" characters to something legal.


definitely, it should really handle this for you - you might want to add a
comment to:

   http://jira.codehaus.org/browse/MJAR-50

to let them know that it's still an open issue... (mention which version of
maven you used)

Stuart McCulloch skrev:
> > On 14/11/2007, Christian Andersson <[EMAIL PROTECTED]> wrote:
> >> I have defined it in my second project, otherwise it would not had
> tried
> >> to load it. since the only plac eI have it in the parent project is in
> >> the dependencymanegment so that I get the same version number for all
> my
> >> projects..
> >>
> >> my problem seems to be that maven has created a jar file for my first
> >> project that my second project cannot read (which I think is strange)
> >
> >
> > "invalid header field" usually means the manifest contains some bogus
> values
> > (ie. some attributes have extra line-feeds or tabs where they're not
> > expected)
> >
> > this is why you can unzip the jarfile using basic (un)zip tools, but it
> > can't be read
> > with the Java (un)archiver which checks for and expects a valid manifest
> > file.
> >
> > you might want to check your POM to see if there are any entries that
> might
> > have extra line-feeds or tabs. There appear to be a couple of bugs
> reported
> > relating to this, but they suggest this is already fixed in Plexus
> > (PLX-185)...
> >
> >http://jira.codehaus.org/browse/MJAR-50
> >
> > or do you add your own customized manifest to the jar?
> >
> > what I have done is the following..
> >> cd projecta
> >> mvn clean install
> >> cd ../projectb
> >> mvn clean install
> >>
> >> so it should be able to read it..
> >>
> >> Nicole Lacoste skrev:
> >>> Hi Christian,
> >>>
> >>> If you want to depend on another artifact you must define the artifact
> >> in
> >>> the depencencies section in the pom of the project that needs the
> >> dependecy,
> >>> not its parent.  You can have a dependency management section in a
> >> project's
> >>> parent pom where you declare the version number, so that when you
> >> declare
> >>> the dependency in the child(ren) project, you don't have to declare
> the
> >>> versionn, and if there are multiple children they all get the same
> >> version.
> >>> I suggest you read chapter 3 of Better Builds with Maven, you can
> >> download
> >>> it at http://www.devzuz.com/web/guest/products/resources.
> >>>
> >>> Good luck,
> >>>
> >>> Nicole
> >>>
> >>>
> >>>
> >>> On 14/11/2007, Christian Andersson <[EMAIL PROTECTED]> wrote:
>  anyone, this completely stops me from going to maven 2
> 
>  Christian Andersson skrev:
> > OK, I have successfully created a pom.xm (with a parent pom.xml) and
> > built my first maven2 project (minus some stuff described in earlier
>  mails)
> > but when I tried to create my second maven2 project that depends on
> >> the
> > first one, I got into problems...
> >
> > the second project depends on the first project and the version is
> > defined in the parent pom.
> >
> > when I try to do a mvn install I get the following error..
> >
> > error: error reading
> > /home/user/.m2/repository/mygroup/myproject/1.0.0/myproject-
> 1.0.0.jar;
> > invalid header field
> >
> > from using amny different zip tools I cannot see that there is any
> > problems with the .jar file so it is probably something about the
>  content...
> > running with -e shows this.. (which I don't understand a thing
> about)
> >
> > [INFO]
> >
> >>
> 
> > [INFO] Trace
> > org.apache.maven.BuildFailureException: Compilation failure
> > at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
>  DefaultLifecycleExecutor.java:560)
> > at
> >
> >>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
>  (DefaultLifecycleExecutor.java:480)
> > at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
>  DefaultLifecycleExecutor.java:459)
> > at
> >
> >>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
>  (DefaultLifecycleExecutor.java:311)
> > at
> >
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments
> (
>  DefaultLifecycleExecutor.java:278)
> > at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
>  DefaultLifecycleExecutor.java:143)
> > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java
>  :334)
> > at org.apache.maven.DefaultMaven.execute(Defau

Re: maven2 compilation problem

2007-11-14 Thread Christian Andersson
Thank you that was the problem, I had a written multiline 
tag in the pom.xml for the first project.

the best would be if either maven2 complained about this when creating
my first project OR convert "illegal" characters to something legal.


Stuart McCulloch skrev:
> On 14/11/2007, Christian Andersson <[EMAIL PROTECTED]> wrote:
>> I have defined it in my second project, otherwise it would not had tried
>> to load it. since the only plac eI have it in the parent project is in
>> the dependencymanegment so that I get the same version number for all my
>> projects..
>>
>> my problem seems to be that maven has created a jar file for my first
>> project that my second project cannot read (which I think is strange)
> 
> 
> "invalid header field" usually means the manifest contains some bogus values
> (ie. some attributes have extra line-feeds or tabs where they're not
> expected)
> 
> this is why you can unzip the jarfile using basic (un)zip tools, but it
> can't be read
> with the Java (un)archiver which checks for and expects a valid manifest
> file.
> 
> you might want to check your POM to see if there are any entries that might
> have extra line-feeds or tabs. There appear to be a couple of bugs reported
> relating to this, but they suggest this is already fixed in Plexus
> (PLX-185)...
> 
>http://jira.codehaus.org/browse/MJAR-50
> 
> or do you add your own customized manifest to the jar?
> 
> what I have done is the following..
>> cd projecta
>> mvn clean install
>> cd ../projectb
>> mvn clean install
>>
>> so it should be able to read it..
>>
>> Nicole Lacoste skrev:
>>> Hi Christian,
>>>
>>> If you want to depend on another artifact you must define the artifact
>> in
>>> the depencencies section in the pom of the project that needs the
>> dependecy,
>>> not its parent.  You can have a dependency management section in a
>> project's
>>> parent pom where you declare the version number, so that when you
>> declare
>>> the dependency in the child(ren) project, you don't have to declare the
>>> versionn, and if there are multiple children they all get the same
>> version.
>>> I suggest you read chapter 3 of Better Builds with Maven, you can
>> download
>>> it at http://www.devzuz.com/web/guest/products/resources.
>>>
>>> Good luck,
>>>
>>> Nicole
>>>
>>>
>>>
>>> On 14/11/2007, Christian Andersson <[EMAIL PROTECTED]> wrote:
 anyone, this completely stops me from going to maven 2

 Christian Andersson skrev:
> OK, I have successfully created a pom.xm (with a parent pom.xml) and
> built my first maven2 project (minus some stuff described in earlier
 mails)
> but when I tried to create my second maven2 project that depends on
>> the
> first one, I got into problems...
>
> the second project depends on the first project and the version is
> defined in the parent pom.
>
> when I try to do a mvn install I get the following error..
>
> error: error reading
> /home/user/.m2/repository/mygroup/myproject/1.0.0/myproject-1.0.0.jar;
> invalid header field
>
> from using amny different zip tools I cannot see that there is any
> problems with the .jar file so it is probably something about the
 content...
> running with -e shows this.. (which I don't understand a thing about)
>
> [INFO]
>
>> 
> [INFO] Trace
> org.apache.maven.BuildFailureException: Compilation failure
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
 DefaultLifecycleExecutor.java:560)
> at
>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
 (DefaultLifecycleExecutor.java:480)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
 DefaultLifecycleExecutor.java:459)
> at
>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
 (DefaultLifecycleExecutor.java:311)
> at
>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
 DefaultLifecycleExecutor.java:278)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
 DefaultLifecycleExecutor.java:143)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java
 :334)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java
>> :125)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(
 NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
 DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:3

Re: maven2 compilation problem

2007-11-14 Thread Stuart McCulloch
On 14/11/2007, Christian Andersson <[EMAIL PROTECTED]> wrote:
>
> I have defined it in my second project, otherwise it would not had tried
> to load it. since the only plac eI have it in the parent project is in
> the dependencymanegment so that I get the same version number for all my
> projects..
>
> my problem seems to be that maven has created a jar file for my first
> project that my second project cannot read (which I think is strange)


"invalid header field" usually means the manifest contains some bogus values
(ie. some attributes have extra line-feeds or tabs where they're not
expected)

this is why you can unzip the jarfile using basic (un)zip tools, but it
can't be read
with the Java (un)archiver which checks for and expects a valid manifest
file.

you might want to check your POM to see if there are any entries that might
have extra line-feeds or tabs. There appear to be a couple of bugs reported
relating to this, but they suggest this is already fixed in Plexus
(PLX-185)...

   http://jira.codehaus.org/browse/MJAR-50

or do you add your own customized manifest to the jar?

what I have done is the following..
>
> cd projecta
> mvn clean install
> cd ../projectb
> mvn clean install
>
> so it should be able to read it..
>
> Nicole Lacoste skrev:
> > Hi Christian,
> >
> > If you want to depend on another artifact you must define the artifact
> in
> > the depencencies section in the pom of the project that needs the
> dependecy,
> > not its parent.  You can have a dependency management section in a
> project's
> > parent pom where you declare the version number, so that when you
> declare
> > the dependency in the child(ren) project, you don't have to declare the
> > versionn, and if there are multiple children they all get the same
> version.
> > I suggest you read chapter 3 of Better Builds with Maven, you can
> download
> > it at http://www.devzuz.com/web/guest/products/resources.
> >
> > Good luck,
> >
> > Nicole
> >
> >
> >
> > On 14/11/2007, Christian Andersson <[EMAIL PROTECTED]> wrote:
> >> anyone, this completely stops me from going to maven 2
> >>
> >> Christian Andersson skrev:
> >>> OK, I have successfully created a pom.xm (with a parent pom.xml) and
> >>> built my first maven2 project (minus some stuff described in earlier
> >> mails)
> >>> but when I tried to create my second maven2 project that depends on
> the
> >>> first one, I got into problems...
> >>>
> >>> the second project depends on the first project and the version is
> >>> defined in the parent pom.
> >>>
> >>> when I try to do a mvn install I get the following error..
> >>>
> >>> error: error reading
> >>> /home/user/.m2/repository/mygroup/myproject/1.0.0/myproject-1.0.0.jar;
> >>> invalid header field
> >>>
> >>> from using amny different zip tools I cannot see that there is any
> >>> problems with the .jar file so it is probably something about the
> >> content...
> >>>
> >>> running with -e shows this.. (which I don't understand a thing about)
> >>>
> >>> [INFO]
> >>>
> 
> >>> [INFO] Trace
> >>> org.apache.maven.BuildFailureException: Compilation failure
> >>> at
> >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> >> DefaultLifecycleExecutor.java:560)
> >>> at
> >>>
> >>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
> >> (DefaultLifecycleExecutor.java:480)
> >>> at
> >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> >> DefaultLifecycleExecutor.java:459)
> >>> at
> >>>
> >>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> >> (DefaultLifecycleExecutor.java:311)
> >>> at
> >>>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> >> DefaultLifecycleExecutor.java:278)
> >>> at
> >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> >> DefaultLifecycleExecutor.java:143)
> >>> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java
> >> :334)
> >>> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java
> :125)
> >>> at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
> >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>> at
> >>> sun.reflect.NativeMethodAccessorImpl.invoke(
> >> NativeMethodAccessorImpl.java:39)
> >>> at
> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >> DelegatingMethodAccessorImpl.java:25)
> >>> at java.lang.reflect.Method.invoke(Method.java:597)
> >>> at
> >>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> >>> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> >>> at
> >>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> >>> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> >>> Caused by: org.apache.maven.plugin.CompilationFailureException:

Re: maven2 compilation problem

2007-11-14 Thread Christian Andersson
I have defined it in my second project, otherwise it would not had tried
to load it. since the only plac eI have it in the parent project is in
the dependencymanegment so that I get the same version number for all my
projects..

my problem seems to be that maven has created a jar file for my first
project that my second project cannot read (which I think is strange)

what I have done is the following..

cd projecta
mvn clean install
cd ../projectb
mvn clean install

so it should be able to read it..

Nicole Lacoste skrev:
> Hi Christian,
> 
> If you want to depend on another artifact you must define the artifact in
> the depencencies section in the pom of the project that needs the dependecy,
> not its parent.  You can have a dependency management section in a project's
> parent pom where you declare the version number, so that when you declare
> the dependency in the child(ren) project, you don't have to declare the
> versionn, and if there are multiple children they all get the same version.
> I suggest you read chapter 3 of Better Builds with Maven, you can download
> it at http://www.devzuz.com/web/guest/products/resources.
> 
> Good luck,
> 
> Nicole
> 
> 
> 
> On 14/11/2007, Christian Andersson <[EMAIL PROTECTED]> wrote:
>> anyone, this completely stops me from going to maven 2
>>
>> Christian Andersson skrev:
>>> OK, I have successfully created a pom.xm (with a parent pom.xml) and
>>> built my first maven2 project (minus some stuff described in earlier
>> mails)
>>> but when I tried to create my second maven2 project that depends on the
>>> first one, I got into problems...
>>>
>>> the second project depends on the first project and the version is
>>> defined in the parent pom.
>>>
>>> when I try to do a mvn install I get the following error..
>>>
>>> error: error reading
>>> /home/user/.m2/repository/mygroup/myproject/1.0.0/myproject-1.0.0.jar;
>>> invalid header field
>>>
>>> from using amny different zip tools I cannot see that there is any
>>> problems with the .jar file so it is probably something about the
>> content...
>>>
>>> running with -e shows this.. (which I don't understand a thing about)
>>>
>>> [INFO]
>>> 
>>> [INFO] Trace
>>> org.apache.maven.BuildFailureException: Compilation failure
>>> at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
>> DefaultLifecycleExecutor.java:560)
>>> at
>>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
>> (DefaultLifecycleExecutor.java:480)
>>> at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
>> DefaultLifecycleExecutor.java:459)
>>> at
>>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
>> (DefaultLifecycleExecutor.java:311)
>>> at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
>> DefaultLifecycleExecutor.java:278)
>>> at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
>> DefaultLifecycleExecutor.java:143)
>>> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java
>> :334)
>>> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>>> at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(
>> NativeMethodAccessorImpl.java:39)
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(
>> DelegatingMethodAccessorImpl.java:25)
>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>> at
>>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>>> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>>> at
>>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>>> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>>> Caused by: org.apache.maven.plugin.CompilationFailureException:
>>> Compilation failure
>>> at
>>> org.apache.maven.plugin.AbstractCompilerMojo.execute(
>> AbstractCompilerMojo.java:505)
>>> at
>>> org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:111)
>>> at
>>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(
>> DefaultPluginManager.java:443)
>>> at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
>> DefaultLifecycleExecutor.java:539)
>>> ... 16 more
>>>
>>>
>>>
>>> 
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>> --
>> Christian Andersson - [EMAIL PROTECTED]
>>
>> Configuration and Collaboration for OpenOffice.org
>> Open Framework Systems AS http://www.ofs.no
>>
>>
>> 

Re: maven2 compilation problem

2007-11-14 Thread Nicole Lacoste
Hi Christian,

If you want to depend on another artifact you must define the artifact in
the depencencies section in the pom of the project that needs the dependecy,
not its parent.  You can have a dependency management section in a project's
parent pom where you declare the version number, so that when you declare
the dependency in the child(ren) project, you don't have to declare the
versionn, and if there are multiple children they all get the same version.
I suggest you read chapter 3 of Better Builds with Maven, you can download
it at http://www.devzuz.com/web/guest/products/resources.

Good luck,

Nicole



On 14/11/2007, Christian Andersson <[EMAIL PROTECTED]> wrote:
>
> anyone, this completely stops me from going to maven 2
>
> Christian Andersson skrev:
> > OK, I have successfully created a pom.xm (with a parent pom.xml) and
> > built my first maven2 project (minus some stuff described in earlier
> mails)
> >
> > but when I tried to create my second maven2 project that depends on the
> > first one, I got into problems...
> >
> > the second project depends on the first project and the version is
> > defined in the parent pom.
> >
> > when I try to do a mvn install I get the following error..
> >
> > error: error reading
> > /home/user/.m2/repository/mygroup/myproject/1.0.0/myproject-1.0.0.jar;
> > invalid header field
> >
> > from using amny different zip tools I cannot see that there is any
> > problems with the .jar file so it is probably something about the
> content...
> >
> >
> > running with -e shows this.. (which I don't understand a thing about)
> >
> > [INFO]
> > 
> > [INFO] Trace
> > org.apache.maven.BuildFailureException: Compilation failure
> > at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java:560)
> > at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
> (DefaultLifecycleExecutor.java:480)
> > at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> DefaultLifecycleExecutor.java:459)
> > at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> (DefaultLifecycleExecutor.java:311)
> > at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> DefaultLifecycleExecutor.java:278)
> > at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> DefaultLifecycleExecutor.java:143)
> > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java
> :334)
> > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> > at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> > sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
> > at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:597)
> > at
> > org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> > at
> > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> > at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> > Caused by: org.apache.maven.plugin.CompilationFailureException:
> > Compilation failure
> > at
> > org.apache.maven.plugin.AbstractCompilerMojo.execute(
> AbstractCompilerMojo.java:505)
> > at
> > org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:111)
> > at
> > org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> DefaultPluginManager.java:443)
> > at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java:539)
> > ... 16 more
> >
> >
> >
> > 
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> --
> Christian Andersson - [EMAIL PROTECTED]
>
> Configuration and Collaboration for OpenOffice.org
> Open Framework Systems AS http://www.ofs.no
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


Re: maven2 compilation problem

2007-11-14 Thread Christian Andersson
anyone, this completely stops me from going to maven 2

Christian Andersson skrev:
> OK, I have successfully created a pom.xm (with a parent pom.xml) and
> built my first maven2 project (minus some stuff described in earlier mails)
> 
> but when I tried to create my second maven2 project that depends on the
> first one, I got into problems...
> 
> the second project depends on the first project and the version is
> defined in the parent pom.
> 
> when I try to do a mvn install I get the following error..
> 
> error: error reading
> /home/user/.m2/repository/mygroup/myproject/1.0.0/myproject-1.0.0.jar;
> invalid header field
> 
> from using amny different zip tools I cannot see that there is any
> problems with the .jar file so it is probably something about the content...
> 
> 
> running with -e shows this.. (which I don't understand a thing about)
> 
> [INFO]
> 
> [INFO] Trace
> org.apache.maven.BuildFailureException: Compilation failure
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:560)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.CompilationFailureException:
> Compilation failure
> at
> org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:505)
> at
> org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:111)
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
> ... 16 more
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Christian Andersson - [EMAIL PROTECTED]

Configuration and Collaboration for OpenOffice.org
Open Framework Systems AS http://www.ofs.no

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]