Total Pageviews

2014/04/29

[Apache Maven Problem] org/apache/maven/shared/ filtering/MavenFilteringException

Problem
As I build my JavaEE project with Apache Maven in Eclipse, it show this error message in my Eclipse
 Multiple annotations found at this line:  
 Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources failed: A required class was missing while executing org.apache.maven.plugins:maven-resources-plugin:2.6:resources: org/apache/maven/shared/filtering/MavenFilteringException   
 -----------------------------------------------------   
 realm =      plugin>org.apache.maven.plugins:maven-resources-plugin:2.6   
 strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy   
 urls[0] = file:/C:/Users/javis-msi/.m2/repository/org/apache/maven/     plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.jar   
 urls[1] = file:/C:/Users/javis-msi/.m2/repository/org/apache/maven/reporting/maven-reporting-api/2.0.6/maven-reporting-api-2.0.6.jar   
 urls[2] = file:/C:/Users/javis-msi/.m2/     repository/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-7/doxia-sink-api-1.0-alpha-7.jar   
 urls[3] = file:/C:/Users/javis-     msi/.m2/repository/commons-cli/commons-cli/1.0/commons-cli-1.0.jar   
 urls[4] = file:/C:/Users/javis-msi/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar   
 urls[5] = file:/C:/Users/javis-msi/.m2/     repository/junit/junit/3.8.1/junit-3.8.1.jar   
 urls[6] = file:/C:/Users/javis-msi/.m2/repository/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.jar   
 urls[7] = file:/C:/Users/javis-msi/.m2/repository/org/apache/maven/shared/maven-filtering/1.1/maven-     filtering-1.1.jar   
 urls[8] = file:/C:/Users/javis-msi/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.13/plexus-interpolation-1.13.jar   
 Number of foreign imports: 4  

I try to do mvn clean install again, again, and again. But still in vain.

Solution
This problem may result from you have broken jar files. Try to retrieve jar files again. The steps are as follows:

Step1. Go to you .m2 folder, and delete everything.

Step2. Retrieve all jar files again. 

2014/04/27

201404 Travel

烏來






2014/04/25

201404 Kyoto

京都某處櫻花


金閣寺

彥根城

平等院


奈良


平野神社

平安神宮




2014/04/16

CronMaker - a utility which helps you to build cron expressions

It's a good utility to build cron expression as I use Quartz to write batch program.
http://www.cronmaker.com/

2014/04/02

SVN error on Eclipse: org.tigris.subversion.javahl.ClientException: Attempted to lock an already-locked dir

Problem
As I commit my source code to SVN in eclipse, but Eclipse shut down unexpectedly. After I launch Eclipse again, and try to commit again, it show this error message:




 org.apache.subversion.javahl.ClientException: Attempted to lock an already-locked dir  
 svn: Commit failed (details follow):  
 svn: Working copy 'D:\workspace\fms\fms-webapp\src\main\java\gov\nta\fms\web\controller' locked.  
 svn: 'D:\workspace\fms\fms-webapp\src\main\java\gov\nta\fms\web\controller' is already locked. 

Solution
Right click on the offending project, click Team and then select Refresh/Cleanup. SVN gets the offending .lock files and deletes them. 

cleanup D:/workspace/fms/fms-webapp/src/main/java  

After Refresh/Cleanup, I can commit source code successfully
commit -m "add 4 spaces for rptInfo parameter" D:/workspace/fms/fms-webapp/src/main/java/gov/nta/fms/web/controller/Fms406rReportController.java  
   Sending    D:/workspace/fms/fms-webapp/src/main/java/gov/nta/fms/web/controller/Fms406rReportController.java  
   Transmitting file data ...  
   Committed revision 1264.  

Reference