Tôi đang sử dụng maven trong dự án web của tôi đây là cách pom.xml của tôi trông Tôi sử dụng eclipse juno, với apache tomcat 7, tôi đang chạy windows xp OS , "C: \ Program Files \ Java \ jdk1.6.0_23 \ lib" là nơi mà các công cụ của tôi jar is.i đã cố gắng mã hóa nó trong tệp pom.xml nhưng nó đã nói không thể mã cứng. Đã sử dụng các cấu hình dưới đây vẫn còn lỗi "Thiếu vật com.sun: công cụ: jar: 1.5.0" xin vui lòng giúp tôi chán ngấy từ 1 tuần googlingThiếu com.sun: công cụ: jar: 1.5.0 maven
</dependencies>
<profiles>
<profile>
<id>default-tools.jar</id>
<activation>
<property>
<name>java.vendor</name>
<value>Sun Microsystems Inc.</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.5.0</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
I:\eclipse-jee-juno-RC3-win32\workspace\MYProject>mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MYProject 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.594s
[INFO] Finished at: Sat Feb 23 20:49:53 GMT+05:30 2013
[INFO] Final Memory: 3M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project MYProject: Could not resolve dependencies for project MYProject:MYProject:war:0.0.1-SNAPSHOT: Failure to find com.sun:tools:jar:1
.5.0 in http://repo.maven.apache.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]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
'cmd' is not recognized as an internal or external command,
operable program or batch file.
I:\eclipse-jee-juno-RC3-win32\workspace\MYProject>
nhật ký bạn đăng dường như không được liên kết với sự cố bạn đang mô tả. Bạn gặp lỗi trong giai đoạn sạch. Tệp 'Company.hbm.xml' có thể hiện đang được một số quy trình khác sử dụng. – ben75
@ ben75 Bạn đúng Tôi đã sửa vấn đề đó, Bây giờ tôi đang nhận com.sun: công cụ: vấn đề jar u có thể kiểm tra tôi đã sửa bài của tôi – HkFreaKuser1673718
Đường dẫn hệ thống của bạn trông đáng ngờ. Tôi nghĩ $ {java.home} /lib/tools.jar của nó. Btw. JAVA_HOME của bạn có được đặt chính xác không? –