Where do I find the selenium-server Maven dependency? - maven

I'm using Maven 3.0.3. I want to use the Selenium Maven plugin's selenese goal to run some Selenium tests, but I can't find the necessary selenium-server JAR. I have this in my pom.xml ...
<dependency>
<groupId>org.openqa.selenium.server</groupId>
<artifactId>selenium-server</artifactId>
<version>0.9.2</version>
</dependency>
but when I run my build I get the error
[ERROR] Failed to execute goal on project cme-productplus-web2: Could not resolve dependencies for project cme-productplus2:cme-productplus-web2:war:1.0-SNAPSHOT: Could not find artifact org.openqa.selenium.server:selenium-server:jar:0.9.2in central (http://repo1.maven.org/maven2) -> [Help 1]
Where do I get this mysterious JAR file or what repository do I need to add to find it?
Thanks, - Dave

It is not available from any Maven repo.
you have to download it (http://release.seleniumhq.org/selenium-remote-control/0.9.2/), and add it manually in your local repository (http://maven.apache.org/plugins/maven-install-plugin/examples/specific-local-repo.html).

Related

maven unable to resolve dependencies when using version ranges

I am using maven 3.x.x and trying to use versions ranges in my pom.xml and it never worked. I tried version-ordering suggested by maven and getting the order as expected on my terminal. But when running maven compile, always getting error as below
Failed to execute goal on project test-client: Could not resolve dependencies for project com.abc.def:test-client:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at development.com.abc.test:my-service:jar:jar:[1.0.211006-mr424,1.0.211014-mr427]: No versions available for development.com.abc.test:my-service:jar:jar:[1.0.211006-mr424,1.0.211014-mr427] within specified range -> [Help 1]
But if I use the fixed version in my pom.xml, things start working.
my pom.xml:
<dependency>
<groupId>development.com.abc.test</groupId>
<artifactId>my-service</artifactId>
<version>[1.0.211006-mr424, 1.0.211014-mr427]</version>
<classifier>jar</classifier>
</dependency>
PS : the artifact uploaded for my-service does not contain maven-metadata.xml in the repository.
The end goal I am trying to achieve is to resolve dynamic dependencies

Issue while creating eclipse p2 repository using maven tycho plugin

Project structure
com.abc.parent - parent pom
Contains all the plugins required for the modules. And the module execution list.
com.abc.p2 - master P2 project - eclipse repository
Contains the category.xml file with the information related to the below mentioned eclipse plugins.
com.abc.common - eclipse plugin
com.abc.person - eclipse plugin
What we want to achieve
We are introducing Maven for the first time for these project . We want to create a P2 repository using Maven ( mostly by using maven tycho plugin or any other standard available plugins ). Also , we wish to publish this repository to a site location.
What we tried until now
Case 1:
Approach - We used Maven Tycho plugin and added the packaging as "eclipse-repository" for the com.abc.p2 project.
We have following plugins in the pom.xml files
We are using Maven tycho plugin with version - 0.24.0
Maven tycho plugin. maven-p2-repository , tycho-packaging plugin , maven-osgi-plugin
Errors -
[ERROR] Unknown packaging: eclipse-repository # line 6, column 14
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildin
gException
Case 2 :
Approach - We used Maven-p2-plugin in order to create P2 repository .
Errors -
We were able to generate the P2-repository structure in the target folder of the master project, , but it failed to package all the dependent modules in the p2-repository.
Next steps suggestions
Request you to kindly assist and suggest , if we are on the right track in order to achieve our goal . Also let me know in case any changes required to my approach and any more additional things to be implemented.
For tycho to work you need an extensions.xml file in a .mvn folder in the root of your project (where the root pom.xml is) with the following contents:
<extensions>
<extension>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-pomless</artifactId>
<version>0.26.0</version>
</extension></extensions>
As you can see in the excellent Vogella tutorial
I would suggest using the tycho-p2-repository plugin.
In case 1, the maven repository plugin does not know the packaging "eclipse-repository" as that packaging is defined by tycho. I suggest simply leaving the maven-packaging plugin out of your pom and let tycho apply its defaults.
One helpful tip: Tycho does not include all dependencies, even though that's normal and desired maven behaviour. As maven does not "see" tycho (so manifest-derived) dependencies, they are not included.
You can override this behaviour by setting to true:
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-repository-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<includeAllDependencies>true</includeAllDependencies>
</configuration>
</plugin>

Mule Server 3.7.0 error: "Failure to find com.mulesoft.weave:mule-plugin-weave_2.11:jar:3.7.0"

I am trying to build a mule app with Maven using Mule Server 3.7.0 EE.
I'm erroring out when trying to add to my app the Data-weave Transformer.
I added to my pom.xml file this dependency:
<dependency>
<groupId>com.mulesoft.weave</groupId>
<artifactId>mule-plugin-weave_2.11</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
but I am getting this error:
[ERROR] Failed to execute goal on project project370: Could not resolve dependencies for project com.test:project370:mule:1.0.0-SNAPSHOT: Failure to find com.mulesoft.weave:mule-plugin-weave_2.11:jar:3.7.0 in http://repo1.maven.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of Central has elapsed or updates are forced -> [Help 1]
Any ideas how to fix?
try doing mvn install -U where -U would force your maven dependencies to be updated.
If you are using the maven m2 plugin for eclipse you can right click on your project Maven -> Update Project make sure that "Force Update of Snapshots/Releases" is enabled then click OK.
Also check this link for the documentation on configuring your repository properly.

Spring Batch Admin ... Problems Building 1.3.0 RELEASE

I pulled the latest Spring Batch Admin-1.3.0-RELEASE and am trying to build and deploy. In eclipse I imported then as Maven Projects. I try to build with maven and it fails unless I remove these lines from the pom.xml files.
<plugin>
<groupId>com.springsource.bundlor</groupId>
<artifactId>com.springsource.bundlor.maven</artifactId>
</plugin>
or else I get an error
[ERROR] Failed to execute goal com.springsource.bundlor:com.springsource.bundlor.maven:1.0.0.RELEASE:bundlor (bundlor-transform) on project spring-batch-admin-resources: Execution bundlor-transform of goal com.springsource.bundlor:com.springsource.bundlor.maven:1.0.0.RELEASE:bundlor failed: Plugin com.springsource.bundlor:com.springsource.bundlor.maven:1.0.0.RELEASE or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.objectweb.asm:com.springsource.org.objectweb.asm.tree:jar:3.1.0, org.objectweb.asm:com.springsource.org.objectweb.asm.commons:jar:3.1.0, org.objectweb.asm:com.springsource.org.objectweb.asm:jar:3.1.0: Could not find artifact org.objectweb.asm:com.springsource.org.objectweb.asm.tree:jar:3.1.0 in internal-repository (http://nexus-server:8082/nexus/content/groups/released) -> [Help 1]
You would have to add spring repositories in your pom.xml to tell maven to look there as well while looking up for dependencies as mentioned here

Maven trying to download '-sources.src' artifacts?

I have a Maven project that so far used to compile without problems. Today, when I run mvn clean package -U, I get:
[ERROR] Failed to execute goal on project myproj: Could not resolve dependencies for project org.myorg.myproj:myproj:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: javax.servlet:javax.servlet-api:src:sources:3.0.1, org.eclipse.jetty:jetty-servlet:src:sources:8.1.2.v20120308, org.eclipse.jetty:jetty-server:src:sources:8.1.2.v20120308, org.eclipse.jetty:jetty-webapp:src:sources:8.1.2.v20120308, commons-io:commons-io:src:sources:2.4: Could not find artifact javax.servlet:javax.servlet-api:src:sources:3.0.1 in MyRepo (http://maven.myorg.org:9001/nexus/content/repositories/myrepo/) -> [Help 1]
I tried to with a fresh local Maven repository (rm -fr ~/.m2/repository) but that did not make any difference.
Why does Maven try to find source/src artefacts? Any ideas where the problem might lie?
Edit: My dependencies (as seen using mvn help:effective-pom) do not have any source classifiers. For example, the dependency on the jetty-server mentioned in the error message reads as follows:
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>8.1.2.v20120308</version>
<scope>compile</scope>
</dependency>
Solution: With the help of #AlessandroSantini and #brian-topping, I finally identified the problem. One of my indirect dependencies had a <classifier>sources</classifier> and <type>src</type>. (mvn help:effective-pom did not show these indirect dependencies, and mvn dependency:tree failed with the above error message, too; eventually, a grep -r 'jetty-server' ~/.m2/repository/ -C 3 identified the artifact with the messed up dependency.)
It turned out that one of my own SBT projects required the (non-existing) source artifacts for one of its dependencies: I used SBT's withSources() where I should have used sbteclipe's EclipseKeys.withSource := true to get the sources in Eclipse.
Do you have any dependencies on public snapshots? I'd take a look at the output of mvn dependency:tree and see if you can find a transitive dependency that is including the sources somehow. Maybe one of the transitives have changed since your last build and they messed something up.

Resources