no, i mean that it will delete the new one and install the old one.

today, (when you install a newer version, maven deletes the old and install
the new - if you config to overwrite).

On Fri, Feb 12, 2010 at 4:16 PM, Baptiste MATHUS <[email protected]> wrote:

> You mean the new version will stay, but the older will also be added in the
> target directory?
>
>
> 2010/2/12 eyal edri <[email protected]>
>
> > 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 <[email protected]> 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 <[email protected]>
> > >
> > > > 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 !
>



-- 
Eyal Edri

Reply via email to