Transitive dependencies not resolved with maven dependency and tycho pomConsider option - maven
I try to create an eclipse plugin using OSGI dependencies from two repositories, one with maven dependencies, and one with p2 dependencies :
<repositories>
<repository>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>bintray-anrgenstar-genstar-packages</id>
<name>bintray</name>
<url>http://dl.bintray.com/anrgenstar/genstar-packages</url>
</repository>
</repositories>
<repository>
<id>gama</id>
<name>GAMA Snapshots</name>
<url>http://gama.unthinkingdepths.fr</url>
<layout>p2</layout>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
The project contain one parent pom.xml into ummisco.gaml.extensions.parent, which build the eclipse plugin ummisco.gaml.extensions.genstar :
(1) ummisco.gaml.extensions.parent
pom.xml
(2) ummisco.gaml.extensions.genstar
pom.xml
src/...
META-INF/MANIFEST.MF
(1) The ummisco.gaml.extensions.genstar parent pom.xml define the module <module>../ummisco.gaml.extensions.genstar</module> to build and call the Tycho maven plugin :
<modelVersion>4.0.0</modelVersion>
<groupId>ummisco.gaml.extensions</groupId>
<artifactId>ummisco.gaml.extensions.parent</artifactId>
<version>1.7.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>../ummisco.gaml.extensions.genstar</module>
</modules>
<properties>
<p2-maven.version>1.2.0-SNAPSHOT</p2-maven.version>
<tycho.version>0.26.0</tycho.version>
<project.version>1.7.0-SNAPSHOT</project.version>
</properties>
<repositories>
<repository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>eclipse-mars</id>
<url>http://download.eclipse.org/releases/mars</url>
<layout>p2</layout>
</repository>
<repository>
<id>eclipse-elk</id>
<url>http://build.eclipse.org/modeling/elk/updates/nightly/</url>
<layout>p2</layout>
</repository>
<repository>
<id>eclipse-graphiti</id>
<url>http://download.eclipse.org/graphiti/updates/milestones/</url>
<layout>p2</layout>
</repository>
<repository>
<id>gama</id>
<name>GAMA Snapshots</name>
<url>http://gama.unthinkingdepths.fr</url>
<layout>p2</layout>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho.version}</version>
<extensions>true</extensions>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-director-plugin</artifactId>
<version>${tycho.version}</version>
</plugin>
</plugins>
</build>
</project>
(2) The eclipse-plugin pom.xml of ummisco.gaml.extensions.genstar which need p2 and maven dependencies to work use the tycho <pomDependencies>consider</pomDependencies> option.
<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>ummisco.gaml.extensions.genstar</groupId>
<artifactId>ummisco.gaml.extensions.genstar</artifactId>
<packaging>eclipse-plugin</packaging>
<parent>
<groupId>ummisco.gaml.extensions</groupId>
<artifactId>ummisco.gaml.extensions.parent</artifactId>
<version>1.7.0-SNAPSHOT</version>
<relativePath>../ummisco.gaml.extensions.parent/</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>genstar.core</groupId>
<artifactId>core</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>genstar.spll</groupId>
<artifactId>spll</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>genstar.spin</groupId>
<artifactId>spin</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>genstar.gospl</groupId>
<artifactId>gospl</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
<repositories>
<repository>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>bintray-anrgenstar-genstar-packages</id>
<name>bintray</name>
<url>http://dl.bintray.com/anrgenstar/genstar-packages</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho.version}</version>
<configuration>
<resolver>p2</resolver>
<pomDependencies>consider</pomDependencies>
</configuration>
</plugin>
</plugins>
</build>
</project>
The MANIFEST.MF for this eclipse-plugin is defined like that :
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Genstar
Bundle-SymbolicName: ummisco.gaml.extensions.genstar;singleton:=true
Bundle-Version: 1.7.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: msi.gama.core, core, gspl, spin, spll,
javax.xml;bundle-version="1.3.4"
When i try to mvn clean install into ummisco.gaml.extensions.parent it seems that tycho download and recognize the dependencies defined in p2 (msi.gama.core for example), and defined in pom.xml (core, spll,gospl, spin OSGI bundle), but transitive dependencies of these bundles are not resolved.
[INFO] Fetching p2.index from http://gama.unthinkingdepths.fr/ (172B)
[INFO] Adding repository http://gama.unthinkingdepths.fr
[INFO] Resolving dependencies of MavenProject: ummisco.gaml.extensions.genstar:ummisco.gaml.extensions.genstar:1.7.0-SNAPSHOT # /home/reyman/Projets/genstar-gama-plugin/ummisco.gaml.extensions.genstar/pom.xml
[INFO] {osgi.os=linux, osgi.ws=gtk, org.eclipse.update.install.features=true, osgi.arch=x86_64}
[ERROR] Cannot resolve project dependencies:
[ERROR] Software being installed: ummisco.gaml.extensions.genstar 1.7.0.qualifier
[ERROR] Missing requirement: core 1.0.0 requires 'package org.math.R 0.0.0' but it could not be found
[ERROR] Cannot satisfy dependency: ummisco.gaml.extensions.genstar 1.7.0.qualifier depends on: bundle core 0.0.0
[ERROR]
I verify the transitive dependencies of the OSGI Bundle core 1.0.0 manifest (using mvn dependency:tree) and it seems correct, the manifest contain the declaration of dependencies in Import-Package, like org.math.R as you can see here :
Manifest-Version: 1.0
Bnd-LastModified: 1481896487741
Build-Jdk: 1.8.0_101
Built-By: reyman
Bundle-ManifestVersion: 2
Bundle-Name: core
Bundle-SymbolicName: core
Bundle-Version: 1.0
Created-By: Apache Maven Bundle Plugin
Export-Package: core.configuration;version="1.0.0";uses:="com.thoughtw
orks.xstream,core.metamodel,core.metamodel.pop,core.metamodel.pop.io"
,core.metamodel;version="1.0.0",core.metamodel.geo;version="1.0.0";us
es:="com.vividsolutions.jts.geom,core.metamodel",core.metamodel.geo.i
o;version="1.0.0";uses:="com.vividsolutions.jts.geom,core.metamodel.g
eo",core.metamodel.pop;version="1.0.0";uses:="com.vividsolutions.jts.
geom,core.metamodel,core.metamodel.geo,core.util.data",core.metamodel
.pop.io;version="1.0.0",core.util;version="1.0.0";uses:="org.apache.l
ogging.log4j",core.util.R;version="1.0.0";uses:="org.math.R",core.uti
l.data;version="1.0.0";uses:="core.util.excpetion",core.util.excpetio
n;version="1.0.0",core.util.random;version="1.0.0",core.util.random.r
oulette;version="1.0.0",core.util.stats;version="1.0.0"
Import-Package: com.thoughtworks.xstream;version="[1.4,2)",com.thought
works.xstream.converters;version="[1.4,2)",com.thoughtworks.xstream.c
onverters.extended;version="[1.4,2)",com.thoughtworks.xstream.io;vers
ion="[1.4,2)",com.thoughtworks.xstream.io.xml;version="[1.4,2)",com.t
houghtworks.xstream.mapper;version="[1.4,2)",com.vividsolutions.jts.g
eom,core.metamodel;version="[1.0,2)",core.metamodel.geo;version="[1.0
,2)",core.metamodel.pop;version="[1.0,2)",core.metamodel.pop.io;versi
on="[1.0,2)",core.util.data;version="[1.0,2)",core.util.excpetion;ver
sion="[1.0,2)",core.util.random;version="[1.0,2)",org.apache.logging.
log4j;version="[2.7,3)",org.math.R,org.rosuda.REngine,org.rosuda.REng
ine.Rserve
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
Tool: Bnd-3.2.0.201605172007
I really don't understand why the transitive dependencies are not automaticly resolved by tycho using the pom.xml dependency ... If tycho recognized the core, spll, spin, etc. package in the eclipse-plugin MANIFEST, why the transitive dependencies of core, spll, spin, gospl OSGI bundle are not downloaded ?
Do you think there is a solution for this problem ?
UPDATE
Following this repository i try to make two project :
maven-bundle which bundle all dependencies into one big jar
tycho-bundle which take this maven-bundle in dependency
Intelij Idea found the different dependency class when i compile in GUI mode, but not my maven project when i run mvn install, it's really really weird... I don't understand where is the problem.
You can find the archive of the project here, you need to mvn clean install pom.xml into /maven-bundle/ folder, then mvn clean install pom.xml into tycho-bundle/ folder.
Related
mvn release plugin releasing next snapshot not current release
Hello I've been releasing a project from my workstation with no problems. I've recently tried releasing another project from 1.0.0-SNAPSHOT. However when it actually does the release it releases 1.0.1-SNAPSHOT to the snapshots repository instead of 1.0.0 to releases repository. I've done dryRun=true and it seems fine. In fact it defaults me to the versions: What is the release version for "Appname"? (...) 1.0.0: : What is SCM release tag or label for "Appname"? (...) Appname-1.0.0: : What is the new development version for "Appname"? (...) 1.0.1-SNAPSHOT: : I take all the defaults. However when i do the "mvn release:perform" This is what it does: [INFO] Uploading: http://{corporate-nexus-site}/snapshots/{app-path}/1.0.1-SNAPSHOT/fei-logging-formatter-1.0.1-20140929.153303-1.jar ... [INFO] [INFO] BUILD SUCCESS I'm using latest maven and i manually added latest release plugin. And I can release another project using same parent and settings.xml setup. Looking at the properties file after a dryrun and prepare it all looks right to me. I thought originally i had my distribution set up wrong, and was releasing a release to the snapshot repository, but as you can see its actually thinking its doing a good job and releasing a snapshot. confused royally. Any ideas on what to try? thanks. UPDATE: In the project I updated the pom from 1.0.0-SNAPSHOT to 1.0.0 and did a "mvn deploy" and it put it exactly where I expected in releases, without out all the goodies of course. UPDATE2: Pom (company name to protect the guilty) <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>logging-formatter</groupId> <artifactId>logging-formatter</artifactId> <version>1.0.0-SNAPSHOT</version> <name>Logging Formatter</name> <description>logging tool to format your logging in the standard cn way.</description> <parent> <groupId>com.companyname.pom.parent.master</groupId> <artifactId>cn-pom-parent-master</artifactId> <version>2014.3.0</version> </parent> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.3.2</version> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> <scope>test</scope> </dependency> </dependencies> <build> </build> <scm> <url>http://svn.sys.ds.companyname.com/svn/cn-logging</url> <connection>scm:svn:http://svn.sys.ds.companyname.com/svn/cn-logging</connection> <developerConnection>scm:svn:http://svn.sys.ds.companyname.com/svn/cn-logging</developerConnection> </scm> <organization> <name>CompanyName Enterprises</name> </organization> <ciManagement> <system>Jenkins</system> <url>http://jenkins.sys.ds.companyname.com:8080/job/cn-logging-DEVELOP/</url> </ciManagement> </project> UPDATE3: Adding parent settings info SETTINGS.XML <repositories> <repository> <id>fei-releases</id> <name>Ferguson Release Repository</name> <releases> <enabled>true</enabled> <updatePolicy>always</updatePolicy> <checksumPolicy>warn</checksumPolicy> </releases> <snapshots> <enabled>false</enabled> <updatePolicy>never</updatePolicy> <checksumPolicy>fail</checksumPolicy> </snapshots> <url>http://{companyname}/nexus/content/repositories/releases</url> <layout>default</layout> </repository> <repository> <id>fei-snapshots</id> <name>Ferguson Snapshot Repository</name> <releases> <enabled>false</enabled> <updatePolicy>always</updatePolicy> <checksumPolicy>warn</checksumPolicy> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>always</updatePolicy> <checksumPolicy>warn</checksumPolicy> </snapshots> <url>http://{companyname}/nexus/content/repositories/snapshots/</url> <layout>default</layout> </repository> <repository> <id>fei-thirdparty</id> <name>Ferguson 3rd Party Repository</name> <releases> <enabled>true</enabled> <updatePolicy>always</updatePolicy> <checksumPolicy>warn</checksumPolicy> </releases> <snapshots> <enabled>false</enabled> <updatePolicy>never</updatePolicy> <checksumPolicy>fail</checksumPolicy> </snapshots> <url>http://{companyname}/nexus/content/repositories/thirdparty/</url> <layout>default</layout> </repository> </repositories> PARENT REPOSITORIES: <repositories> <repository> <id>third-party</id> <name>3rd Party Repository</name> <url>http://{companyname}/nexus/content/repositories/thirdparty/</url> <layout>default</layout> </repository> </repositories> <pluginRepositories/> PARENT DISTRIBUTION MANAGEMENT: <distributionManagement> <repository> <id>fei-releases</id> <name>Ferguson Release Repository</name> <url>http://{companyname}/nexus/content/repositories/releases</url> <layout>default</layout> </repository> <snapshotRepository> <id>fei-snapshots</id> <name>Ferguson Snapshot Repository</name> <url>http://{companyname}/nexus/content/repositories/snapshots</url> <layout>default</layout> </snapshotRepository> </distributionManagement>
i did a "mvn release:clean release:prepare" then a "mvn release:perform" Same steps I used to release another project without issue using the same parent. So you have another project that is deployed fine after release? (you see the release version in the repo)? If so, it sounds like an issue in your 'problematic' project. Can you share its pom.xml?
#SteveHolt, I see a red flag in your pom.xml file: <scm> <url>http://svn.sys.ds.companyname.com/svn/cn-logging</url> <connection>scm:svn:http://svn.sys.ds.companyname.com/svn/cn-logging</connection> <developerConnection>scm:svn:http://svn.sys.ds.companyname.com/svn/cn-logging</developerConnection> </scm> None of these urls contain the trunk, branches, or tags keywords. Consequently, when Maven creates the release tag, it tells SVN to use the same url as before: http://svn.sys.ds.companyname.com/svn/cn-logging When release-prepare runs, it performs $ svn checkout http://svn.sys.ds.companyname.com/svn/cn-logging/ but it can't tell apart the release tag from the development trunk. Therefore it retrieves the post-release snapshot revision (which is the latest commit) rather than the release revision (the preceding commit). Solution: Create a trunk dir under cn-logging and move all your code into it: svn/cn-logging/ trunk/ pom.xml src/ main/ java/ branches/ tags/ Hope that helps.
Birt viewer to a Maven project for birt 4.3.1
Hi Iam new to birt and maven .Could any one help me how to convert a birt viewer as a maven project which needs be deployed in weblogic.Any suggestion or tutorial links will be a great help. Thanks in Advance.
Create with this folder structure and create xml file named pom.xml . Download the Birt runtime and you can find a birtviewer example (WebViewerExample). .WebViewerExample(Root Folder) .src .main .webapp .WEB-INF .lib .web.xml ..(other files) .new_report_1.rptdesign ...(other files) .pom.xml .target .weblogic-maven-plugin.jar Download BirtReportFramework and copy the jar files having names with 'org.eclipse.birt.report.data.oda' from birt-report-framework-4_3_1\eclipse\plugins to WebViewerExample\src\main\webapp\WEB-INF\lib In command prompt got to Root folder here 'WebViewerExample' and run mvn clean install. If you get maven error for missing or unable to download any jar files .No worries..you google the jar location in the maven website and download the jar manually and real trick is placing the jar at correct place inside your maven repository. For Example if the error is like "[ERROR] Failed to execute goal org.apache.maven.plugins:maven-eclipse-plugin:2.9:eclipse" Go to Maven repository whose path is like .m2\repository\org\apache\maven\plugins\maven-eclipse-plugin\2.9 Inside 2.9 folder place the maven-eclipse-plugin-2.9.jar and maven-eclipse-plugin-2.9.pom. Also try to download and place the dependent jar and pom if the maven not get for you due to some problem.. My pom.xml <?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.webviewer</groupId> <artifactId>WebViewerExample</artifactId> <packaging>pom</packaging> <name>Birt Viewer Maven Project</name> <version>0.0.1-SNAPSHOT</version> <properties> <jdk.version>1.6</jdk.version> <logback.version>1.0.13</logback.version> <junit.version>4.10</junit.version> <spring.version>3.0.5.RELEASE</spring.version> </properties> <repositories> <repository> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>daily</updatePolicy> <checksumPolicy>ignore</checksumPolicy> </snapshots> <id>sonatype-nexus-snapshots</id> <name>Sonatype Nexus Snapshots</name> <url>https://oss.sonatype.org/content/repositories/snapshots</url> </repository> <repository> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> <updatePolicy>daily</updatePolicy> <checksumPolicy>ignore</checksumPolicy> </snapshots> <id>sonatype-nexus-releases</id> <name>Sonatype Nexus Snapshots</name> <url>https://oss.sonatype.org/content/repositories/releases</url> </repository> </repositories> <dependencies> <dependency> <groupId>org.eclipse.birt.runtime</groupId> <artifactId>org.eclipse.birt.runtime</artifactId> <version>4.3.1.v20130918-1142</version> <!--<version>4.3.1</version> --> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>1.0</version> </dependency> </dependencies> <build> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <!-- <packagingIncludes>/*.rptdesign</packagingIncludes> <packagingIncludes>/*.jsp</packagingIncludes> --> <packagingExcludes>WEB-INF/lib/org.apache.xerces-2.9.0.jar</packagingExcludes> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin> <artifactId>maven-war-plugin</artifactId> <version>2.0</version> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>tomcat-maven-plugin</artifactId> <version>1.1</version> <configuration> <url>http://localhost:8080/manager/text</url> <server>Apache_Tomcat_7_x86</server> <path>/birtviewer</path> </configuration> </plugin> </plugins> </build> Thanks, Winds
Repository for maven plugin dependency defined in pom is not used
I switched to a SNAPSHOT version of a plugin I use, and declared the corresponding snapshot repository in the POM like this: <project> <!-- ... --> <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.openjpa</groupId> <artifactId>openjpa-maven-plugin</artifactId> <version>2.3.0-SNAPSHOT</version> </plugin> </plugins> </pluginManagement> </build> <repositories> <repository> <id>apache.snapshots</id> <name>Apache Snapshot Repository</name> <url>http://repository.apache.org/snapshots</url> <releases> <enabled>false</enabled> </releases> </repository> </repositories> </project> Now Maven keeps complaining about not being able to download the plugin from our corporate repository (which does not mirror anything on the internet) - it just ignores the repository defined in the POM.
I forgot (again) that Maven distinguishes between repositories and pluginRepositories. The following code works fine: <project> <!-- ... --> <pluginRepositories> <pluginRepository> <id>apache.snapshots</id> <name>Apache Snapshot Repository</name> <url>http://repository.apache.org/snapshots</url> <releases> <enabled>false</enabled> </releases> </pluginRepository> </pluginRepositories> </project>
no any "plugin descriptor" founded in my maven project
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.
The POM for org.springframework.security:org.springframework.security.web:jar:3.0.5.RELEASE is missing, no dependency information available
When including into pom.xml <dependency> <groupId>org.springframework.security</groupId> <artifactId>org.springframework.security.web</artifactId> <version>3.0.5.RELEASE</version> </dependency> with repositories <repository> <id>com.springsource.repository.bundles.milestone</id> <name>EBR Spring Milestone Repository</name> <url>http://repository.springsource.com/maven/bundles/milestone</url> </repository> <repository> <id>org.springframework.maven.milestone</id> <name>Maven Central Compatible Spring Milestone Repository</name> <url>http://maven.springframework.org/milestone</url> </repository> <repository> <id>com.springsource.repository.bundles.release</id> <name>EBR Spring Release Repository</name> <url>http://repository.springsource.com/maven/bundles/release</url> </repository> <repository> <id>com.springsource.repository.bundles.external</id> <name>EBR External Release Repository</name> <url>http://repository.springsource.com/maven/bundles/external</url> </repository> I get the following error message when doing the maven build: The POM for org.springframework.security:org.springframework.security.web:jar:3.0.5.RELEASE is missing, no dependency information available Other spring libraries are included well. What's going wrong? Thank you for any help. Update I simplified pom.xml to <?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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>test</groupId> <artifactId>test</artifactId> <packaging>jar</packaging> <version>1.0.1</version> <name>test</name> <url>http://test</url> <dependencies> <dependency> <groupId>org.springframework.security</groupId> <artifactId>org.springframework.security.web</artifactId> <version>3.0.5.RELEASE</version> </dependency> </dependencies> <repositories> <repository> <id>com.springsource.repository.bundles.milestone</id> <name>EBR Spring Milestone Repository</name> <url>http://repository.springsource.com/maven/bundles/milestone</url> </repository> <repository> <id>org.springframework.maven.milestone</id> <name>Maven Central Compatible Spring Milestone Repository</name> <url>http://maven.springframework.org/milestone</url> </repository> <repository> <id>com.springsource.repository.bundles.release</id> <name>EBR Spring Release Repository</name> <url>http://repository.springsource.com/maven/bundles/release</url> </repository> <repository> <id>com.springsource.repository.bundles.external</id> <name>EBR External Release Repository</name> <url>http://repository.springsource.com/maven/bundles/external</url> </repository> </repositories> </project> and when calling mvn -U install (forces update check) it gives [ERROR] Failed to execute goal on project test: Could not resolve dependencies for project test:test:jar:1.0.1: Could not find artifact org.springframework.security:org.springframework.security.web:jar:3.0.5.RELEASE in com.springsource.repository.bundles.milestone (http://repository.springsource.com/maven/bundles/milestone)
I see that the repository is properly populated, so the problem is a wrong artifactId. It's spring-security-web, not org.springframework.security.web.
You are using the wrong artifactId. Use this: <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-web</artifactId> <version>3.0.5.RELEASE</version> </dependency> And you don't need any custom repositories, you can find it in Maven Central.
http://static.springsource.org/spring-security/site/petclinic-tutorial.html gives a wrong artificact Id where I copied the dependency from. Interestingly it works with version 3.0.3.RELEASE but not with 3.0.5.RELEASE. Thanks for the hint Sean, I updated the answer.