You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by SRINIVASA RAO <sr...@yahoo.com> on 2009/02/17 15:05:38 UTC

Problem with run the sql scripts using Maven

Hi All,
 
 I am facing one prroblem with run the sql scripts using Maven
 I am having Maven2 and oracle 10g in my machine.
 I have developed teh POM.xml as follows:

 <?xml version="1.0" encoding="UTF-8"?>
 <project>
 <modelVersion>4.0.0</modelVersion>
 <groupId>org.myproject.plugins</groupId>
 <artifactId>MavenSQL-plugin</artifactId>
 <version>1.0-SNAPSHOT</version>
 <name>Maven SQL Plugin</name>
  <build>
 <plugins>
   <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>sql-maven-plugin</artifactId>
  <version>1.2</version>
        <dependencies>
           <dependency>
    <groupId>ojdbc</groupId>
    <artifactId>ojdbc</artifactId>
    <version>14</version>
   </dependency>
         </dependencies> 
   <!-- common configuration shared by all executions -->
  <configuration>
           <username>test1</username>
           <password>test1</password>
           <driver>oracle.jdbc.driver.OracleDriver</driver>
           <url>jdbc:oracle:thin:@localhost:1521:strng</url>
         </configuration>
       </plugin>
   </plugins>
 </build>
</project>
when i run the following command it is giving me following error:
C:>mvn sql:execute 
Missing:
----------
1) ojdbc:ojdbc:jar:14
  Try downloading the file manually from:
      http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
  Then, install it using the command:
      mvn install:install-file -DgroupId=ojdbc -DartifactId=ojdbc -Dversion=14 -Dpackaging=jar -Dfile=/path/to/file
  Alternatively, if you host your own repository you can deploy the file there:
      mvn deploy:deploy-file -DgroupId=ojdbc -DartifactId=ojdbc -Dversion=14 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
  Path to dependency:
        1) org.codehaus.mojo:sql-maven-plugin:maven-plugin:1.2
        2) ojdbc:ojdbc:jar:14
----------
1 required artifact is missing.
for artifact:
  org.codehaus.mojo:sql-maven-plugin:maven-plugin:1.2
from the specified remote repositories:
  codehaus.org (http://snapshots.repository.codehaus.org),
  central (http://repo1.maven.org/maven2)

Could you please let me know, How to run the above maven scripts using cmd and solve this problem.
Regards,
Srinivas


      

Re: Problem with run the sql scripts using Maven

Posted by Wayne Fay <wa...@gmail.com>.
> 1) ojdbc:ojdbc:jar:14
>   Try downloading the file manually from:
>       http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
>   Then, install it using the command:
>       mvn install:install-file -DgroupId=ojdbc -DartifactId=ojdbc -Dversion=14 -Dpackaging=jar -Dfile=/path/to/file
>   Alternatively, if you host your own repository you can deploy the file there:
>       mvn deploy:deploy-file -DgroupId=ojdbc -DartifactId=ojdbc -Dversion=14 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
>
> Could you please let me know, How to run the above maven scripts using cmd and solve this problem.

Can you not follow directions? The way to resolve this issue is VERY
clearly documented above.

Wayne

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