Tôi đang sử dụng Spring Tool Suite 3.6.3 và M2E eclipse plugin 1.4.1, khi tôi mở tệp POM từ một trong các dự án, tôi quan sát thấy không phải tất cả các phụ thuộc đều được thêm vào, tôi có cấu hình depnedecy thêm cho jaxws-rt với phiên bản 2.2.8 trong đó có nhiều phụ thuộc như sauM2E Không thể tải tất cả các phụ thuộc
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
</dependency>
<dependency>
<groupId>javax.xml.soap</groupId>
<artifactId>javax.xml.soap-api</artifactId>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>
<dependency>
<groupId>javax.jws</groupId>
<artifactId>jsr181-api</artifactId>
</dependency>
<!-- Provided dependencies -->
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>policy</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.gmbal</groupId>
<artifactId>gmbal-api-only</artifactId>
</dependency>
<dependency>
<groupId>org.jvnet.staxex</groupId>
<artifactId>stax-ex</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.stream.buffer</groupId>
<artifactId>streambuffer</artifactId>
</dependency>
<dependency>
<groupId>org.jvnet.mimepull</groupId>
<artifactId>mimepull</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.fastinfoset</groupId>
<artifactId>FastInfoset</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.ha</groupId>
<artifactId>ha-api</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.messaging.saaj</groupId>
<artifactId>saaj-impl</artifactId>
</dependency>
<dependency>
<artifactId>woodstox-core-asl</artifactId>
<groupId>org.codehaus.woodstox</groupId>
</dependency>
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>stax2-api</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.org.apache.xml.internal</groupId>
<artifactId>resolver</artifactId>
</dependency>
Trong STS khi tôi mở POM, và điều hướng đến phụ thuộc Hierarchy, tôi không thể nhìn thấy chính sách, giải quyết và phụ thuộc vào bộ đệm.
Nhưng khi tôi chạy cài đặt sạch mvn từ dấu nhắc lệnh, tất cả các thẻ được đề cập ở trên sẽ được thêm vào tệp .war.
Tôi nghĩ rằng có một số vấn đề với m2e + STS, không chắc tại sao m2e không thể nhận được những phụ thuộc bị thiếu đó.
cả hai đều trỏ đến 'settings.xml' khác nhau? –
Tôi có xu hướng quét sạch repo Maven địa phương của tôi trong những tình huống đó và khởi động lại STS sau đó, làm một dự án sạch sẽ của dự án, và do đó hãy để m2e (hoặc Maven) tải xuống tất cả các phụ thuộc cần thiết một lần nữa. Điều này giải quyết những vấn đề đó trong nhiều trường hợp (ít nhất là đối với tôi). Trong trường hợp bạn gặp lỗi trong m2e, bạn cũng có thể thử phiên bản STS mới nhất bao gồm phiên bản phát hành m2e mới nhất. –
Cảm ơn Jigar và Martin đã bình luận .... –