I think it might be as simple as add -DgeneratePom=true.

I would suggest not doing it my hand on the command line but create a
separate pom, maybe a module for your project or maybe for your
company where command 3rd party jars can be installed.

i.e.
[...]
   <build>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-install-plugin</artifactId>
            <version>2.3.1</version>
            <inherited>false</inherited>
            <executions>
[...]
               <execution>
                  <id>install:com.oracle:ojdbc6:11g</id>
                  <phase>validate</phase>
                  <goals>
                     <goal>install-file</goal>
                  </goals>
                  <configuration>

<file>${project.basedir}/com/oracle/ojdbc6/ojdbc6.jar</file>
                     <groupId>com.oracle</groupId>
                     <artifactId>ojdbc6</artifactId>
                     <version>11g</version>
                     <packaging>jar</packaging>
                     <createChecksum>true</createChecksum>
                     <generatePom>true</generatePom>
                  </configuration>
               </execution>
[...]

The main reason is it is then consistent for each developer and
potentially continuous integration can automatically push into your
local/project/company repository.

I then have that wrapping '3rd-party' pom as a dependency for the main
project pom and it's version is increased with each new dependency. So
when a developer sync's and a new dependency instead of where is
oracle x, they also get 3rd-party x.

John

On 23 April 2012 15:23, copyto27 <cop...@gmail.com> wrote:
> Hi,
>
> I'm traying to add the Oracle JDBC driver to my maven local repository with
> this commad:
>
> mvn install:install-file
> -Dfile=C:\apache-maven-3.0.4\lib\ojdbc6-11.1.0.7.0.jar -DgroupId=com.oracle
> -DartifactId=ojdbc6 -Dversion=11.1.0.7.0 -Dpackaging=jar
>
> but maven return the next error:
>
> [INFO] Scanning for projects...
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 0.249s
> [INFO] Finished at: Mon Apr 23 16:06:48 CEST 2012
> [INFO] Final Memory: 1M/15M
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] The goal you specified requires a project to execute but there is no
> POM in this directory (C:\). Please verify
> you invoked Maven from the correct directory. -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please
> read the following articles:
>
>
> What am I doing wrong?
>
> thanks!!
>
> --
> View this message in context: 
> http://maven.40175.n5.nabble.com/Help-to-add-Oracle-JDBC-driver-tp5659525p5659525.html
> Sent from the Maven Developers mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>

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

Reply via email to