我是法国人所以我会尝试使用好的正字法,
当我运行我的项目Maven时,我有这个错误(我没有找到如何做换行符):
[WARNING] Failed to canonicalize path
C:\Users\Administrator\.m2\repository\classworlds\classworlds\1.1\classworlds-1.1.pom.lastUpdated:
The file or directory is corrupted and unreadable
[WARNING] Failed to
canonicalize path
C:\Users\Administrator\.m2\repository\classworlds\classworlds\1.1\classworlds-1.1.pom.lastUpdated:
The file or directory is corrupted and unreadable [WARNING] Failed to
write tracking file
C:\Users\Administrator\.m2\repository\classworlds\classworlds\1.1\classworlds-1.1.pom.lastUpdated
java.io.FileNotFoundException:
C:\Users\Administrator\.m2\repository\classworlds\classworlds\1.1\classworlds-1.1.pom.lastUpdated
(The file or directory is corrupted and unreadable)
BUILD FAILURE
我尝试使用Eclipse和Netbeans,除非结果
,否则我删除了repertory classworlds在SpringGardenApplication.java文件中:
package org.yannart.springgarden;
import
org.springframework.context.support.ClassPathXmlApplicationContext;
/** * Classe qui initialise l'application SpringGarden. */ public
class SpringGardenApplication {
/** * Methode main ou commence le flux de l'application. */
public static void main(String[] args) {
// Demarre le contexte de Spring new
ClassPathXmlApplicationContext("applicationContext.xml",
SpringGardenApplication.class); } }
在web.xml文件中:
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app> <display-name>Archetype Created Web
Application</display-name> </web-app>
在applicationContext.xml文件中:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<!-- ANNOTATIONS POUR L'INJECTION DE DEPENDANCES -->
<context:annotation-config />
<!-- ANNOTATIONS POUR LA CREATION DE BEANS -->
<context:component-scan base-package="org.yannart.springgarden" />
<!-- ANNOTATIONS POUR AOP -->
<aop:aspectj-autoproxy />
<!-- JARDINIER -->
<bean id="jardinier" class="org.yannart.springgarden.Jardinier" p:nom="Dupond" />
<!--PLANTES -->
<bean id="tomate" parent="plante" scope="prototype" p:nomPlante="Tomate" />
<bean id="patate" parent="plante" scope="prototype" p:nomPlante="Patate" />
<bean id="choux" parent="plante" scope="prototype" p:nomPlante="Choux" />
<bean id="pomme" parent="plante" scope="prototype" p:nomPlante="Pomme" />
<bean id="poire" parent="plante" scope="prototype" p:nomPlante="Poire" />
<bean id="poireMalade" parent="plante" scope="prototype" p:nomPlante="PoireMalade" />
<bean id="patateMalade" parent="plante" scope="prototype" p:nomPlante="PatateMalade" />
<!-- POTAGER -->
<bean id="potager" class="org.yannart.springgarden.Parcelle"
init-method="melanger">
<property name="nom" value="Potager" />
<property name="plantes">
<list>
<ref bean="tomate" />
<ref bean="patate" />
<ref bean="patateMalade" />
<ref bean="choux" />
<ref bean="choux" />
</list>
</property>
</bean>
<!-- VERGER -->
<bean id="verger" class="org.yannart.springgarden.Parcelle"
init-method="melanger">
<property name="nom" value="Verger" />
<property name="plantes">
<list>
<ref bean="pomme" />
<ref bean="poireMalade" />
<ref bean="poire" />
</list>
</property>
</bean>
<!-- JARDIN -->
<bean id="jardin" class="org.yannart.springgarden.Jardin" init-method="jardiner">
<property name="jardinier" ref="jardinier" />
<property name="parcelles">
<list>
<ref bean="potager" />
<ref bean="verger" />
</list>
</property>
<!-- Les doses sont aléatoires -->
<property name="doseEau" value="#{ T(java.lang.Math).random() * 100 }" />
<property name="doseEngrais" value="#{ T(java.lang.Math).random() * 50 }" />
</bean>
此外,当我删除剧目“.m2”中的剧目“存储库”时,剧目“1.1”总是在这里并且显然已损坏
你知道吗? 感谢答案 0 :(得分:1)
问题可能来自缓存。您是否尝试删除.m2 / repository /?
的全部内容尝试在删除之前停止服务器和maven。 如果您使用的是Netbeans,则可以看到服务器:
如果某些进程被锁定,您可以直接将其终止或重新启动您的电脑。