Неопределенности Maven GAE/Datanucleus

Сегодня я провел некоторое время, пытаясь создать свой первый движок приложения Google, управляемый maven, 1.5.4 + сборка GWT 2.4.0.

Наконец-то я достиг стадии, когда все компилируется, и цель gae:run работает. Что было больше работы, чем я себе представлял, но эй, это все хорошее развлечение.

В любом случае, теперь мой вопрос: хотя все работает, я получаю следующую ОШИБКУ при запуске энхансера datanucleus.

[ERROR] --------------------
[ERROR]  Standard error from the DataNucleus tool + org.datanucleus.enhancer.DataNucleusEnhancer :
[ERROR] --------------------
[ERROR] Oct 02, 2011 11:04:39 PM org.datanucleus.enhancer.DataNucleusEnhancer <init>
INFO: DataNucleus Enhancer : Using ClassEnhancer "ASM" for API "JDO"
Oct 02, 2011 11:04:39 PM org.datanucleus.plugin.NonManagedPluginRegistry resolveConstraints
INFO: Bundle "org.datanucleus" has an optional dependency to "org.eclipse.equinox.registry" but it cannot be resolved
Oct 02, 2011 11:04:39 PM org.datanucleus.plugin.NonManagedPluginRegistry resolveConstraints
INFO: Bundle "org.datanucleus" has an optional dependency to "org.eclipse.core.runtime" but it cannot be resolved
Oct 02, 2011 11:04:39 PM org.datanucleus.enhancer.DataNucleusEnhancer main
INFO: DataNucleus Enhancer (version 1.1.4) : Validation of enhancement state
Oct 02, 2011 11:04:40 PM org.datanucleus.jdo.metadata.JDOAnnotationReader processClassAnnotations
INFO: Class "net.kindleit.gae.example.model.Message" has been specified with JDO annotations so using those.
Oct 02, 2011 11:04:40 PM org.datanucleus.metadata.MetaDataManager loadClasses
INFO: Class "net.kindleit.gae.example.model.Messages" has no MetaData or annotations. 
Oct 02, 2011 11:04:40 PM org.datanucleus.enhancer.DataNucleusEnhancer addMessage
INFO: ENHANCED (PersistenceCapable) : net.kindleit.gae.example.model.Message
Oct 02, 2011 11:04:40 PM org.datanucleus.enhancer.DataNucleusEnhancer addMessage
INFO: DataNucleus Enhancer completed with success for 1 classes. Timings : input=78 ms, enhance=15 ms, total=93 ms. Consult the log for full details
[ERROR] --------------------

Что там происходит? Что с блоками [ERROR]? Ошибок вроде нет вообще?

Кроме того, я получаю следующее предупреждение, которое я не совсем понимаю

[WARNING] Could not transfer metadata asm:asm/maven-metadata.xml from/to local.repository (file:../../local.repository/trunk): No connector available to access repository local.repository (file:../../local.repository/trunk) of type legacy using the available factories WagonRepositoryConnectorFactory

И, наконец, почему все зависимости добавляются в путь к классам datanucleus enchancer? Есть сообщение [INFO] от datanucleus Enhancer, в котором перечислены все jar-файлы в его пути к классам, и кажется, что оно содержит все, как так получилось? Я бы подумал, что там нужны только библиотеки, связанные с JDO и персистентностью?


person JustDanyul    schedule 02.10.2011    source источник


Ответы (1)


У меня такая же ошибка, как у вас. Затем я изменил версию на последнюю. Ошибки исчезли.

<properties>
    <datanucleus.version>3.0.1</datanucleus.version>
    <maven-datanucleus-plugin>3.0.0-release</maven-datanucleus-plugin>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

    <!--datanucleus related dependencies-->
    <dependency>
        <groupId>com.google.appengine.orm</groupId>
        <artifactId>datanucleus-appengine</artifactId>
        <version>1.0.10</version>
    </dependency>
    <dependency>
        <groupId>org.datanucleus</groupId>
        <artifactId>datanucleus-core</artifactId>
        <version>${datanucleus.version}</version>
        <scope>runtime</scope>
        <exclusions>
            <exclusion>
                <groupId>javax.transaction</groupId>
                <artifactId>transaction-api</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <!--jdo related dependencies-->
    <dependency>
        <groupId>javax.jdo</groupId>
        <artifactId>jdo2-api</artifactId>
        <version>2.3-ec</version>
        <exclusions>
            <!--
                exclude the legacy javax.transaction:transaction-api and replace it
                with javax.transaction:jta (it appears to be the same thing)
            -->
            <exclusion>
                <groupId>javax.transaction</groupId>
                <artifactId>transaction-api</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>javax.transaction</groupId>
        <artifactId>jta</artifactId>
        <version>1.1</version>
    </dependency>


<build>
    <plugins>
    ..........
        <plugin>
            <groupId>org.datanucleus</groupId>
            <artifactId>maven-datanucleus-plugin</artifactId>
            <version>${maven-datanucleus-plugin}</version>
            <configuration>
                <!--
                    Make sure this path contains your persistent classes!
                -->
                <mappingIncludes>**/db/*.class</mappingIncludes>
                <verbose>true</verbose>
                <enhancerName>ASM</enhancerName>
                <api>JDO</api>
            </configuration>
            <executions>
                <execution>
                    <phase>compile</phase>
                    <goals>
                        <goal>enhance</goal>
                    </goals>
                </execution>
            </executions>
            <dependencies>
                <dependency>
                    <groupId>org.datanucleus</groupId>
                    <artifactId>datanucleus-core</artifactId>
                    <version>${datanucleus.version}</version>
                    <exclusions>
                        <exclusion>
                            <groupId>javax.transaction</groupId>
                            <artifactId>transaction-api</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>org.datanucleus</groupId>
                    <artifactId>datanucleus-rdbms</artifactId>
                    <version>${datanucleus.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.datanucleus</groupId>
                    <artifactId>datanucleus-enhancer</artifactId>
                    <version>${datanucleus.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.datanucleus</groupId>
                    <artifactId>datanucleus-api-jdo</artifactId>
                    <version>${datanucleus.version}</version>
                </dependency>
            </dependencies>
        </plugin>
    </plugins>
</build>
person angelokh    schedule 22.10.2011