On Thu, Nov 4, 2010 at 11:53 AM, Martin Gentry <[email protected]> wrote:

> On Thu, Nov 4, 2010 at 2:33 PM, Wendy Smoak <[email protected]> wrote:
>
> > On Thu, Nov 4, 2010 at 1:16 PM, Martin Gentry <[email protected]> wrote:
> > > The basic issue is that when I execute "mvn deploy" the artifact is
> being
> > > successfully deployed to the snapshot repository, but Maven is also
> > > attempting to deploy it to the release repository, which is failing ...
> > as
> > > it should.  My understanding of my current configuration is that it
> > should
> > > NOT be deploying it to the release repository as well.
> >
> > It's not... I see a war going to snapshots and a _jar_ going to releases.
> >
> > What's in the pom?  I see:
> > [INFO] [deploy:deploy-file {execution: default}]
> >
> > And 'deploy-file' is not part of the default lifecycle, it's usually
> > used at the command line.
> >
> > My guess is that someone has configured an execution of the deploy
> > plugin trying to push an extra jar into the repo.  (If you're trying
> > to deploy the class files from a webapp, the war plugin has an option
> > to do that for you, though it's better to put the classes in a
> > separate module.)
> >
>
> And here goes where my n00b status with Maven comes into play. :)  So with
> this pointer I've located the problem in the main project POM that seems to
> be the culprit.
>
> Someone had added:
> <plugin>
>  <groupId>org.apache.maven.plugins</groupId>
>  <artifactId>maven-deploy-plugin</artifactId>
>  <executions>
>    <execution>
>      <phase>deploy</phase>
>        <goals>
>          <goal>deploy-file</goal>
>        </goals>
>        <configuration>
>          <packaging>jar</packaging>
>          <generatePom>true</generatePom>
>          <url>${project.distributionManagement.repository.url}</url>
>          <artifactId>${project.artifactId}</artifactId>
>          <groupId>${project.groupId}</groupId>
>          <version>${project.version}</version>
>
>  <file>${project.build.directory}/${project.build.finalName}.jar</file>
>        </configuration>
>      </execution>
>    </executions>
>  </plugin>
>
> Which for one, directly
> references ${project.distributionManagement.repository.url}.  Commenting
> that section out resolves my particular issue, now I just have to determine
> why this was there in the first place and resolve that issue. :)
>

Just as an aside - thanks for supplying the the deploy-file entry for a pom.
 This is exactly what I needed to greatly simplify managing our thirdparty
jar files.

Reply via email to