Locally on the machine i have an Artifactory installed with maven repositories, and i have a very simple .pom file for my project which points to it:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>MYGROUP</groupId>
<artifactId>NAME</artifactId>
<packaging>jar</packaging>
<version>VERSION</version>
<build>
<sourceDirectory>SRCFOLDER</sourceDirectory>
<testSourceDirectory>TESTFOLDER</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>local-artifactory</id>
<name>Artifactory</name>
<url>http://localhost:8081/artifactory/repo</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>local-artifactory-plugins</id>
<name>Artifactory Plugins</name>
<url>http://localhost:8081/artifactory/repo</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>MYGROUP</groupId>
<artifactId>DEPENDENCY1</artifactId>
<version>bla-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>MYGROUP</groupId>
<artifactId>DEPENDENCY2</artifactId>
<version>bla-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
So i have local-artifactory repository declared with the intention that it will reload everything every time. Also i have couple of dependencies which are SNAPSHOTS.
Now i'm using maven 3.0.5, and when i'm compiling it it works fine, but it's not refreshing snapshots at all. Never. Ever. Log file looks like this:
[DEBUG] Could not find metadata MYGROUP:DEPENDENCY1:bla-SNAPSHOT/maven-metadata.xml in local (/opt/myuser/.m2/repository)
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://localhost:8081/artifactory/repo
Downloading: http://localhost:8081/artifactory/repo/MYGROUP/DEPENDENCY1/bla-SNAPSHOT/maven-metadata.xml
Downloaded: http://localhost:8081/artifactory/repo/MYGROUP/DEPENDENCY1/bla-SNAPSHOT/maven-metadata.xml (314 B at 13.9 KB/sec)
[DEBUG] Writing resolution tracking file /opt/myuser/.m2/repository/MYGROUP/DEPENDENCY1/bla-SNAPSHOT/resolver-status.properties
[DEBUG] Could not find metadata MYGROUP:DEPENDENCY1:bla-SNAPSHOT/maven-metadata.xml in local (/opt/myuser/.m2/repository)
[DEBUG] Skipped remote update check for MYGROUP:DEPENDENCY1:bla-SNAPSHOT/maven-metadata.xml, already updated during this session.
So it constantly complains that it can't find local maven-medatada.xml and of course he's completely right - it's not there. And fails to do ANYTHING with it.
So i've tried to use dependency:purge-local-repository to purge local inventory and guess what? Apparently it can't purge it because there is no maven-metadata.xml in each artifact, what an amazing functionality!
Each .m2 artifact directory apart of .jar and .pom contains maven-metadata-local-artifactory.xml(with the correct copy of maven-metadata.xml from the artifactory, current), _mave.repositories and resolver-status.properties.
Maven is just out of the box, there is no configuration in .m2 and the configuration in the /conf folder is default without any single change.
UPDATE: I've just manually downloaded maven-metadata.xml from the artifactory and placed it as maven-metadata.xml inside .m2 for a dependency - no effect, it is still "missing" it. So i don't have any idea what it wants from me anymore. It just can't update dependencies because "already updated during this session". Well i don't know what it updated exactly, but apparently something else.
UPDATE2: Contents of maven-metadata.xml on the server:
<metadata>
<groupId>MYGROUP</groupId>
<artifactId>DEPENDENCY1</artifactId>
<version>bla-SNAPSHOT</version>
<versioning>
<snapshot>
<buildNumber>1</buildNumber>
</snapshot>
<lastUpdated>20130322155759</lastUpdated>
</versioning>
</metadata>
My maven complained that it can not find metadata in local, blah blah... and basically, what happened is that i managed to unplug my power cable in mid-maven-build and its metadata in the relevant local .m2 subdirectory got corrupted. I went in, deleted the artifacts in question from from their .m2 location and re-tried the build. All worked fine. Just wanted to leave this message for those that have a similar problem to mine, but stumbled upon your question.
From the maven metadata xml file it looks like you are using non-unique snapshot in your repository. Maven 3 does not supports non-unique, only snapshot pom file with TIMESTAMP-BUILDNUMBER instead of SNAPSHOT. Do you have:
http://localhost:8081/artifactory/repo/MYGROUP/DEPENDENCY1/bla-SNAPSHOT/DEPENDENCY1-bla-XXXXX-Y.pom
file?
Related
I'm able to deploy my project to my remote server like this:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>myproject</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh-external</artifactId>
<version>3.0.0</version>
</extension>
</extensions>
</build>
<distributionManagement>
<repository>
<id>internal</id>
<url>scpexe://maven#myserver.com/home/maven</url>
</repository>
</distributionManagement>
</project>
But (as you can see) I'm forced to specify the home directory of the maven user on my server. Usually when I use scp I can simply use scp somefile.txt me#myserver.com: and the file is transferred to the home directory of the user on my server. But if I try something similar in the pom.xml:
<distributionManagement>
<repository>
<id>internal</id>
<url>scpexe://maven#myserver.com:</url>
</repository>
</distributionManagement>
I get this error message:
Execution default-deploy of goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy failed: For input string: "" -> [Help 1]
If I try this:
<distributionManagement>
<repository>
<id>internal</id>
<url>scpexe://maven#myserver.com</url>
</repository>
</distributionManagement>
then Maven tries creating the repo structure and deploying the artifact directly to the server root directory. So I get this error message:
Error executing command for transfer: Exit code 1 - mkdir: cannot create directory ‘//com’: Permission denied -> [Help 1]
Is there a way to specify the maven repository as residing in the users home directory without having to manually specify where the home directory is?
The Maven configuration file uses a different syntax. What your example shows is this
<url>scpexe://maven#myserver.com/home/maven</url>
So by extension what you want is this
<url>scpexe://maven#myserver.com/</url>
You could try using the $HOME environment variable like so
<distributionManagement>
<repository>
<id>internal</id>
<url>scpexe://maven#myserver.com:$HOME</url>
</repository>
</distributionManagement>
OR if that doesn't work maybe this might?
<distributionManagement>
<repository>
<id>internal</id>
<url>scpexe://maven#myserver.com:~</url>
</repository>
</distributionManagement>
Of course this is assuming you're running Linux as well.
you must add port number before $HOME
<url>scpexe://maven#myserver.com:22/$HOME</url>
I get the following Exception when i use the Primefaces Maven Repository
mvn clean spring-boot:run
[ERROR] Failed to execute goal on project Passwortmanager: Could not resolve dependencies for project org.dominik:Passwortmanager:jar:2.0.3: Failed to collect dependencies at org.primefaces.themes:all-themes:jar:1.0.10: Failed to read artifact descriptor for org.primefaces.themes:all-themes:jar:1.0.10: Could not transfer artifact org.primefaces.themes:all-themes:pom:1.0.10 from/to prime-repo (https://repository.primefaces.org): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]
My POM.xml
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.dominik</groupId>
<artifactId>Passwortmanager</artifactId>
<packaging>jar</packaging>
<version>2.0.3</version>
<repositories>
<repository>
<id>prime-repo</id>
<name>PrimeFaces Maven Repository</name>
<url>https://repository.primefaces.org</url>
<layout>default</layout>
</repository>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/libs-snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.primefaces.themes</groupId>
<artifactId>all-themes</artifactId>
<version>${primefaces.theme.version}</version>
</dependency>
</dependencies>
<finalName>Passwortmanager</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
The official Primefaces Showcase doesn't work too: https://github.com/primefaces/showcase
On Mac and Windows, update your JDK from Oracle, for sure java full version "1.8.0_131-XXX" works on the Mac and Windows. Mac and Windows versions of the JDK generally do not use the system certificate stores instead they have their own.
For Linux, apt-get ca-certificates which will in turn update the Java certificates if you had the ca-certificates-java installed.
The new certificates will work with repository.primefaces.org
Add pom.xml:
<dependency>
<groupId>org.primefaces.themes</groupId>
<artifactId>all-themes</artifactId>
<version>1.0.10</version>
</dependency>
<repositories>
<repository>
<id>primefaces-maven-repository</id>
<name>PrimeFaces Maven Repository</name>
<url>https://repository.primefaces.org</url>
</repository>
</repositories>
Run Maven -> Update Project (check Force Update)
Alternative solution:
Remove repository PrimeFaces (https://repository.primefaces.org) pom.xml
Download JAR Theme: https://repository.primefaces.org/org/primefaces/themes/all-themes/1.0.10/all-themes-1.0.10.jar
Run command (command-line or IDE): mvn install:install-file -Dfile=all-themes-1.0.10.jar -DgroupId=org.primefaces.themes -DartifactId=all-themes -Dversion=1.0.10 -Dpackaging=jar
Maven - Update Project
To make it simple, websites/services which are providing their services through a secure channel (secure http/https), need to have their certification added so their clients can trust them.
The repository "https://repository.primefaces.org" uses let's encrypt certification. The funny thing is that usually, you can open the link in a browser but java throws security exceptions, that is because it stores its certificates in a separate place (this is the case for me: Windows7, Oracle java 1.8.0_92). It stores certifications in the {jre_PATH}/lib/security.
However, you should note that there are two jre directories and since we use JDK at build time, therefore we should add the new certificate to jre in the jdk directory.
To add the new certification open "https://repository.primefaces.org" in a browser (firefox) and export certification. (I chose X.509 certification with chain), Then you need to add it in keystore:
keytool -keystore cacerts -importcert -file [NAME_OF_CERT_FILE]
Then enter the pass (default pass is "changeit")
That is it :)
I am trying to develop a custom connector for mule by following http://www.mulesoft.org/documentation/display/current/Creating+a+Connector+Project tutorial.
As shown in the tutorial, I am creating the project through command line by executing
mvn archetype:generate
-DarchetypeGroupId=org.mule.tools.devkit
-DarchetypeArtifactId=mule-devkit-archetype-cloud-connector
-DarchetypeVersion=3.4.3
-DgroupId=org.hello
-DartifactId=hello-connector
-Dversion=1.0-SNAPSHOT
-DmuleConnectorName=Hello
-Dpackage=org.hello
-DarchetypeRepository=http://repository.mulesoft.org/releases
After importing the project to mule studio I am getting following error in my pom.xml file near the parent tag.
Project build error: Non-resolvable parent POM:
Could not transfer artifact
org.mule.tools.devkit:mule-devkit-parent:pom:3.4.3 from/to
mulesoft-releases (http://repository.mulesoft.org/releases/):
connection timed out to
http://repository.mulesoft.org/releases/org/mule/tools/devkit/mule-devkit-parent/3.4.3/mule-devkit-parent-3.4.3.pom
and 'parent.relativePath' points at wrong local POM.
Here is my pom.xml file.
<?xml version="1.0" encoding="UTF-8"?>
project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.hello</groupId>
<artifactId>hello-connector</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>mule-module</packaging>
<name>Hello Connector</name>
<parent>
<groupId>org.mule.tools.devkit</groupId>
<artifactId>mule-devkit-parent</artifactId>
<version>3.4.3</version>
</parent>
<properties>
<junit.version>4.9</junit.version>
<mockito.version>1.8.2</mockito.version>
<jdk.version>1.7</jdk.version>
<category>Community</category>
<licensePath>LICENSE.md</licensePath>
<devkit.studio.package.skip>false</devkit.studio.package.skip>
</properties>
<scm>
<connection>scm:git:git://github.com:mulesoft/hello-connector.git</connection>
<developerConnection>scm:git:git#github.com:mulesoft/hello-connector.git</developerConnection>
<url>http://github.com/mulesoft/hello-connector</url>
</scm>
<repositories>
<repository>
<id>mulesoft-releases</id>
<name>MuleSoft Releases Repository</name>
<url>http://repository.mulesoft.org/releases/</url>
<layout>default</layout>
</repository>
<repository>
<id>mulesoft-snapshots</id>
<name>MuleSoft Snapshots Repository</name>
<url>http://repository.mulesoft.org/snapshots/</url>
<layout>default</layout>
</repository>
</repositories>
</project>
I have changed the jdk version to 1.7. it was 1.6 in the auto generated pom.
ignore any error in the heading, some formatting issue.
I have tried various solutions mentioned on here but am not able to resolve the issue.
There is probably a firewall between your computer and the internet. You either have to configure Java to use this proxy.
Or you must download the parent POM manually and install it yourself into the local m2 repo. See this question how to do that: How to manually install an artifact in Maven 2?
Since you only need to install a POM, you need to trick mvn install:install-file:
mvn install:install-file -Dfile=<path-to-pomfile> -Dpackaging=pom -DpomFile=<path-to-pomfile>
This command will just install the POM itself.
I have a multi-module maven project that I can't get to compile. I have a Nexus repository sitting on my local network, and it is working (IntelliJ Idea is able to resolve my dependencies which reside only in that repository), and I am building through Jetbrains TeamCity. I am fairly certain that TeamCity is working since several other build configurations I have set up still work (using the same settings.xml). I am a bit of a loss for what could be causing the issue. Here are my pom files:
Parent pom:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.company.product.plugins</groupId>
<artifactId>plugin-parent</artifactId>
<version>1.2-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>product-wireless-plugin</module>
<module>product-paging-plugin</module>
</modules>
<distributionManagement>
<repository>
<id>releases</id>
<url>http://192.168.2.192:8081/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<url>http://192.168.2.192:8081/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<pluginRepositories>
<pluginRepository>
<id>autoincrement-versions-maven-plugin</id>
<name>autoincrement-versions-maven-plugin</name>
<url>http://autoincrement-versions-maven-plugin.googlecode.com/svn/repo</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>autoincrement-versions-maven-plugin</artifactId>
<version>2.0-SNAPSHOT</version>
<executions>
<execution>
<id>update-pom-versions</id>
<goals>
<goal>increment</goal>
<goal>commit</goal>
</goals>
<phase>compile</phase>
<configuration>
<autoIncrementVersion>true</autoIncrementVersion>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
</plugins>
</build>
</project>
product-wireless pom:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>plugin-parent</artifactId>
<groupId>com.company.product.plugins</groupId>
<version>1.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.company.product.plugins</groupId>
<artifactId>product-wireless-plugin</artifactId>
<version>0.1.2</version>
<distributionManagement>
<repository>
<id>releases</id>
<url>http://192.168.2.192:8081/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<url>http://192.168.2.192:8081/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>com.company.product</groupId>
<artifactId>product-common</artifactId>
<version>0.9.1</version>
</dependency>
</dependencies>
</project>
product-paging pom:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>plugin-parent</artifactId>
<groupId>com.company.product.plugins</groupId>
<version>1.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.company.product.plugins</groupId>
<artifactId>product-paging-plugin</artifactId>
<version>0.1.2</version>
<distributionManagement>
<repository>
<id>releases</id>
<url>http://192.168.2.192:8081/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<url>http://192.168.2.192:8081/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>com.company.product</groupId>
<artifactId>product-common</artifactId>
<version>0.9.1</version>
</dependency>
</dependencies>
</project>
And the error I am getting is:
com.company.product.plugins:product-wireless-plugin
[13:54:16][com.company.product.plugins:product-wireless-plugin] Importing data from 'C:/TeamCity/buildAgent/work/40ac813105cf8bd7/product-wireless-plugin/target/surefire-reports/TEST-*.xml' with 'surefire' processor
[13:54:16][com.company.product.plugins:product-wireless-plugin] Surefire report watcher
[13:54:16][com.company.product.plugins:product-wireless-plugin] Downloading: repolocation/nexus/content/groups/public/com/company/product/product-parent/0.9.0/product-parent-0.9.0.pom
[13:54:16][com.company.product.plugins:product-wireless-plugin] Failed to execute goal on project product-wireless-plugin: Could not resolve dependencies for project com.company.product.plugins:product-wireless-plugin:jar:0.1.2: Failed to collect dependencies for [com.company.product:product-common:jar:0.9.1 (compile)]
I am at quite a loss while trying to debug this... does anyone have any suggestions?
There are several approaches / tools for troubleshooting this sort of problem.
For this "could not resolve dependencies" error, there is almost always a more detailed error message and/or stacktrace earlier in the build log. Maven logs are actually extremely verbose, to the point of having to search for the "root" error message several screens up from the build failure.
Re-run the build with the -X flag. Here is documentation of Maven command line switches
Another option is to use mvn dependency:tree to inspect the full graph of transitive dependencies. mvn help:effective-pom is another useful tool that prints out the pom.xml after considering your settings.xml, any active profiles, etc. Likewise mvn help:active-profiles
There are many problems in your multi-module build. The most important one is that you define a dependency:
<dependencies>
<dependency>
<groupId>com.company.product</groupId>
<artifactId>product-common</artifactId>
<version>0.9.1</version>
</dependency>
</dependencies>
which seemed either not be existing in a repository or you have not access to the repository which contains it or your download has failed based on whatever reason (can't guess!). Are you using a repository manager like Artifactory, Nexus, Archiva? If not i recommend to start using one.
Apart from that you are using different versions for parent and the module in wireless-module:
<parent>
<artifactId>plugin-parent</artifactId>
<groupId>com.company.product.plugins</groupId>
<version>1.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.company.product.plugins</groupId>
<artifactId>product-wireless-plugin</artifactId>
<version>0.1.2</version>
A multi module build should define the version only via the parent and not within the artifact which means the above should look like this:
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>plugin-parent</artifactId>
<groupId>com.company.product.plugins</groupId>
<version>1.2-SNAPSHOT</version>
</parent>
<groupId>com.company.product.plugins</groupId>
<artifactId>product-wireless-plugin</artifactId>
The module should not define a version itself, cause it will inherit it from the parent. Furthermore you can see that you have a module which defines a release version (1.2) whereas the parent defines a SNAPSHOT version. An application/modules which are under development should define a version which is a SNAPSHOT version which means a thing like 1.2-SNAPSHOTetc.
The same applies accordingly for the definition of the distributionManagement. This should be defined only once in the parent of the project.
BTW. If you have several project the best is to define a company parent which contains some default definitions like distributionManagement, pluginManagement, dependencyManagement etc.
Ok, I have solved the problem thanks to input from #noahlz. After utilizing the -X flag to debug my build, I was finding that the parent pom of "product-common" (product-parent) could not be found. After browsing my Sonatype Nexus repository, I discovered that my build system was only publishing new versions of the parent pom when new modules were added to it. So, even though my parent pom was on version 0.9.0, the repository had the latest version as 0.6.1. I suppose the "product-common" library was compiling correctly because it had access to the parent pom (with the 0.9.0 version number) at compile time. Either way, changing the parent pom version in "product-common" to point to the most recent in the repository resolved my build issues with my plugins.
I am wanting to create UI with qt-jambi, but i have a problem.
i am using maven in eclipse, and create a maven project, and i downloaded and installed 3rd party qt-jambi jar files in my local repository from here:
http://old.qt-jambi.org/maven2/net/sf/qtjambi/
and below files:
(1) qtjambi-maven-plugin-linux32-4.5.2_01.jar
(2) qtjambi-platform-linux32-4.5.2_01.jar
i am using ubuntu 12.10(32bit) and Maven 3.0.4.
My maven repository(m2 home)path for qt-jambi is like below:
/home/mehdi/.m2/repository/net/sf/qtjambi/qtjambi/4.5.2_01/qtjambi-4.5.2_01.jar
/home/mehdi/.m2/repository/net/sf/qtjambi/qtjambi-maven-plugin-linux32/4.5.2_01/qtjambi-maven-plugin-linux32-4.5.2_01.jar
so i add this lines to my pom.xml: http://old.qt-jambi.org/users/maven-repository/
my pom.xml file is:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.iyasin</groupId>
<artifactId>iycTest</artifactId>
<version>2.0</version>
<packaging>jar</packaging>
<name>iycTest</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>net.sf.qtjambi</groupId>
<artifactId>qtjambi</artifactId>
<version>4.5.2_01</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>net.sf.qtjambi</groupId>
<artifactId>qtjambi-maven-plugin-linux32</artifactId>
<executions>
<execution>
<id>qtjambi</id>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<sourcesDir>src/main/java</sourcesDir>
<noObsoleteTranslations>true</noObsoleteTranslations>
</configuration>
</plugin>
</plugins>
</build>
</project>
and when run mvn test or mvn compile return me below error:
Failed to parse plugin descriptor for net.sf.qtjambi:qtjambi-maven-plugin-linux32:4.5.2_01 (/home/mehdi/.m2/repository/net/sf/qtjambi/qtjambi-maven-plugin-linux32/4.5.2_01/qtjambi-maven-plugin-linux32-4.5.2_01.jar): No plugin descriptor found at META-INF/maven/plugin.xml -> [Help 1]
You need to add into the relevant part of your POM:
<pluginRepositories>
<pluginRepository>
<id>qtjambi-releases-before-2011</id>
<name>QtJambi (Releases Before 2011)</name>
<url>http://repository.qt-jambi.org/nexus/content/repositories/releases-before-2011</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
The above can be put into your settings.xml or project POM.
You should really run a local repository proxy (such as Nexus or Artifactory). Then setup your settings.xml to point to that local repository. Then configure it to cache central and qtjambi and other repositories you use. However that benefits of this are too long to go into here, best to research the topic with google.