maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Baptiste MATHUS ...@batmat.net>
Subject Re: when using "copy-dependencies" goal in dependency plugin, how can i install old version to overwrite a new one
Date Fri, 12 Feb 2010 14:16:58 GMT
You mean the new version will stay, but the older will also be added in the
target directory?


2010/2/12 eyal edri <eyal.edri@gmail.com>

> let's say I've got a maven project that when i install it, it installs all
> the dependencies to the classPath.
>
> but now i found that i need one of the dependencies in a version that is
> older than what i installed.
> so i go to the pom.xml and change it to an older version.
>
> in the current configuration, after running mvn install, nothing will
> happen
> (the newer version of the dependency will stay).
>
> (of course i can go to the classpath and manually delete the newer
> dependency.jar, but i rather maven will do it :).
>
> any ideas?
>
>
>
> On Fri, Feb 12, 2010 at 2:48 PM, Baptiste MATHUS <ml@batmat.net> wrote:
>
> > *Hi,*
> >
> > What do you mean? You'd like that the target directory doesn't contain
> bad
> > dependency version? If so, then couldn't you just add the "clean" option
> > before your goal? (mvn clean).
> >
> > *Cheers.*
> >
> > 2010/2/11 eyal edri <eyal.edri@gmail.com>
> >
> > > I'm trying to installer an older version of my project (to check
> rollback
> > > option),
> > >
> > > how can i tell maven to remove the new versions installed and replace
> > with
> > > older one?
> > >
> > > the other way works perfect.
> > >
> > >
> > > my pom:
> > >
> > >  <plugin>
> > >        <!-- copy artifact target to classpath -->
> > >        <groupId>org.apache.maven.plugins</groupId>
> > >        <artifactId>maven-dependency-plugin</artifactId>
> > >        <executions>
> > >          <execution>
> > >            <id>copy</id>
> > >            <phase>install</phase>
> > >            <goals>
> > >              <goal>copy</goal>
> > >            </goals>
> > >            <configuration>
> > >              <artifactItems>
> > >                <artifactItem>
> > >                  <groupId>${project.groupId}</groupId>
> > >                  <artifactId>${project.artifactId}</artifactId>
> > >                  <version>${project.version}</version>
> > >                  <type>${project.packaging}</type>
> > >                  <overWrite>true</overWrite>
> > >                  <outputDirectory>${classpath}</outputDirectory>
> > >                </artifactItem>
> > >              </artifactItems>
> > >            </configuration>
> > >          </execution>
> > >          <!--  copy artifact dependencies to classpath -->
> > >          <execution>
> > >            <id>copy-dependencies</id>
> > >            <phase>install</phase>
> > >            <goals>
> > >              <goal>copy-dependencies</goal>
> > >            </goals>
> > >            <configuration>
> > >              <outputDirectory>${classpath}</outputDirectory>
> > >              <overWriteReleases>true</overWriteReleases>
> > >              <overWriteSnapshots>true</overWriteSnapshots>
> > >              <overWriteIfNewer>true</overWriteIfNewer>
> > >              <stripVersion>false</stripVersion>
> > >            </configuration>
> > >          </execution>
> > >        </executions>
> > >      </plugin>
> > >
> > > --
> > > Eyal Edri
> > >
> >
> >
> >
> > --
> > Baptiste <Batmat> MATHUS - http://batmat.net
> > Sauvez un arbre,
> > Mangez un castor !
> >
>
>
>
> --
> Eyal Edri
>



-- 
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message