You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Vincent Massol <vm...@pivolis.com> on 2003/06/18 17:45:24 UTC

New WAR changes problems

Hi,

I have 2 problems with the new changes brought to the war plugin WRT
artifact deployment:

1/ When I run maven, I get:

war:war:
    [echo] Building WAR everest-csrweb
    [war] Updating war:
E:\Vma\Projets\Encours\tsss\everest\dev\modules\csrweb\target\everest-cs
rweb
.war
Copying: from
'E:\Vma\Projets\Encours\tsss\everest\dev\modules\csrweb/target/everest-c
srweb.war' to:
 'C:\Documents and Settings\Vincent
Massol/.maven/repository/everest/wars'

BUILD FAILED
Unable to obtain goal [war:install] -- null:165:11: <artifact:install>
null
Total time:  22 seconds

Note1: If I run "maven war" from the project it works fine
Note2: It fails when I run maven through the reactor...

2/ The war:install goal fails to add the version to the artifact and no
artifact should go in the Maven repository without having a version in
its name.

With the previous implementation it was easy to add the version. However
with the new one:

     <artifact:install
        artifact="${maven.war.build.dir}/${maven.war.final.name}"
        type="war"
        project="${pom}"
        />

there is no way to rename the war... One solution (not nice) would to
perform a copy prior to calling <artifact:install>.

Note: I'm assuming we want to keep maven.war.final.name without the
version in it as some have expressed this need.

Thanks
-Vincent


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


RE: New WAR changes problems

Posted by Vincent Massol <vm...@pivolis.com>.

> -----Original Message-----
> From: Michal Maczka [mailto:mmaczka@interia.pl]
> Sent: 18 June 2003 21:09
> To: Maven Developers List
> Subject: RE: New WAR changes problems

[snip]

> > >
> > >  <artifact:install
> > >          artifact="foo"
> > >           type="war"
> > >          project="${pom}"
> > >
> > >  <artifact:install
> > >          artifact="lkjlkjlkjlkjlklk"
> > >           type="war"
> > >           project="${pom}"
> > >
> > > will do the same. The original file name is simply ignored.
> >
> > Sorry you've lost me. If the artifact attribute has no meaning, why
is
> > there one? Also what you're saying is not completely true as I've
tried
> > the war plugin (which uses artifact:install) and the war artifact
was
> > copied to the local repository *without* the version in its name.
> >
> 
> This simply points to a file which will be deployed.
> This  can be any file in any place. But deployer, installer must know
the
> name of this file.

Nie rozumiem! You just said a few lines above that using any name does
the same and that the original file name is simply ignored???

So it is used after all...

> 
> If it is installed without version it is an error. 

Then there is a bug... :-)

> I am working in
> deployer
> (remote deployer).
> I  was bit busy today.. but hope to have ssh:// , file://' (not much
> needed
> but easy to support) and ftp:// deployer
> for tommorow. There is also http:// deployer.

I only need a normal copy working! Why would you need all these fancy
ssh, ftp, http to copy only a file from one directory to another
directory on the *same* machine. This is used to copy artifacts to the
local repository, right?

> 
> 
> 
> > Also, why do you pass the pom object? Is the full POM really needed?
You
> > probably only need some elements from the pom, like the
currentVersion,
> > groupId field, etc. I think it is a much better design to make these
> > fields visible and not hidden by a global object.
> >
> 
> You need much more. In pom you have
> 
> distributionDirectory
> distributionSite
> groupId
> artifactId
> version
> + pom has associated JellyContext which contains many behavioral
> properties
> for deplorers
> (password, paths to private key,  proxy servers etc)

ok, we're definitely not talking about the same thing here. I'm talking
about copying artifacts to the *Local* repository. This is what
war:install was previously doing and it seems this is also what the
artifact:install seems to be doing when I execute it...

You seem to be talking about remote repositories.

