tôi sử dụng maven 3.0.3 và đã cố gắng để tạo ra pom cho jar của bên thứ ba như thế này:maven tạo pom tập tin
mvn install:install-file -Dfile=cobra.jar -DgroupId=com.cobra -DartifactId=cobra -Dversion=0.98.4 -Dpackaging=jar -DgeneratePom=true
Theo liên kết bên dưới nó sẽ tạo ra pom.xml thích hợp và cài đặt vật trong repo. http://maven.apache.org/plugins/maven-install-plugin/examples/generic-pom-generation.html
Trong khi đó, nó trả về một lỗi như vậy:
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (D:\cobra-0.98.4\lib). Please verify you invoked Maven from the correct directory. -> [Help 1]
Tại sao nó yêu cầu pom.xml trong khi nó sẽ tạo ra pom.xml?
Tôi chỉ chạy dòng này trong cmd trên Windows 7 và nó hoạt động cho Maven 3.0.5. Có lẽ họ đã sửa nó trong phiên bản này. – firen