- This topic has 2 replies, 2 voices, and was last updated 16 years, 4 months ago by Charles R. Floss.
-
AuthorPosts
-
Charles R. FlossMemberI have installed MyEclipseIDE 6.5GA and added a pom file to my project. When it is run I receive a message about a missing surefile-junit jar, and that I should download it and install manually. Why isn’t this jar in the MyEclipse installation, and how/where can I get it? Below is the console output I receive:
[INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building PSCUFSUtils [INFO] [INFO] Id: PSCUFSUtilsJar:PSCUFSUtilsJar:jar:0.0.1-SNAPSHOT [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] No sources to compile [INFO] [resources:testResources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:testCompile] [INFO] No sources to compile [INFO] [surefire:test] url = http://repo1.maven.org/maven2 Downloading: http://repo1.maven.org/maven2/org/apache/maven/surefire/surefire-junit/2.4.2/surefire-junit-2.4.2.pom url = http://repo1.maven.org/maven2 Downloading: http://repo1.maven.org/maven2/org/apache/maven/surefire/surefire-junit/2.4.2/surefire-junit-2.4.2.jar [ERROR] The following mojo encountered an error while executing: Group-Id: org.apache.maven.plugins Artifact-Id: maven-surefire-plugin Version: 2.4.2 Mojo: test brought in via: packaging: jar While building project: Group-Id: PSCUFSUtilsJar Artifact-Id: PSCUFSUtilsJar Version: 0.0.1-SNAPSHOT From file: C:\workspaces\Maven2\PSCUFSUtils\PSCUFSUtilsJar\pom.xml Reason: Error to resolving surefire provider dependency: Missing: ---------- 1) org.apache.maven.surefire:surefire-junit:jar:2.4.2 Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=org.apache.maven.surefire -DartifactId=surefire-junit -Dversion=2.4.2 -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=org.apache.maven.surefire -DartifactId=surefire-junit -Dversion=2.4.2 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) dummy:dummy:jar:1.0 2) org.apache.maven.surefire:surefire-junit:jar:2.4.2 ---------- 1 required artifact is missing. for artifact: dummy:dummy:jar:1.0 from the specified remote repositories: central (http://repo1.maven.org/maven2) [INFO] ------------------------------------------------------------------------ [INFO] For more information, run with the -e flag [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILED [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5 seconds [INFO] Finished at: Fri Jul 11 15:04:43 EDT 2008 [INFO] Final Memory: 2M/9M [INFO] ------------------------------------------------------------------------
And the 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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>PSCUFSUtilsJar</groupId> <artifactId>PSCUFSUtilsJar</artifactId> <packaging>jar</packaging> <name>PSCUFSUtils</name> <version>0.0.1-SNAPSHOT</version> <description>Utility classes that may be used by all projects</description> <scm> <connection>scm:svn:svn://buildServer:appdev1@svnrepo/ProcessLauncherWeb/trunk</connection> <developerConnection>scm:svn:svn://svnrepo/ProcessLauncherWeb/trunk</developerConnection> </scm> <build> <sourceDirectory>${project.basedir}/src</sourceDirectory> <outputDirectory>${project.basedir}/target/classes</outputDirectory> </build> </project>
support-eugeneMemberThis jar can be found in the default Maven repository (http://repo1.maven.org/maven2/org/apache/maven/surefire/surefire-junit/2.4.2/surefire-junit-2.4.2.jar).
You can try one of the following:
1. Check your Maven configuration to use standard Maven repository.
2. If you have private repository in your company or team make sure all these jars are available there.
3. Download the jar manually and add it to repository. You can do this using MyEclipse (Main menu: MyEclipse-Utilities-Maven4MyEclipse-Import Jar to Local Repository)
Charles R. FlossMemberThis appears to be a proxy problem. I ran the same test project on my home PC and saw that it retrieved the shrefire-junit.jar successfully. I added a proxy element to my settings.xml file and it was able to retrieve the file at work now. Below is a block similar to what I added:
<proxies> <proxy> <id>myproxy</id> <active>true</active> <protocol>http</protocol> <host>proxy.somewhere.com</host> <port>8080</port> <username>proxyuser</username> <password>somepassword</password> <nonProxyHosts>*.google.com|ibiblio.org</nonProxyHosts> </proxy> </proxies>
-
AuthorPosts