> 
> I think POM is good for passing such data.
> 
> In framework I am propagating the POM till some level, Then API
becomes
> independent of it. Those classes can be reused for low level operation
as
> they are
> completely independent of Maven,

ok

> 
> I will send a post asking for your opinion about naming convention of
new
> properties
> which I will introduce by supporting multiple repositories.

-Vincent



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


RE: New WAR changes problems

Posted by Michal Maczka <mm...@interia.pl>.

> -----Original Message-----
> From: Vincent Massol [mailto:vmassol@pivolis.com]
> Sent: Wednesday, June 18, 2003 8:23 PM
> To: 'Maven Developers List'
> Subject: RE: New WAR changes problems
>
>
>
>
> > -----Original Message-----
> > From: Michal Maczka [mailto:mmaczka@interia.pl]
> > Sent: 18 June 2003 19:44
> > To: Maven Developers List
> > Subject: RE: New WAR changes problems
> >
>
> [snip]
>
> > > there is no way to rename the war... One solution (not nice) would
> to
> > > perform a copy prior to calling <artifact:install>.
> > >
> >
> >
> > It's different story here:
> >
> > artifact:install is taking care to create repository root relative
> path,
> > file name (with version) using information taken from
> > POM and the artifact type (we will be able here to use
> RepositoryLayout
> > service from maven-new).
> >
> >  <artifact:install
> >          artifact="foo"
> >           type="war"
> >          project="${pom}"
> >
> >  <artifact:install
> >          artifact="lkjlkjlkjlkjlklk"
> >           type="war"
> >           project="${pom}"
> >
> > will do the same. The original file name is simply ignored.
>
> Sorry you've lost me. If the artifact attribute has no meaning, why is
> there one? Also what you're saying is not completely true as I've tried
> the war plugin (which uses artifact:install) and the war artifact was
> copied to the local repository *without* the version in its name.
>

This simply points to a file which will be deployed.
This  can be any file in any place. But deployer, installer must know the
name of this file.

If it is installed without version it is an error. I am working in deployer
(remote deployer).
I  was bit busy today.. but hope to have ssh:// , file://' (not much needed
but easy to support) and ftp:// deployer
for tommorow. There is also http:// deployer.



> Also, why do you pass the pom object? Is the full POM really needed? You
> probably only need some elements from the pom, like the currentVersion,
> groupId field, etc. I think it is a much better design to make these
> fields visible and not hidden by a global object.
>

You need much more. In pom you have

distributionDirectory
distributionSite
groupId
artifactId
version
+ pom has associated JellyContext which contains many behavioral properties
for deplorers
(password, paths to private key,  proxy servers etc)

I think POM is good for passing such data.

In framework I am propagating the POM till some level, Then API becomes
independent of it. Those classes can be reused for low level operation as
they are
completely independent of Maven,

I will send a post asking for your opinion about naming convention of new
properties
which I will introduce by supporting multiple repositories.


mm



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


RE: New WAR changes problems

Posted by Vincent Massol <vm...@pivolis.com>.

> -----Original Message-----
> From: Michal Maczka [mailto:mmaczka@interia.pl]
> Sent: 18 June 2003 19:44
> To: Maven Developers List
> Subject: RE: New WAR changes problems
> 

[snip]

> > there is no way to rename the war... One solution (not nice) would
to
> > perform a copy prior to calling <artifact:install>.
> >
> 
> 
> It's different story here:
> 
> artifact:install is taking care to create repository root relative
path,
> file name (with version) using information taken from
> POM and the artifact type (we will be able here to use
RepositoryLayout
> service from maven-new).
> 
>  <artifact:install
>          artifact="foo"
>           type="war"
>          project="${pom}"
> 
>  <artifact:install
>          artifact="lkjlkjlkjlkjlklk"
>           type="war"
>           project="${pom}"
> 
> will do the same. The original file name is simply ignored.

