将Maven与QT Jambi一起使用 [英] Using Maven with QT Jambi

查看:152
本文介绍了将Maven与QT Jambi一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用QT Jambi,但在使Maven插件正常工作时遇到了一些问题.我收到以下错误消息:

I'm just getting started with QT Jambi and I have some problems getting the Maven-plugin to work. I get the following error message:

[错误]无法在目标DegooClientGUI上执行目标net.sf.qtjambi:qtjambi-maven-plugin:4.6.3.1:generate(default-cli):执行目标net.sf.qtjambi:qtjambi-的default-cli maven-plugin:4.6.3.1:generate失败:插件net.sf.qtjambi:qtjambi-maven-plugin:4.6.3.1或其依赖项之一无法解析:无法收集net.sf.qtjambi:qtjambi-的依赖项maven-plugin:jar:4.6.3.1():无法读取net.sf.qtjambi:qtjambi-maven-plugin-win32:jar:4.6.3.1的工件描述符:无法传输工件net.sf.qtjambi:qtjambi-从/到qtjambi的maven-plugin-win32:pom:4.6.3.1(http://qtjambi.sourceforge.net/maven2/):校验和验证失败,存储库中没有可用的校验和-> [帮助1]

[ERROR] Failed to execute goal net.sf.qtjambi:qtjambi-maven-plugin:4.6.3.1:generate (default-cli) on project DegooClientGUI: Execution default-cli of goal net.sf.qtjambi:qtjambi-maven-plugin:4.6.3.1:generate failed: Plugin net.sf.qtjambi:qtjambi-maven-plugin:4.6.3.1 or one of its dependencies could not be resolved: Failed to collect dependencies for net.sf.qtjambi:qtjambi-maven-plugin:jar:4.6.3.1 (): Failed to read artifact descriptor for net.sf.qtjambi:qtjambi-maven-plugin-win32:jar:4.6.3.1: Could not transfer artifact net.sf.qtjambi:qtjambi-maven-plugin-win32:pom:4.6.3.1 from/to qtjambi (http://qtjambi.sourceforge.net/maven2/): Checksum validation failed, no checksums available from the repository -> [Help 1]

我的pom看起来像这样:

My pom looks like this:

  <repositories>
    <repository>
        <id>qtjambi</id>
        <name>qtjambi</name>
        <url>http://qtjambi.sourceforge.net/maven2/</url>
        <releases>
            <checksumPolicy>ignore</checksumPolicy>
        </releases>
        <snapshots>
            <checksumPolicy>ignore</checksumPolicy>
        </snapshots>
    </repository>
</repositories>

<pluginRepositories>
    <pluginRepository>
        <id>qtjambi</id>
        <name>qtjambi</name>
        <url>http://qtjambi.sourceforge.net/maven2/</url>
        <releases>
            <checksumPolicy>ignore</checksumPolicy>
        </releases>
        <snapshots>
            <checksumPolicy>ignore</checksumPolicy>
        </snapshots>
    </pluginRepository>
</pluginRepositories>

<dependencies>
    <dependency>
        <groupId>net.sf.qtjambi</groupId>
        <artifactId>qtjambi</artifactId>
        <version>4.6.3</version>
    </dependency>
</dependencies>

<build>
    <sourceDirectory>src</sourceDirectory>
    <testSourceDirectory>tests</testSourceDirectory>
    <plugins>
        <plugin>
            <groupId>net.sf.qtjambi</groupId>
            <artifactId>qtjambi-maven-plugin</artifactId>
            <version>4.6.3.1</version>
            <executions>
                <execution>
                    <id>qtjambi</id>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <!-- Specifies where sources are. This parameter is MANDATORY -->
                <sourcesDir>src</sourcesDir>
                <!-- following parameters aren't mandatory, they use defaults as specified here
        if not specified
        <translationsDir>src/main/resources/translations</translationsDir>
        <destinationDir>target/generated-sources/qtjambi</destinationDir>
        -->
                <!-- cause -noobsolete switch for lupdate -->
                <noObsoleteTranslations>true</noObsoleteTranslations>
            </configuration>
        </plugin>
    </plugins>
</build>

如您所见,我试图忽略校验和错误,但这无济于事.我还尝试指定其他版本,这些版本在存储库中可用.那也没有帮助.有任何想法吗?预先感谢!

As you can see I've tried to ignore checksum-errors but that doesn't help. I've also tried specifying other versions, that are available in the repository. That didn't help either. Any ideas? Thanks in advance!

推荐答案

仅供参考,它不是4.6.3.1.的Win64版本.

FYI the is no win64 version of 4.6.3.1.

您的错误确实提到了win32而不是win64,但是值得尝试看看4.6.3版是否可以运行,该版本具有win32和win64.也许上面测试并确认正在使用Win7 32bit的人.但是您已经明确声明自己是Win7 64位.

Your error does clearly talk of win32 not win64 but it is worth trying to see if version 4.6.3 works instead, this version has win32 and win64). Maybe the person testing above and confirming was using Win7 32bit or something. But you have clearly stated you are Win7 64bit.

尽管如果您使用32位JRE运行Maven,则系统将认为它是32位系统.也许这就是您正在做的事情,并解释了为什么您的Win7 64bit试图解决qtjambi-maven-plugin-win32.

Although if you are using a 32bit JRE to run Maven then the system will think it is a 32bit system. Maybe this is what you are doing and explains why your Win7 64bit is trying to resolve qtjambi-maven-plugin-win32.

插件的pom.xml在运行时基于平台自动选择qtjambi-maven-plugin-win32或qtjambi-maven-plugin-win64.

The pom.xml of the plugin auto-selects the qtjambi-maven-plugin-win32 or qtjambi-maven-plugin-win64 based on the platform at runtime.

解决方案的2个选项(选择一个)

2 options on a solution to fix (pick one)

1)使用4.6.3版

1) Use version 4.6.3

2)在项目POM中添加一个部分以排除groupId = net.sf.qtjambi工件ID = qtjambi-maven-plugin-win64,这是在pom.xml的build/plugins/plugin/*部分中完成的.我没有示例,但是Eclipse m2e pom.xml编辑器允许快速轻松地进行排除.手动排除后,请为qtjambi-maven-plugin-win32添加其他依赖项.据我了解,平台依赖部分提供了一个可以运行的EXE,并且由于所有Win64都支持Win32二进制文件的执行,因此使用Win32应该可以.

2) Add in a section to your project POM to exclude groupId=net.sf.qtjambi artifactId=qtjambi-maven-plugin-win64 this is done inside the build/plugins/plugin/* section of the pom.xml. I don't have an example to hand but Eclipse m2e pom.xml editor allow quick and easy exclusion. Once you have excluded manually add in the additional dependency for the qtjambi-maven-plugin-win32. It is my understanding the platform depedent part provides an EXE that can be run and since all Win64 supports execution of Win32 binaries then using Win32 should be ok.

仅供参考

http://repository.qt-jambi.org/nexus/content/repositories/releases-before-2011/net/sf/qtjambi/qtjambi-maven-plugin-win64/ this is the directory where the 4.6.3.1 win64 version should be.

http://repository.qt-jambi.org/nexus/content/repositories/releases-before-2011/net/sf/qtjambi/qtjambi-maven-plugin-win32/4.6.3.1/ this is where the 4.6.3.1 win32 plugin actually is.

[2013年2月编辑-替换" http://qt-jambi.org/maven2/"和" http://repository.qt-jambi. org/nexus/content/repositories/releases-before-2011/",这是当前网址]

这篇关于将Maven与QT Jambi一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