POM file for Camel - maven

I am trying to compile the sample app for Camel and having problems with the POM file. The POM includes the following yet I am getting error (compile time) that the dependency is missing.
What am I missing here? Thanks!
<properties>
<camel.version>2.16.3</camel.version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring</artifactId>
<version>${camel.version}</version>
</dependency>
</dependencies>

Update the repository (File->Settings->Build->Build Tools->Maven->Repositories->Update-Ok) and reimport the project into IntelliJ.

please add output which contains error.
Most probably, you could have problem with:
you forgot define repository
problem with proxy .m2/settings.xml
something bad with your firewall, try remove current artifact from .m2/repository/org/apache/camel

Try :
Right click project > Maven > Update Project (Select Force Update)

Related

Failed to read artifact descriptor for org.seleniumhq.selenium:selenium-java:jar:3.0.1

Here is my POM.xml
<?xml version="1.0" encoding="UTF-8"?>
http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
<groupId>test3</groupId>
<artifactId>test3</artifactId>
<version>1.0-SNAPSHOT</version>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.15</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.0.1</version>
</dependency>
</dependencies>
The dependencies junit, and org.apache.poi both work, I havn't added any jars to the class path to get them to work either, I believe maven downloaded them just from the pom, my code is also working.
However when I add the org.seleniumhq.selenium dependency I get the error "Failed to read artifact descriptor for org.seleniumhq.selenium:selenium-java:jar:3.0.1" and I am unable to use any classes from webdriver.
Why would it just be this dependency that is not working? What could I try to fix this? I have been scouring stackoverflow and other resources to try and get this to work, any help is greatly appreciated! Thank you
I had the same problem when I was adding dependency for selenium-java-3.0.1.jar, but when I included my 'settings.xml' file path in Global Settings option under 'Windows -> Preferences -> Maven -> User Settings' in eclipse, this issue was resolved.
I had the same issue. In my case it was outdated password for proxy. Check your ${user.home}/.m2/settings.xml just in case.
Delete any existing folders for selenium in .m2 folder and try to save the pom.xml again.
Set your setting.xml file path in your Global Settings and click on apply and then click on apply and close button
(Setting.xml file path) -> C:\Maven\apache-maven-3.8.1\conf\settings.xml
This problem will be solved

pom.xml tomEE 1.6.0

I would like to find/create a pom.xml containing all libraries included in tomEE, using "provided" scope. Goal of this is to make it as "pom parent" of a webproject, and have no risk to use other library version, or other implementation.
Does a such pom.xml exist? or is there a simple way to create it?
thanks in advance
Clément
Because JavaEE is a specification, there are several available.
I use this one for several reasons. This is in my organization's parent pom so all the projects automatically pull it in:
<dependencies>
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0-2</version>
<scope>provided</scope>
</dependency>
</dependencies>
Thanks to exabrial, the maven dependency i was looking for is this one :
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>tomee-webapp</artifactId>
<version>1.6.0</version>
</dependency>

Unable to build the mule maven project

I have created a mule maven project while running the project as : mule application with maven i am getting following error:
Failed to execute goal on project StandaloneTest: Could not resolve dependencies for project com.mycompany:StandaloneTest:mule:1.0.0-SNAPSHOT: Could not find artifact com.mulesoft.muleesb.modules:mule-module-xml:jar:3.4.0 in jboss (http://repository.jboss.com/)
I have following dependency generated by mule studio in my project pom.xml
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-xml</artifactId>
<version>3.5.0-bighorn</version>
</dependency>
<dependency>
<groupId>com.mulesoft.muleesb.modules</groupId>
<artifactId>mule-module-xml</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
do we need com.mulesoft.muleesb.modules.mule-moudle-xml.jar also in order to have a xml module in our flow file since we already have a org.mule.modules.mule-module-xml.jar in our repository.
The appropriate group id for mule-module-xml is org.mule.modules. Trying removing the second dependency.
Try replacing both with this dependency:
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-xml</artifactId>
<version>3.4.0</version>
</dependency>
The dependency is found in any of these 2 Maven repositories:
https://repository.mulesoft.org/nexus/content/groups/public/
https://repository.mulesoft.org/nexus/content/repositories/public/
Please let us know if that works. Thank you!

Maven 'Missing artifact

My local rpository is already has cxf-bundle-2.7.5.jar(download from search.maven.org by myself) and pom but eclipse still get a error 'Missing artifact org.apache.cxf:cxf-bundle:bundle:2.7.5' and when I update project repository make a file cxf-bundle-2.7.5.bundle.lastUpdated everytime. How could i fix this problem and why.
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-bundle</artifactId>
<version>2.7.5</version>
<type>bundle</type>
</dependency>
Thanks!!!
The simple answer is that the bundle is not really a bundle in the meaning of the type. If you take a look at search.maven.org you will see that there are jar, source, javadoc available so you need to change the dependency definition into the following:
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-bundle</artifactId>
<version>2.7.5</version>
</dependency>

Maven 2 - dependency type directory

In order to get a file I can use the following dependency
<dependencies>
<dependency>
<groupId>some group</groupId>
<artifactId>art</artifactId>
<version>1</version>
<type>some type</type>
<scope>system</scope>
<systemPath>path to file</systemPath>
</dependency>
</dependencies>
What can I do in order to get a directory?
Maven works with jar dependencies. It appears you want to create and use your own local repository.
Please refer How do I Create a Jar And Install It In My Local Repository from Maven Docs.
Hope it helps.

Resources