2

Maven 2(M2M eclipseプラグインを使用)とTychoを使用してRCPアプリケーションのビルドを自動化しようとしています。

私のアプリケーションは、SQLiteデータベースにデータを永続化するために休止状態にする必要があります。そうするために、これらのXML行をpom.xmlプラグインのに配置します。プラグインを実行するにはHibernateが必要です。

<?xml version="1.0" encoding="UTF-8"?>

<project>
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <relativePath>../com.myrcpapp.parentplugin.path/pom.xml</relativePath>
        <groupId>my.group.id</groupId>
        <artifactId>parent</artifactId>
        <version>1.0.0.qualifier</version>
    </parent>

    <groupId>my.group.id</groupId>
    <artifactId>com.myrcpapp.dbplugin</artifactId>
    <packaging>eclipse-plugin</packaging>

    <dependencies>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>4.2.0.CR1</version>
        </dependency>
    </dependencies>
</project>

目標を実行するとeclipse:eclipse、すべてが正常に実行され(クラスパスが適切に更新され、プラグインプロジェクトでjarが適切に参照されます)、アプリケーションを起動できます。clean installしかし、目標を使用してMavenでアプリケーションをビルドしようとすると、ビルドが失敗します。Mavenは「Hibernate」依存関係を解決できるようです。いずれにせよ、私はこのエラーを受け取ります:

 [ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.16.0:compile (default-compile) on project com.myrcpapp.dbplugin: Compilation failure: Compilation failure: com\myrcpapp\dbplugin
 [ERROR] C:\Documents and Settings\user\workspace\com.myrcpapp.dbplugin\src\com\myrcpapp\dbplugin\service\impl\ClientService.java:[3,0]
 [ERROR] import org.hibernate.Session;
 [ERROR] ^^^^^^^^^^^^^
 [ERROR] The import org.hibernate cannot be resolved
 [ERROR] C:\Documents and Settings\user\workspace\com.myrcpapp.dbplugin\src\com\myrcpapp\dbplugin\service\impl\ClientService.java:[4,0]
 [ERROR] import org.hibernate.Transaction;
 [ERROR] ^^^^^^^^^^^^^
 [..]
 [ERROR] Table cannot be resolved to a type
 [ERROR] C:\Documents and Settings\user\workspace\com.myrcpapp.dbplugin\src\com\myrcpapp\dbplugin\model\Client.java:[7,0]
 [ERROR] @Table(name="clients")
 [ERROR] ^^^^
 [ERROR] The attribute name is undefined for the annotation type Table
 [ERROR] 18 problems (18 errors)
 [ERROR] -> [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:
 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
 [ERROR] 
 [ERROR] After correcting the problems, you can resume the build with the command
 [ERROR]   mvn <goals> -rf :com.myrcpapp.dbplugin

私が間違っていることについてのアイデアはありますか?

前もって感謝します

4

0 に答える 0