Sorry you've lost me. If the artifact attribute has no meaning, why is
there one? Also what you're saying is not completely true as I've tried
the war plugin (which uses artifact:install) and the war artifact was
copied to the local repository *without* the version in its name.

Also, why do you pass the pom object? Is the full POM really needed? You
probably only need some elements from the pom, like the currentVersion,
groupId field, etc. I think it is a much better design to make these
fields visible and not hidden by a global object.

Thanks
-Vincent

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



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


RE: New WAR changes problems

Posted by Michal Maczka <mm...@interia.pl>.

> -----Original Message-----
> From: Vincent Massol [mailto:vmassol@pivolis.com]
> Sent: Wednesday, June 18, 2003 5:45 PM
> To: 'Maven Developers List'
> Subject: New WAR changes problems
>
>
> Hi,
>
> I have 2 problems with the new changes brought to the war plugin WRT
> artifact deployment:
>
> 1/ When I run maven, I get:
>

Install deploy component is under development. I hope to have it finished
for tommorow.
Anomalies are expected. Sorry for that!


> 2/ The war:install goal fails to add the version to the artifact and no
> artifact should go in the Maven repository without having a version in
> its name.
>
> With the previous implementation it was easy to add the version. However
> with the new one:
>
>      <artifact:install
>         artifact="${maven.war.build.dir}/${maven.war.final.name}"
>         type="war"
>         project="${pom}"
>         />
>
> there is no way to rename the war... One solution (not nice) would to
> perform a copy prior to calling <artifact:install>.
>


It's different story here:

artifact:install is taking care to create repository root relative path,
file name (with version) using information taken from
POM and the artifact type (we will be able here to use RepositoryLayout
service from maven-new).

 <artifact:install
         artifact="foo"
          type="war"
         project="${pom}"

 <artifact:install
         artifact="lkjlkjlkjlkjlklk"
          type="war"
          project="${pom}"

will do the same. The original file name is simply ignored.



Michal



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


RE: New WAR changes problems

Posted by Vincent Massol <vm...@pivolis.com>.

> -----Original Message-----
> From: Vincent Massol [mailto:vmassol@pivolis.com]
> Sent: 18 June 2003 17:45
> To: 'Maven Developers List'
> Subject: New WAR changes problems
> 
> Hi,
> 
> I have 2 problems with the new changes brought to the war plugin WRT
> artifact deployment:
> 
> 1/ When I run maven, I get:
> 
> war:war:
>     [echo] Building WAR everest-csrweb
>     [war] Updating war:
>
E:\Vma\Projets\Encours\tsss\everest\dev\modules\csrweb\target\everest-cs
> rweb
> .war
> Copying: from
>
'E:\Vma\Projets\Encours\tsss\everest\dev\modules\csrweb/target/everest-c
> srweb.war' to:
>  'C:\Documents and Settings\Vincent
> Massol/.maven/repository/everest/wars'
> 
> BUILD FAILED
> Unable to obtain goal [war:install] -- null:165:11: <artifact:install>
> null
> Total time:  22 seconds
> 
> Note1: If I run "maven war" from the project it works fine
> Note2: It fails when I run maven through the reactor...

Sorry, this is wrong! I'm getting the same error whether I run it with
or without the reactor. Here's some more information:

BUILD FAILED
java.lang.reflect.InvocationTargetException
com.werken.werkz.UnattainableGoalException: Unable to obtain goal
[war:install] -- null:165:11: <art
ifact:install> null
[...]
Caused by: org.apache.maven.MavenException: Cannot install file:
'everest/wars'. Reason: C:\Document
s and Settings\Vincent Massol\.maven\repository\everest\wars (Access is
denied)
        at
org.apache.maven.artifact.deployer.DefaultArtifactDeployer.doInstall(Def
aultArtifactDeplo
yer.java:174)

I don't understand why the access is denied. Anyway, after removing
manually the everest/wars directory it worked fine.

[snip]

Thanks
-Vincent


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