maven install

来源:互联网 发布:windows route 编辑:程序博客网 时间:2024/06/01 09:41

         Recently, reading the book  activeMQ in action.

         when I used the souce code of this book at home in my own computer, all are okay, but in computer , the pom.xml of this project show error.

         It showed that the josql-1.5 and gentlyweb-utils-1.5 couldn't be found!

         Why? Maybe the broker in computer prevent the downloading of these jar files, so I email them from home to my computer.and then unzip

them to the local maven repository.Then in eclipse ,run as maven install, still build error, the same error!

         So I think I should manually install them use maven install, and I found the correspond artifactId, groupId,version on the internet in maven

repository,

          <dependency>
                    <groupId>org.apache.camel</groupId>
                    <artifactId>camel-josql</artifactId>
                    <version>1.5.0</version>
           </dependency>

           and use  mvn install:install-file -DgroupId=org.apache.camel -DartifactId=camel-josql -Dversion=1.5.0 -Dpackaging=jar -Dfile=D:\josql-1.5.jar

         and the same way as gentlyweb-utils,but still the same error.

         Spending a whole day but not solving it.

         The next day, I went to the project directory ,and open cmd, type mvn install, it show errors and also showed some instructions information,like

if you want run right ,please

           mvn install:install-file -DgroupId=net.sf.josql -DartifactId=josql -Dversion=1.5 -Dpackaging=jar -Dfile=/jar/file/path

           Obviously, the artifactId,version and grouldId is different.

           So I run this, and then mvn install,all are okay.

           The consultion:

           Sometimes, the IDE isn't the best choice,maybe, the raw software can instuct us more detail




0 0
原创粉丝点击