简体   繁体   English

将.SQLJ迁移到NetBeans中的Maven项目

[英]Migrate .SQLJ to maven project in netbeans

I am currently migrating a project which using sqlj to do all the query. 我目前正在迁移一个使用sqlj进行所有查询的项目。 It is using JDeveloper to to develop the project. 它正在使用JDeveloper来开发项目。

Currently I need to create a new maven project using netbeans and I need to reuse those sqlj in this migrationg. 当前,我需要使用netbeans创建一个新的maven项目,并且需要在迁移过程中重用那些sqlj。 But netbeans does not regonize sqlj. 但是netbeans不会使sqlj变灰。

Is there any solution on how do I migrate the sqlj to maven project in netbeans? 关于如何将sqlj迁移到netbeans中的Maven项目,有什么解决方案吗? I have imported the plugin in the maven but it have some error which is something like could not get the version. 我已经在Maven中导入了插件,但是它有一些错误,例如无法获取版本。

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>sqlj-maven-plugin</artifactId>
    <version>1.2</version>
    <executions>
        <execution>
          <id>sqlj</id>
          <goals>
            <goal>sqlj</goal>
          </goals>
          <configuration>
            <sqljDirs>
              <sqljDir>src\main</sqljDir>
            </sqljDirs>
          </configuration>
        </execution>
      </executions>
    <dependencies>
      <dependency>
        <groupId>sqlj-maven-plugin</groupId>
        <artifactId>sqlj</artifactId>
        <version>1.2</version>
      </dependency>
    </dependencies>
  </plugin>  

I have download the SQLJ translator in Oracle Oracle Link 我已经在Oracle Oracle Link中下载了SQLJ转换器

I have install the translator.jar into my maven repository according to Maven 3rd party jar installation guide Here 我有translator.jar安装到我的Maven仓库根据Maven的第三方JAR安装指南这里

Anyone have this migration case before that may guide me or give me some advice on this migration. 在此之前,任何人都有此迁移案例可能会指导我或给我一些有关此迁移的建议。

Thanks in advance. 提前致谢。

I've just created a maven project using sqlj-maven-plugin, and works for me. 我刚刚使用sqlj-maven-plugin创建了一个maven项目,并为我工作。 (I'm using jdk6, mvn 3.1.1 and version 1.3 of the plugin). (我正在使用jdk6,mvn 3.1.1和插件的1.3版)。

I was getting the "Couldn't retrieve SQLJ Translator version info" error, but was an incompatibility error between my translator.jar and the plugin (I've submitted the correction here ) 我收到“无法检索SQLJ转换器版本信息”错误,但是我的translator.jar和插件之间不兼容(我在这里提交了更正)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM