- Cannot load resource with pom.xml:
If define dependency on pom.xml with Oracle jdbcdriver, got failed with error : "Missing artifact com.oracle:ojdbc14:jar: 10.2.0.3.0:provided" , that is due to copyright issue, such jar does not exist in central repository。
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.3.0</version>
<scope>provided</scope>
</dependency>
Solution:
mvn install:install-file -DgroupId=com.oracle-DartifactId=ojdbc14 -Dversion=10.2.0.3.0 -Dpackaging=jar-Dfile=D:/Docs/ojdbc14.jar
Here there is no white space before some "-D" parameters, we use -X to open debug, it will showBuild Failure with wrong groupid and missed artifactId:
Then correct it by adding white space before each "-D" parameter and execute it again:
Explanation:
This solution will load and put this jar to local repository. (I have repository management with Archiva)
- Activation.jar confliction:
we know activation.jar exists in many servers, so in our project it should not be included to WEB-INF/lib directory, but our some jar will dependent on such jar, then we can exclude activation.jar from our project by :
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>${org.jboss.resteasy}</version>
<exclusions>
<exclusion>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</exclusion>
</exclusions>
</dependency>
- Put a war to running server say Tomcat:
<build>
<finalName>Spring_TX_Thread</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<outputDirectory>D:\Software\Tomcat\webapps\</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
- Cannot check out a project from SCM with Eclipse Import...
But I would encounter error like :
Cannot complete the install because one or more required items could not be found.
Software being installed: Maven SCM handler for Subclipse (Optional) 0.9.8.200905041414 (org.maven.ide.eclipse.subclipse.feature.feature.group 0.9.8.200905041414)
Missing requirement: Maven SCM handler for Subclipse (Optional) 0.9.8.200905041414 (org.maven.ide.eclipse.subclipse.feature.feature.group 0.9.8.200905041414) requires 'org.tigris.subversion.subclipse.ui 0.0.0' but it could not be found
Then it is very clear that I failed to install Subclipse pulgin first in Eclipse, so do the same as we install "Maven SCM handler for Subclipse", except that input "subclipse - http://subclipse.tigris.org/update_1.6.x" in the blank followed with "Work with:".
Once I installed Subclipse successfully, I went back to install SCM handler, make it hit too.
Then I tried to import functionality to import a project from SVN repository....
However, still got a strange error:
checkout https://src.springframework.org/svn/spring-security/tags/spring-security-3.0.0.RELEASE -r HEAD --depth=infinity --force
RA layer request failed
svn: OPTIONS of 'https://src.springframework.org/svn/spring-security/tags/spring-security-3.0.0.RELEASE': Could not resolve hostname `src.springframework.org': The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for.
(https://src.springframework.org)
via google, I found one link : Accessing remote SVN Repositories from Eclipse
That means go to "Window->Preference->Team->SVN", select "SVNKit(PureJava)" instead of "JavaHL JNI" for "SVN Interface", exact reason it gives a link.
After so much things done, I could download projects from SVN smoothly.