1

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:

[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]

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!

Yrlec
  • 3,401
  • 6
  • 39
  • 75
  • Which version of maven? The above snippet successfully downloads and runs plugin on my maven-3.0.3 on windows 7. In fact removing the `checksumPolicy` results in a `WARNING` but continues. – Raghuram Nov 30 '11 at 12:27
  • Maven 3.0.3 and Win 7 (64-bit). – Yrlec Nov 30 '11 at 13:18
  • Not that this will fix your problem, but the SF maven2 repo is due to be obsoleted and replaced with nexus repo we have installed. All the artifacts from the SF should be in this repo "releases-before-2011". There is nothing as yet in the "release" but there will be over the next few weeks as I am in the final stages of producing 4.7.4beta4 for all platforms. http://repository.qt-jambi.org/nexus/index.html#view-repositories and http://repository.qt-jambi.org/nexus/content/repositories/releases-before-2011/ – Darryl Miles Nov 30 '11 at 17:19
  • I don't have much experience with the existing Maven plugin to assist application development. One point I remember when I evaluated it, is that it may require a binary EXE on the system to do particular tasks. I have a number of QtJambi plugins in my own local tree at some point in 2012 I shall get those things published but the main goal initially is maven compatible releases that can be consumed directly from the nexus repo. – Darryl Miles Nov 30 '11 at 17:26

1 Answers1

2

FYI the is no win64 version of 4.6.3.1.

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.

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.

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 options on a solution to fix (pick one)

1) Use version 4.6.3

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.

FYI

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.

[Edited Feb 2013 - to replace "http://qt-jambi.org/maven2/" with "http://repository.qt-jambi.org/nexus/content/repositories/releases-before-2011/" this is the current URL]

Darryl Miles
  • 4,576
  • 1
  • 21
  • 20