mave

阅读 / 问答 / 标签

maven repository 没有的jar 怎么添加

1.排除jar下所依赖的所有jar,用如下 org.apache.struts struts2-spring-plugin 2.3.4 * * 如果只是不需要某一个,那就groupid和artifactid写清楚,多个 就多个

如何更改Maven的jar包存储的位置

修改settings.xml文件,指定仓库的位置

修改maven仓库地址为什么要复制一份settings.xml

这样以后更新maven版本时,就不必再次修改settings.xml

“eclipse”为什么无法修改“maven”默认的本地仓库的位置?

1、手动创建本地仓库的地址为:d:/m2/repository2、从windows的环境变量中增加了:M2_REPO=d:m2 epository,同时把这个变量增加到path变量中。3、修改d:mavenconfsetting.xml文件,在<localRepository>节点下新增一行:复制内容到剪贴板代码:<localRepository>d:/m2/repository</localRepository>表示本地仓库的地址为:d:/m2/repository4、从myeclipse->preferences->maven->installations下add一个已经安装到d盘的maven,如:d:maven,并勾选此新加项。并点击下面的browse按钮打开maven的全局配置文件,如:d:mavenconfsetting.xml。5、从myeclipse->preferences->maven->installations下修改user setting 选项为:D:m2 epositorysettings.xml,并点击update settings。并点击下面的reindex按钮更新索引。6、点击配置窗口的apply按钮,突出配置窗口。7、配置修改后,myeclise会自动更新索引,当完成后重启myeclipse,会发现M2_REPO变量的值变成了d:/m2/repository。自此,maven从远程库下载的jar包都会放到d:/m2/repository下。为了避免每次构建系统都从远程仓库下载jar,需要搭建私服。

eclipse怎么设置maven仓库地址

从eclipse中增加了maven2的插件之后,maven默认的本地库的路径是${user}/.m2/repository/下,一般windows用户的操作系统都安装在C盘,所以这个目录下的jar包比较危险。我尝试从myeclipse->preferences->java->build path->classpath variables中查找M2_REPO这个变量,发现其路径指向的是“C:Documents and Settingslvxda.m2 epository”,我想修改其路径为:d:m2 epository,可是这个变量的编辑按钮是灰色的,不可编辑。从网上也没有找到相应的解决办法。打算自己尝试一下:1、手动创建本地仓库的地址为:d:/m2/repository2、从windows的环境变量中增加了:M2_REPO=d:m2 epository,同时把这个变量增加到path变量中。3、修改d:mavenconfsetting.xml文件,在<localRepository>节点下新增一行:复制内容到剪贴板代码:<localRepository>d:/m2/repository</localRepository>表示本地仓库的地址为:d:/m2/repository。4、从myeclipse->preferences->maven->installations下add一个已经安装到d盘的maven,如:d:maven,并勾选此新加项。并点击下面的browse按钮打开maven的全局配置文件,如:d:mavenconfsetting.xml。5、从myeclipse->preferences->maven->installations下修改user setting 选项为:D:m2 epositorysettings.xml,并点击update settings。并点击下面的reindex按钮更新索引。6、点击配置窗口的apply按钮,突出配置窗口。7、配置修改后,myeclise会自动更新索引,当完成后重启myeclipse,会发现M2_REPO变量的值变成了d:/m2/repository。自此,maven从远程库下载的jar包都会放到d:/m2/repository下。为了避免每次构建系统都从远程仓库下载jar,需要搭建私服。

怎么自定义maven的中央仓库位置

运行Maven的时候,Maven所需要的任何构件都是直接从本地仓库获取的。如果本地仓库没有,它会首先尝试从远程仓库下载构件至本地仓库,然后再使用本地仓库的构件。比如说,你的项目配置了junit-3.8的依赖,在你运行mvn test 的时候,Maven需要使用junit-3.8的jar文件,它首先根据坐标查找本地仓库,如果找到,就直接使用。如果没有,Maven会检查可用的远程仓库配置,然后逐个尝试这些远程仓库去下载junit-3.8的jar文件,如果远程仓库存在该文件,Maven会将其下载到本地仓库中,继而使用。如果尝试过所有远程仓库之后,Maven还是没能够下载到该文件,它就会报错。Maven缺省的本地仓库地址为${user.home}/.m2/repository 。也就是说,一个用户会对应的拥有一个本地仓库。你也可以自定义本地仓库的位置,修改${user.home}/.m2/settings.xml : <settings> ... <localRepository>D:java epository</localRepository> ... </settings>你还可以在运行时指定本地仓库位置:mvn clean install -Dmaven.repo.local=/home/juven/myrepo/还有一点需要理解的是,当我们运行install的时候,Maven实际上是将项目生成的构件安装到了本地仓库,也就是说,只有install了之后,其它项目才能使用此项目生成的构件。了解了本地仓库,接着了解一下Maven缺省的远程仓库,即Maven中央仓库。安装好Maven之后,我们可以建立一个简单的项目,配置一些简单的依赖,然后运行mvn clean install,项目就构建好了。我们没有手工的去下载任何jar文件,这一切都是因为Maven中央仓库的存在,当Maven在本地仓库找不到需要的jar文件时,它会查找远程仓库,而一个原始的Maven安装就自带了一个远程仓库——Maven中央仓库。这个Maven中央仓库是在哪里定义的呢?在我的机器上,我安装了maven-2.0.10,我可以找到这个文件:${M2_HOME}/lib/maven-2.0.10-uber.jar ,打开该文件,能找到超级POM:orgapachemavenprojectpom-4.0.0.xml ,它是所有Maven POM的父POM,所有Maven项目继承该配置,你可以在这个POM中发现如下配置:<repositories> <repository> <id>central</id> <name>Maven Repository Switchboard</name> <layout>default</layout> <url>http://repo1.maven.org/maven2</url> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories>关于远程仓库的配置,下面的小节我会详细解释,这里我们只要知道,中央仓库的id为central,远程url地址为http://repo1.maven.org/maven2,它关闭了snapshot版本构件下载的支持。

我有个maven的repository,如何将jar包下到本地?

不用在本地假设服务器。只要将你本地的jar包install到你的本地maven库就可以了。命令如下mvn install:install-file -DgroupId=jar包的GID -DartifactId=jar包的AID -Dversion=Jar包的版本 -Dpackaging=jar -Dfile=你本地jar包的目录例子:mvn install:install-file -DgroupId=org.springframework -DartifactId=spring-webmvc -Dversion=3.0.5.RELEASE -Dpackaging=jar -Dfile=D:/spring.jar每个jar都执行一次,成功后,重新构建项目就ok了。

maven repository 里的依赖为什么会找不到

有很多可能呀,比如1, 由于国内墙的问题,经常连不上 central 库。2, 可能 groupid 或 artifactid 写错了 。3. 不在 central 库里面。需要额外添加 依赖库。

Maven中的 localRepository 究竟如何修改才能把默认 ~/.m2/repository 的文件存放在D盘?高分求教谢谢

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <!-- localRepository | The path to the local repository maven will use to store artifacts. | | Default: ~/.m2/repository <localRepository>/path/to/local/repo</localRepository> --> <localRepository>D:mvnRepository</localRepository>

怎么从 maven 的 repository 中删除自己安装的 jar 包

Maven项目来说,日常使用的多数第三方java库文件都可以从Maven的Central Repository中自动下载,但是如果我们需要的jar文件不在Central Repository中,那么我们就需要手动将自己下载的jar文件加入到Maven的local reposotory中了,此时我们需要向Maven提供用于识别jar文件(可能多个)的groupId, artifactId和version等信息。  我并不打算讲怎么将一个下载的jar库加入到local repository中,我们将自己建立一个jar库,比如我们有一个最简单的HelloWorld类HelloWorld.java:package com.thoughtworks.davenkin;public class HelloWorld{ public void sayHello() { System.out.println("Hello, World"); }}  我们希望将HelloWorld.java打包成jar文件安装在Maven的local repository中以便其它程序使用。  编译打包hello-world.jar后,为了符合Maven的规定,需要给hello-world.jar一个版本号,故将hello-world.jar改名为hello-world-1.0.jar,此后便可以用mvn来安装此包到Maven的local repository中了:mvn install:install-file -Dfile=path/to/hello-world-1.0.jar -DgroupId=com.thoughtworks.davenkin -DartifactId=hello-world -Dversion=1.0 -Dpackaging=jar  其中,-Dfile选项应给出需要安装jar文件的路径,在Linux/Mac下,jar文件将被安装在以下目录:~/.m2/repository/com/thoughtworks/davenkin/hello-world/1.0/hello-world-1.0.jar  现在,我们的hello-world-1.0.jar便可以被其它Maven项目所使用了,为此创建一个Maven工程:mvn archetype:generate-DgroupId=com.thoughtworks.davenkin.demo -DartifactId=helloworld-demo -DarchetypeArtifactId=maven-archetype-quickstart -Dversion=1.0  此时将在当前目录下自动创建helloworld-demo子目录,切换到helloworld-demo目录,删除已有的App.java,并创建自己的Main.java文件rm src/main/java/com/thoughtworks/davenkin/demo/App.javatouch src/main/java/com/thoughtworks/davenkin/demo/Main.java  将以下内容加入到Main.java文件中:package com.thoughtworks.davenkin.demo;import com.thoughtworks.davenkin.HelloWorld;public class Main { public static void main(String[] args) { new HelloWorld().sayHello(); }}  接下来是最重要的一步,修改pom.xml文件以加入对HelloWorld类的依赖:http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 com.thoughtworks.davenkin.demo demo 1.0 jar demo http://maven.apache.orgbuild.sourceEncoding>UTF-8build.sourceEncoding>junit junit 3.8.1 testcom.thoughtworks.davenkin hello-world 1.0 compile  以上高亮部分为我们手动加入的,Maven会根据artifactId和version拼出所依赖jar包的名字,即artifactId-version.jar,对于我们的例子,artifactId为hello-world,version为1.0,所得到的jar文件为hello-world-1.0.jar,这也是为什么我们在一开始时需要将hello-world.jar的名字改为hello-world-1.0.jar的原因。  接下来便可以编译我们的Main.java了:mvn compile  编译结果会放在target文件夹下。  到现在,我们的例子便可以运行了,在工程根目录下(该例为hello-world-demo)输入以下命令:mvn exec:java -Dexec.mainClass="com.thoughtworks.davenkin.demo.Main"  在笔者的机器上输出为:[INFO] Scanning for projects...[INFO] [INFO] ------------------------------------------------------------------------[INFO] Building demo 1.0[INFO] ------------------------------------------------------------------------[INFO] [INFO] >>> exec-maven-plugin:1.2.1:java (default-cli) @ demo >>>[INFO] [INFO] <<< exec-maven-plugin:1.2.1:java (default-cli) @ demo <<<[INFO] [INFO] --- exec-maven-plugin:1.2.1:java (default-cli) @ demo ---Hello, World[INFO] ------------------------------------------------------------------------[INFO] BUILD SUCCESS[INFO] ------------------------------------------------------------------------[INFO] Total time: 2.423s[INFO] Finished at: Wed Feb 15 21:33:47 CST 2012[INFO] Final Memory: 5M/81M[INFO] ------------------------------------------------------------------------  以上高亮部分即为我们期望的程序输出,当然你也可以用传统的java命令来运行,此时需要将hello-world-1.0.jar加入到classpath中,输入:java -cp ~/.m2/repository/com/thoughtworks/davenkin/hello-world/1.0/hello-world-1.0.jar:target/classes/ com.thoughtworks.davenkin.demo.Main  输出为:Hello, World

maven repositories的id和name有什么用

id, name是该镜像的唯一定义符。id用来区分不同的mirror元素。 url是该镜像的URL。构建系统会优先考虑使用该URL,而非使用默认的服务器URL。 mirrorOf是被镜像的服务器的id。例如,如果我们要设置了一个Maven中央仓库(http:// repo1.maven.org/maven2)的镜像,就需要将该元素设置成central。这必须和 中央仓库的id central完全一致。 Repository是是Maven用来填充构建系统本地仓库所使用的一组远程项目。而Maven是从本地仓库 中使用其插件和依赖。不同的远程仓库可能含有不同的项目,而在某个激活的profile 下,可能定义了一些仓库来搜索需要的发布版或快照版构件。

如何修改MAVEN本地仓库的存储位置

1、本地需要安装Maven。这里假设安装在D:Program Filesapache-maven-2.2.12、修改本地maven库的路径。在 D:Program Filesapache-maven-2.2.1confsettings.xml文件中修改1<localRepository>D:/Program Files/apache-maven-2.2.1/repository</localRepository>3、进MyEclipse→window→Preferences→Maven4MyEclipse→Maven→Installations→User Settings点击右侧Browse指向D:Program Filesapache-maven-2.2.1confsettings.xml

如何制作maven repository镜像

首先,进入到Maven的安装目录下的conf文件下,可以看到有个settings.xml文件。0maven安装及maven环境变量配置0maven下载|安装|安装教程可以将settings.xml文件先备份下,然后打开修改下面内容,如下所示如果还需要thirdparty仓库或多个仓库,还可以添加下图所示。以上配置的都是Maven的镜像地址换成了OSChina的镜像地址。在执行Maven命令时,还要安装一些插件包修改插件包的下载地址。5如果还需要修改Maven文件的默认保存位置,直接在setting文件中按下面修改。<localRepository>D:/新路径</localRepository>

maven repository 私人仓库怎么搭建

简单来说,共有三步:deploy到本地目录把本地目录提交到gtihub上配置github地址为仓库地址配置local file maven仓库deploy到本地maven可以通过http, ftp, ssh等deploy到远程服务器,也可以deploy到本地文件系统里。例如把项目deploy到/home/hengyunabc/code/maven-repo/repository/目录下: <distributionManagement> <repository> <id>hengyunabc-mvn-repo</id> <url>file:/home/hengyunabc/code/maven-repo/repository/</url> </repository> </distributionManagement>通过命令行则是:mvn deploy -DaltDeploymentRepository=hengyunabc-mvn-repo::default::file:/home/hengyunabc/code/maven-repo/repository/推荐使用命令行来deploy,避免在项目里显式配置。https://maven.apache.org/plugins/maven-deploy-plugin/https://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html把本地仓库提交到github上上面把项目deploy到本地目录home/hengyunabc/code/maven-repo/repository里,下面把这个目录提交到github上。在Github上新建一个项目,然后把home/hengyunabc/code/maven-repo下的文件都提交到gtihub上。cd /home/hengyunabc/code/maven-repo/git initgit add repository/*git commit -m "deploy xxx"git remote add origin git@github.com:hengyunabc/maven-repo.gitgit push origin master最终效果可以参考我的个人仓库:https://github.com/hengyunabc/maven-repogithub maven仓库的使用因为github使用了raw.githubusercontent.com这个域名用于raw文件下载。所以使用这个maven仓库,只要在pom.xml里增加: <repositories> <repository> <id>hengyunabc-maven-repo</id> <url>https://raw.githubusercontent.com/hengyunabc/maven-repo/master/repository</url> </repository> </repositories>目录查看和搜索值得注意的是,github因为安全原因,把raw文件下载和原来的github域名分开了,而raw.githubusercontent.com这个域名是不支持目录浏览的。所以,想要浏览文件目录,或者搜索的话,可以直接到github域名下的仓库去查看。比如这个文件mybatis-ehcache-spring-0.0.1-20150804.095005-1.jar:浏览器地址是:https://github.com/hengyunabc/maven-repo/blob/master/repository/io/github/hengyunabc/mybatis-ehcache-spring/0.0.1-SNAPSHOT/mybatis-ehcache-spring-0.0.1-20150804.095005-1.jar它的maven仓库url是:https://raw.githubusercontent.com/hengyunabc/maven-repo/master/repository/io/github/hengyunabc/mybatis-ehcache-spring/0.0.1-SNAPSHOT/mybatis-ehcache-spring-0.0.1-20150804.095005-1.jarmaven仓库工作的机制下面介绍一些maven仓库工作的原理。典型的一个maven依赖下会有这三个文件:https://github.com/hengyunabc/maven-repo/tree/master/repository/io/github/hengyunabc/mybatis-ehcache-spring/0.0.1-SNAPSHOTmaven-metadata.xmlmaven-metadata.xml.md5maven-metadata.xml.sha1maven-metadata.xml里面记录了最后deploy的版本和时间。<?xml version="1.0" encoding="UTF-8"?><metadata modelVersion="1.1.0"> <groupId>io.github.hengyunabc</groupId> <artifactId>mybatis-ehcache-spring</artifactId> <version>0.0.1-SNAPSHOT</version> <versioning> <snapshot> <timestamp>20150804.095005</timestamp> <buildNumber>1</buildNumber> </snapshot> <lastUpdated>20150804095005</lastUpdated> </versioning></metadata>其中md5, sha1校验文件是用来保证这个meta文件的完整性。maven在编绎项目时,会先尝试请求maven-metadata.xml,如果没有找到,则会直接尝试请求到jar文件,在下载jar文件时也会尝试下载jar的md5, sha1文件。maven-metadata.xml文件很重要,如果没有这个文件来指明最新的jar版本,那么即使远程仓库里的jar更新了版本,本地maven编绎时用上-U参数,也不会拉取到最新的jar!所以并不能简单地把jar包放到github上就完事了,一定要先在本地Deploy,生成maven-metadata.xml文件,并上传到github上。参考:http://maven.apache.org/ref/3.2.2/maven-repository-metadata/repository-metadata.htmlmaven的仓库关系https://maven.apache.org/repository/index.html配置使用本地仓库想要使用本地file仓库里,在项目的pom.xml里配置,如: <repositories> <repository> <id>hengyunabc-maven-repo</id> <url>file:/home/hengyunabc/code/maven-repo/repository/</url> </repository> </repositories>注意事项maven的repository并没有优先级的配置,也不能单独为某些依赖配置repository。所以如果项目配置了多个repository,在首次编绎时,会依次尝试下载依赖。如果没有找到,尝试下一个,整个流程会很长。所以尽量多个依赖放同一个仓库,不要每个项目都有一个自己的仓库。

如何设置maven的local repository目录

在Myeclipse中创建maven的模板项目时报错,提示在C:Usersmdtuser.m2 epository找不到模板,去找该目录根本不是此目录。到myeclipse中的Myeclipse->Maven4MyEclipse中的User Setting中发现的也是此目录,因此需要修改该目录,但是无法直接修改。在上面的User Settings中找到文件settings.xml。也可以在Myeclipse->Maven4MyEclipse->Installations中open file该文件。修改<localRepository>节点中的值为实际的settings.xml文件的路径即可。然后重启myeclipse生效。

maven-repositories文件

就没有一个人能说明白额 repositories是文件的后缀还是什么,怎么新建呢,全是抄一样的答案,真会的大神来解惑一下呀!

maven repository怎么理解

简单点来说,repository就是个仓库。maven里有两种仓库,本地仓库和远程仓库。远程仓库相当于公共的仓库,大家都能看到。本地仓库是你本地的一个山寨版,只有你看的到,主要起缓存作用。当你向仓库请求插件或依赖的时候,会先检查本地仓库里是否有。如果有则直接返回,否则会向远程仓库请求,并做缓存。

javax.sql.DataSource 这个 maven 仓库没有,怎么办

这个是jdk自带的,不需要maven引用

javax.sql.DataSource 这个 maven 仓库没有,怎么办

因为有些jar包在Maven中央仓库不存在,比如sqljdbc.jar在Maven中央仓库中找不到那么我们就需要额外下载所需jar包然后添加到本地仓库首先当然是配置好Maven环境了,然后在下载的jar包下执行mvn install:install-file -Dfile=sqljdbc4.jar -DgroupId=com.microsoft.sqlserver -DartifactId=sqljdbc4 -Dversion=4.0 -Dpackaging=jar然后就可以在项目下的pom.xml 文件中添加<dependency><groupId>com.microsoft.sqlserver</groupId><artifactId>sqljdbc4</artifactId><version>4.0</version></dependency>

eclipse创建完maven项目后pom.xml文件中的 war报错

可能是依赖的jar包在资源库中没找到,或者有问题;网页链接

Eclipse4.5版本创建Maven项目时出现这种错误Pom.xml上面错误

您好,maven2打包前会运行junit,但是,有时我们希望即使出现了错误,也要打包。maven2的设计者已经考虑到这种情况了。pom.xml文件配置内容如下: <project> [...] <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <testFailureIgnore>true</testFailureIgnore> </configuration> </plugin> </plugins> </build> [...] </project>

Maven编译环境时报错,本地已存在这个jar包,但编译不了missing artifact com.smartxp:authlib:jar:1.0.1

在本地maven仓库位置找到com/smartxp/,确定这个下面有jar文件吗,没有的话把smartxp这个文件夹删了,然后maven update

如何解决Maven依赖本地仓库eclipse报错的问题

clean install 一下你的工程

maven怎么安装本地jar包

在Maven项目中使用本地JAR包有两种方法:1. 使用system scope<dependencies><dependency><groupId>org.richard</groupId><artifactId>my-jar</artifactId><version>1.0</version><scope>system</scope><systemPath>${project.basedir}/lib/my-jar.jar</systemPath></dependency></dependencies>system scope引入的包,在使用jar-with-dependencies打包时将不会被包含,可以使用resources将本地包打进jar-with-dependencies<build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-shade-plugin</artifactId><executions><execution><id>make-assembly</id><phase>package</phase><goals><goal>shade</goal></goals><configuration><descriptorRefs><descriptorRef>jar-with-dependencies</descriptorRef></descriptorRefs><finalName>xxx-jar-with-dependencies</finalName></configuration></execution></executions></plugin></plugins><resources><resource><targetPath>lib/</targetPath><directory>lib/</directory><includes><include>**/my-jar.jar</include></includes></resource></resources></build>生成的xxx-jar-with-dependencies.jar中,将会包含lib目录以及my-jar.jar,并且能够被在执行的时候被找到。有的时候这种方法会实效,比如JDBCDriver在声明的时候Class.forName("xxx.Driver")就会说找不到类,用下面两种方法就可以。2. 将jar包安装到本地repository中mvn install:install-file -Dfile=my-jar.jar -DgroupId=org.richard -DartifactId=my-jar -Dversion=1.0 -Dpackaging=jar3. 添加 in project repository,在新机器上执行时就不用运行mvn install:install-file命令了<repository><id>in-project</id><name>In Project Repo</name><url>file://${project.basedir}/lib</url></repository><dependency><groupId>org.richard</groupId><artifactId>my-jar</artifactId><version>1.0</version></dependency>你的jar包及路径必须严格遵循格式:/groupId/artifactId/version/artifactId-verion.jar本例中: lib/org/richard/my-jar/1.0/my-jar-1.0.jar

如何将IKAnalyzer添加到本地maven仓库

采用了特有的“正向迭代最细粒度切分算法“,具有60万字/秒的高速处理能力。采用了多子处理器分析模式,支持:英文字母(IP地址、Email、URL)、数字(日期,常用中文数量词,罗马数字,科学计数法),中文词汇(姓名、地名处理)等分词处理。对中英联合支持不是很好,在这方面的处理比较麻烦.需再做一次查询,同时是支持个人词条的优化的词典存储,更小的内存占用。支持用户词典扩展定义。针对Lucene全文检索优化的查询分析器IKQueryParser;采用歧义分析算法优化查询关键字的搜索排列组合,能极大的提高Lucene检索的命中率。

maven无法打包,环境变量已经配置好了。

使用maven应该是使用jdk的,你的是不是只有jre?

maven入门项目报错

我也遇到这个错误了 求解答

如何配置pom.xml用maven打包java工程

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"><modelVersion>4.0.0</modelVersion><groupId>com.common</groupId><artifactId>dkcjDemo</artifactId><packaging>war</packaging><version>0.0.1-SNAPSHOT</version><name>dkcjDemo</name><url>http://maven.apache.org</url><!-- 用来设置版本号 --><properties><srping.version>4.0.2.RELEASE</srping.version><mybatis.version>3.2.8</mybatis.version><slf4j.version>1.7.12</slf4j.version><log4j.version>1.2.17</log4j.version><shiro.version>1.2.3</shiro.version></properties><!-- 用到的jar包 --><dependencies><dependency><groupId>com.fasterxml.jackson.jaxrs</groupId><artifactId>jackson-jaxrs-xml-provider</artifactId><version>2.5.2</version></dependency><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-core</artifactId><version>2.5.2</version></dependency><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-databind</artifactId><version>2.5.2</version></dependency> <dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-annotations</artifactId><version>2.5.2</version></dependency><!-- Apache shiro --><dependency><groupId>org.apache.shiro</groupId><artifactId>shiro-core</artifactId><version>${shiro.version}</version></dependency><dependency><groupId>org.apache.shiro</groupId><artifactId>shiro-web</artifactId><version>${shiro.version}</version></dependency><dependency><groupId>org.apache.shiro</groupId><artifactId>shiro-cas</artifactId><version>${shiro.version}</version></dependency><dependency><groupId>org.apache.shiro</groupId><artifactId>shiro-spring</artifactId><version>${shiro.version}</version></dependency><dependency><groupId>commons-logging</groupId><artifactId>commons-logging</artifactId><version>1.1.3</version></dependency><!-- 单元测试 --><dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>4.11</version><!-- 表示开发的时候引入,发布的时候不会加载此包 --><scope>test</scope></dependency><!-- java ee包 --><dependency><groupId>javax</groupId><artifactId>javaee-api</artifactId><version>7.0</version></dependency><!-- spring框架包 start --><dependency><groupId>org.springframework</groupId><artifactId>spring-test</artifactId><version>${srping.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-core</artifactId><version>${srping.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-oxm</artifactId><version>${srping.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-tx</artifactId><version>${srping.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-jdbc</artifactId><version>${srping.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-aop</artifactId><version>${srping.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-context</artifactId><version>${srping.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-context-support</artifactId><version>${srping.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-expression</artifactId><version>${srping.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-orm</artifactId><version>${srping.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-web</artifactId><version>${srping.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-webmvc</artifactId><version>${srping.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-aspects</artifactId><version>${srping.version}</version></dependency><!-- spring框架包 end --><!-- mybatis框架包 start --><dependency><groupId>org.mybatis</groupId><artifactId>mybatis</artifactId><version>${mybatis.version}</version></dependency><dependency><groupId>org.mybatis</groupId><artifactId>mybatis-spring</artifactId><version>1.2.2</version></dependency><!-- mybatis框架包 end --><!-- 数据库驱动 --><dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId><version>5.1.35</version></dependency><!-- 导入dbcp的jar包,用来在applicationContext.xml中配置数据库 --><dependency><groupId>commons-dbcp</groupId><artifactId>commons-dbcp</artifactId><version>1.4</version></dependency><!-- jstl标签类 --><dependency><groupId>jstl</groupId><artifactId>jstl</artifactId><version>1.2</version></dependency><dependency><groupId>taglibs</groupId><artifactId>standard</artifactId><version>1.1.2</version></dependency><!-- log start --><dependency><groupId>log4j</groupId><artifactId>log4j</artifactId><version>${log4j.version}</version></dependency><dependency><groupId>org.slf4j</groupId><artifactId>slf4j-api</artifactId><version>${slf4j.version}</version></dependency><dependency><groupId>org.slf4j</groupId><artifactId>slf4j-log4j12</artifactId><version>${slf4j.version}</version></dependency><!-- log END --><!-- Json --><!-- 格式化对象,方便输出日志 --><dependency><groupId>com.alibaba</groupId><artifactId>fastjson</artifactId><version>1.2.6</version></dependency><!-- <dependency><groupId>org.codehaus.jackson</groupId><artifactId>jackson-mapper-asl</artifactId><version>1.9.13</version></dependency> --><!-- 上传组件包 start --><dependency><groupId>commons-fileupload</groupId><artifactId>commons-fileupload</artifactId><version>1.3.1</version></dependency><dependency><groupId>commons-io</groupId><artifactId>commons-io</artifactId><version>2.4</version></dependency><dependency><groupId>commons-codec</groupId><artifactId>commons-codec</artifactId><version>1.10</version></dependency><!-- 上传组件包 end --><!-- AL相关添加 --><dependency><groupId>net.sourceforge.jexcelapi</groupId><artifactId>jxl</artifactId><version>2.6</version></dependency><dependency><groupId>org.apache.poi</groupId><artifactId>poi</artifactId><version>3.8</version></dependency><dependency><groupId>org.apache.poi</groupId><artifactId>poi-ooxml</artifactId><version>3.9</version></dependency><!-- AL相关添加 --><!-- ftp --><dependency><groupId>commons-net</groupId><artifactId>commons-net</artifactId><version>3.3</version></dependency></dependencies><build><finalName>dkcjDemo</finalName><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>2.3.2</version><configuration><source>1.7</source><target>1.7</target></configuration></plugin></plugins></build></project>

请教一下 maven 中要加入sigar这个依赖 是org.hyperic.sigar 怎么弄?

之前的依赖没了,换成这个就可以了<dependency><groupId>org.fusesource</groupId><artifactId>sigar</artifactId><version>1.6.4</version></dependency>

maven总是配置不成功,是什么原因?

直接在path里面配置好了,添加maven的bin目录。不用配置 mavne_home

maven project build lifecycle mapping problem怎么样解决

方法步骤如下:1、选择建立MavenProject选择File->New->Other,在New窗口中选择Maven->MavenProject;点击next2、选择项目路径UsedefaultWorkspacelocation默认工作空间3、选择项目类型在ArtifactId中选择maven-archetype-webapp4、输入GroupID和ArtifactID,以及PackageGroupID一般写大项目名称。ArtifactID是子项目名称。Package是默认给你建一个包,不写也可以5.刚建立好后的文件结构如下图如果这里显示的内容多,一般是Filters设置的问题;或perspective为JavaEE模式,改成Java模式就可以了6、配置项目需要添加src/main/java,src/test/java,src/test/resources三个文件夹。右键项目根目录点击New->SourceFolder,建出这三个文件夹注意:不是建普通的Folder,而是SourceFolder7、更改class路径右键项目,JavaBuildPath->Source下面应该有4个文件夹。src/main/java,src/main/resources,src/test/java,src/test/resources选上Allowoutputfoldersforsourcefolders双击每个文件夹的Outputfolder,选择路径src/main/java,src/main/resources,选择target/classes;src/test/java,src/test/resources,选择target/test-classes;在此处还要更改:更改文件夹显示的顺序:点击OrderandExport;更改JDK版本:在Libraries双击JRESystemLibrary,要1.6版本8、把项目变成DynamicWeb项目右键项目,选择ProjectFacets,点击Converttofacetedfro9、配置ProjectFacets更改DynamicWebModule的Version为2.3。(3.0为Java7的)。如果提示错误,可能需要在JavaCompiler设置Compilercompliancelevel为1.6,或者需要在此窗口的Java的Version改成1.610、设置部署程序集(WebDeploymentAssembly)上面步骤设置完成后,点击OK,Properties窗口会关闭,在右键项目打开此窗口。在左侧列表中会出现一个DeploymentAssembly,点击进去后,如下图此处列表是,部署项目时,文件发布的路径。(1)我们删除test的两项,因为test是测试使用,并不需要部署。(2)设置将Maven的jar包发布到lib下。Add->JavaBuildPathEntries->MavenDependencies->Finish设置完成效果图11、构建框架在pom.xml中添加所需要的jar包使用MavenPOMeditor打开项目中的pom.xml文件,选择Dependencies,在Dependencies栏目点击Add进行,首先弹出一个搜索按钮,例如输入jsf,就会自动搜索关于JSF相关的jar包,我们选择2.0.4版本的jsf,将jsf包全部添加进来需要添加的其他jar包有:junit、jstl或者点击pom.xml直接编辑pom.xml文件,这样可以直接copy过来dependencies内容;我们的pom.xml文件可直接复制下面的内容:4.0.0com.smile.maven.demomaven-demo-webwar0.0.1-SNAPSHOTmaven-demo-webMavenWebapp.sun.facesjsf-implversion>2.0.4-b09javax.servletjstl1.2taglibsstandard1.1.2maven-demo-web12、发布对着工程点右键:RunAs->Maveninstall然后再RunAs->Mavenpackage.生成完后用Tomcat跑即可

配置一份需要junit和jdbc依赖的Maven项目基本配置文件。pom.xml?

<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.example</groupId> <artifactId>my-maven-project</artifactId> <version>1.0-SNAPSHOT</version> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.13</version> </dependency> </dependencies></project>

如何使用Gradle的maven-publish将jar包或者war包上传到nexus仓库

登陆已经安装好的nexus私有仓库点击左边菜单“Repositories”,选择右边列表“3rd party“点击“3rd party”,选择artifact Upload在artifact Upload界面显示的有GAV Parameter,groupId,artifactId,Version,Packaging等等参数,界面将以上参数填完之后,选择要上传的jar包,点击”add artifact“,最后点击”save“保存按钮即可

maven项目打包时报错,控制台具体显示如下,这个应该怎么解决?

找不到依赖,一般都是网络问题,无法访问maven仓库导致的。解决办法:设置Maven的代理服务器。在settings.xml文件里面进行仓库的配置,改选择为国内的仓库,如阿里云maven仓库等。

myEclipse中怎么Convert to Maven Project

方法步骤如下:1、选择建立Maven Project 选择File -> New -> Other,在New窗口中选择 Maven -> Maven Project;点击next2、选择项目路径 Usedefault Workspace location默认工作空间3、选择项目类型 在Artifact Id中选择maven-archetype-webapp4 、输入Group ID和 Artifact ID,以及PackageGroup ID一般写大项目名称。Artifact ID是子项目名称。Package是默认给你建一个包,不写也可以5.刚建立好后的文件结构如下图如果这里显示的内容多,一般是Filters设置的问题;或perspective为JavaEE模式,改成Java模 式就可以了6、配置项目 需要添加src/main/java,src/test/java ,src/test/resources三个文件夹。右键项目根目录点击New -> Source Folder,建出这三个文件夹注意:不是建普通的Folder,而是Source Folder7、更改class路径 右键项目,Java Build Path -> Source 下面应该有4个文件夹。src/main/java,src/main /resources,src/test/java ,src/test/resources选上Allow output folders for source folders双击每个文件夹的Output folder,选择路径src/main/java,src/main/resources,选择target/classes;src/test/java ,src/test/resources, 选择target/test-classes;在此处还要更改:更改文件夹显示的顺序:点击Order and Export;更改JDK版本:在Libraries双击JRE System Library,要1.6版本8、把项目变成Dynamic Web项目 右键项目,选择Project Facets,点击Convert to faceted fro9、配置Project Facets 更改Dynamic Web Module的Version为2.3。(3.0为Java7的)。如果提示错误,可能需要在Java Compiler设置Compiler compliance level 为1.6,或者需要在此窗口的Java的Version改成1.610、设置部署程序集(Web Deployment Assembly)上面步骤设置完成后,点击OK,Properties窗口会关 闭,在右键项目打开此窗口。在左侧列表中会出现一个Deployment Assembly,点击进去后,如下图此处列表是,部署项目时,文件发布的路径。(1)我们删除test的两项,因为test是测试使用,并不需要部署。(2)设置将Maven的jar包发布到lib下。Add -> JavaBuild Path Entries -> Maven Dependencies -> Finish设置完成效果图11、构建框架 在pom.xml中添加所需要的jar包使用Maven POM editor打开项目中的pom.xml文件,选择Dependencies,在Dependencies栏目点击Add进行,首先弹出一个搜索按钮,例 如输入jsf,就会自动搜索关于JSF相关的jar包,我们选择2.0.4版本的jsf,将jsf包全部添加进来需要添加的其他jar包有:junit、jstl或者点击pom.xml直接编辑pom.xml文件,这样可以直接copy过来dependencies内容;我们的pom.xml文件可直接复制下面的内容:<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"><modelVersion>4.0.0</modelVersion><groupId>com.smile.maven.demo</groupId><artifactId>maven-demo-web</artifactId><packaging>war</packaging><version>0.0.1-SNAPSHOT</version><name>maven-demo-web Maven Webapp</name><url>http://maven.apache.org</url><dependencies><dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>3.8.1</version><scope>test</scope></dependency><dependency><groupId>com.sun.faces</groupId><artifactId>jsf-api</artifactId><version>2.0.4-b09</version></dependency><dependency><groupId>com.sun.faces</groupId><artifactId>jsf-impl</artifactId>version>2.0.4-b09</version></dependency><dependency><groupId>javax.servlet</groupId><artifactId>jstl</artifactId><version>1.2</version></dependency><dependency><groupId>taglibs</groupId><artifactId>standard</artifactId><version>1.1.2</version></dependency></dependencies><build><finalName>maven-demo-web</finalName></build></project>12、发布 对着工程点右键:Run As ->Maven install 然后再Run As -> Mavenpackage.生成完后用Tomcat跑即可

怎么看maven工程的 archetype

既然想搞maven。那肯定就要用开发工具咯。用eclipse添加mavan插件,创建一个mavan项目。就知道了。个人理解,maven archetype不过就是问你想创建一个什么项目而已。是java,android,还是web。

maven问题,新手求解!

1.Eclipse使用Maven创建Web时找不到maven-archetype-webap或报Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:RELEASE from any of the configured repositories解决方法:window-->preferences-->Maven-->Archetypes-->Add Remote Catalog中添加catalog File:http://repo1.maven.org/maven2/archetype-catalog.xmlDescription: 随便填写2.为Eclipse添加自己的maven环境 选择window-->preferences-->Maven-->Installations-->Add选择本地maven安装目录,-->Apply选择User Settings-->选择本地maven安装目录下conf-->settings.xml-->ok重启Eclipse。3.修改本地maven库地址在settings.xml中<settings ...></settings>添加<localRepository>E:/localMaven/</localRepository>4.启用jetty-run命令settings.xml中添加<pluginGroup>org.mortbay.jetty</pluginGroup>5.规范maven库settings.xml中的<profiles></profiles>增加<repositories><repository><id></id><url>可以为局域网地址</url></repository></repositoories>6.安装jar包到本地maven库mvn install:install-file -Dfile=E:jodconverter-2.2.2.jar -DgroupId=com.artofsolving -DartifactId=jodconverter -Dversion=2.2.2 -Dpackaging=jar -DgeneratePom=true -DcreateChecksum=true7.maven 关联本地项目jar包<dependency> <groupId>com.artofsolving</groupId> <artifactId>jodconverter-core</artifactId> <version>3.0-beta-4</version> <scope>system</scope> <systemPath>${basedir}/lib/jodconverter-core-3.0-beta-4.jar</systemPath> </dependency>lib目录必须与pom.xml同级 8.can not calculate build plan:选中项目右键—》maven-->Update Dependencies.

idea 集成Maven仓库报错Failed to read artifact descriptor for org.apache.maven.plugins?

首先确认一下这个插件对你是否有用,没用的话直接删掉吧,插件对项目没有影响。其次如果需要使用的话,参考一下这个博客?

exclude maven artifact排除一个为什么会全部排除

大多数java应用源码构建和依赖管理是使用maven来实现的,maven也是java构建和依赖管理的事实上的标准。我们的应用系统也都是基于maven构建的,maven虽然在依赖管理方面确实很牛叉,但是并不能很优雅地解决所有依赖的问题,比如此次谈及的“全局排除”功能。 之前包括现在都在经历这样的事情,想禁止一个依赖被依赖进来,如果这个依赖属于冷门的依赖,很少类库会间接依赖它,那么进行一次排除完全OK,但是如果一个依赖是热门依赖,比如常用的apache的commons系列工具库,单独排除也可以实现,只是比较啰嗦,而且以后引入新的依赖就要时刻关心是否会带来不被允许的依赖,对维护人员来说简直是灾难。

Maven中的参数分别是什么意思

  Maven中的主要参数解析如下:  groupId: 代表组织和整个项目的唯一标志。比如说所有的Maven组件的groupId都是org.apache.maven。  artifactId: 具体项目的名称,它于groupId共同确定一个项目在maven repo中的位置,例如,groupId=org.codehaus.mojo, artifactId=my-project的项目,在maven repo中的位置为:$M2_REPO/org/codehaus/mojo/my-project  version: 用于说明目前项目的版本,在引用依赖的时候确定具体依赖的版本号。  packaging: 规定项目的输出格式,包括jar、war、pom、apk等,根据实际需要确定。例如,开发一般的java库,可以使用jar packaging;开发android则是apk packaging。  一般来说,Maven肯定要用到pom文件,全名叫Project Object Model。简单的说,就是这个pom.xml文件含有project的相关信息。以下面的pom文件为例,举个简单的例子:  <project xmlns=",apache.org/POM/4.0.0"  xmlns:xsi=""  xsi:schemaLocation=".apache.org/POM/4.0.0.apache.org/xsd/maven-4.0.0.xsd">  <modelVersion>4.0.0</modelVersion>  <groupId>org.apache.maven</groupId>  <artifactId>my-project</artifactId>  <version>1.2.1</version>  <packaging>war</packaging>  </project>  其中,groupId代表的是唯一的一个标识,比如一个组织或者一个项目的名字,基本上是唯一的,以这个maven为例就是org.apache.maven。  artifactId代表的是名字,如果刚刚那个有点像身份证,这个就是类似姓名的东西。  version比较好理解,就是版本号,比如1.2.1版本这样的。  最后的packaging是我们提供组件的类型,比如使用时打包成一个jar或者是一个war之类的,默认为打成jar包。  还要注意不得不提到maven的一个插件maven-archetype-plugin。这个插件是为了方便我们弄一些模板或者原型直接生成会更加方便。通过cmd指令,我们可以确定我们需要的是哪个原型。还是举个cmd的命令的例子:  mvn archetype:generate -DarchetypeArtifactId=jersey-quickstart-grizzly2 -DarchetypeGroupId=org.glassfish.jersey.archetypes -DinteractiveMode=false -DgroupId=com.example -DartifactId=simple-service -Dpackage=com.example -DarchetypeVersion=2.17  这个命令是直接生成项目的一个指令:  archetypeGroupId:这个和刚刚那个很像,指的是原型唯一的标识archetypeArtifactId:原型的名字。  interactiveMode:交互模式,默认为true。我上面的cmd命令是一次性把该输入的都输入进去了,免去了交互所以是false。如果你选择交互的话,就是有一步一步的选项指引你去选择和填写相关的标识之类的。  archetypeCatalog:这个我例子里面没有,指的是查找规则。  至于后面那些groupId之类的,前面已经说过的就是生成的项目的一些标识名字之类的相关信息,不过要注意这个package是生成项目的包结构而不是提供组件的类型了。

ecilpse中maven项目、配置pom.xml添加依赖jar包出错

虽然没用过maven,不过我认为应该是path没有匹配到的原因是不是应该核对一下拷贝过来的里面的path是不是和现在工程下的路径一样!

maven missing artifact 怎么解决

查看SVN中setting文件中的配置路径是否正确。一般不是这个问题,如果是会爆出很多的问题。所以可以忽略,如果后面解决不了就再来这一步吧!确保远程仓库是有对应jar包的,有可能有jar包,但是和你的版本号不对应,这种情况直接更新版本号就可以。确认本地repository相应目录中是否下载好了对应的包。还有一个是对应包中有“*.lastUpdated”文件影响更新。我的就是这个问题,删除对应的文件即可。 我的文件中有五个这样的文件(通过搜索.lastUpdated找到),然后我删除之后,重新更新就好了。五个文件分别为:commons-csv-1.0-SNAPSHOT.jar.lastUpdated;commons-csv-1.0-SNAPSHOT.pom.lastUpdated;commons-parent-34.pom.lastUpdatedlog4j-1.2.16.jar.lastUpdatedlog4j-1.2.16.pom.lastUpdated

maven 的 artifactId 和 groupId 的实际作用

maven 使用groupId和artifactId 作为坐标来确定该项目的标识。比如<dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>4.1.6.RELEASE</version></dependency>groupId是org.springframeworkartifactId是spring-core这样就可以让maven知道这个jar或者pom所依赖的jar包的位置。version是该项目的版本号。由groupId和artifactId来确定唯一的项目。version决定版本号。

如何确定maven的依赖的groupid和artifactid

maven 使用groupId和artifactId 作为坐标来确定该项目的标识。比如<dependency><groupId>org.springframework</groupId><artifactId>spring-core</artifactId><version>4.1.6.RELEASE</version></dependency>groupId是org.springframeworkartifactId是spring-core这样就可以让maven知道这个jar或者pom所依赖的jar包的位置。version是该项目的版本号。由groupId和artifactId来确定唯一的项目。version决定版本号。

maven groupID 和 ArtifactID的区别与作用

maven 使用groupId和artifactId 作为坐标来确定该项目的标识。比如<dependency><groupId>org.springframework</groupId><artifactId>spring-core</artifactId><version>4.1.6.RELEASE</version></dependency>groupId是org.springframeworkartifactId是spring-core这样就可以让maven知道这个jar或者pom所依赖的jar包的位置。version是该项目的版本号。由groupId和artifactId来确定唯一的项目。version决定版本号。

maven eclipse之后出现Failed to resolve artifact.这个错误

出现以面的情况有两个问题:1、默认的是配置到中央仓库,还有可配置其它的,是否连接仓库正常2、关于maven-war-plugin,可能你那样的配置外网仓库找不到,以下是我的,可以正常使用<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.3</version> </plugin>实在不行再细聊。

maven GroupID和ArtifactID填什么

这是我博客中的原文,菜鸟一个,多多包涵!使用mvn archetype:generate命令让maven自动生成项目结构文件(名字我自己起的。。),项目文件名为testArchetypeGenerate,参数设置如下:[INFO] Parameter: basedir, Value: E:WorkSpaceMaven Workspacecode estArchetypeGenerate[INFO] Parameter: package, Value: liu.qi.ba[INFO] Parameter: groupId, Value: yi.er.san[INFO] Parameter: artifactId, Value: si-wu[INFO] Parameter: packageName, Value: liu.qi.ba[INFO] Parameter: version, Value: 1.0.0-SNAPSHOT[INFO] project created from Old (1.x) Archetype in dir: E:WorkSpaceMaven Workspacecode estArchetypeGeneratesi-wu检验项目中产生的文件后发现:1、产生的项目结构文件与groupId(yi.er.san)无关;2、项目下的模块名就是你的artifactId值(si-wu),即testArchetypeGeneratesi-wu;3、模块文件中递进产生(又是自己发明的用语。。)的文件夹就是依据packageName(liu.qi.ba)创建的,即testArchetypeGeneratesi-wuliuqiaApp.java,其中App.java是自动创建的一个hello world类。总结:1、虽然产生的项目结构文件与groupId无关,但是大家公认的规范是填写项目包名,如com.xx.testArchetypeGenerate;2、artifactId填写你负责的模块名;3、packageName填写你创建的类所在的包名,如com.xx.testArchetypeGenerate.ClassName。

maven中的groupId和artifactId到底指的是什么?

  groupid和artifactId被统称为“坐标”是为了保证项目唯一性而提出的,如果你要把你项目弄到maven本地仓库去,你想要找到你的项目就必须根据这两个id去查找。  groupId一般分为多个段,这里我只说两段,第一段为域,第二段为公司名称。域又分为org、com、cn等等许多,其中org为非营利组织,com为商业组织。举个apache公司的tomcat项目例子:这个项目的groupId是org.apache,它的域是org(因为tomcat是非营利项目),公司名称是apache,artigactId是tomcat。  比如我创建一个项目,我一般会将groupId设置为cn.zr,cn表示域为中国,zr是我个人姓名缩写,artifactId设置为testProj,表示你这个项目的名称是testProj,依照这个设置,你的包结构最好是cn.zr.testProj打头的,如果有个StudentDao,它的全路径就是cn.zr.testProj.dao.StudentDao

java artifact是什么意思,maven一直用,但是不明白中文意思

artifact你把它理解成“生成的东西”就差不多了。这个词强调的是这是你软件生产过程中某一步的产生物,不像程序本身,或者是配置文件这些,是你手写出来的。

maven.变成了-release

ma等ven待.变成.了-r.ele.ase.M.ave.n-release

maven打的包里为什么有的lib是snapshot,有的是带时间戳的

maven默认包后面是没有日期的,只有版本号。如果你想自定义名称,可以使用下面的插件完成,这个插件打包更灵活。在finalName属性中定义就行了。

maven snapshot和release版本的区别

Maven的Snapshot版本与Release版本1. Snapshot版本代表不稳定、尚处于开发中的版本 2. Release版本则代表稳定的版本 3. 什么情况下该用SNAPSHOT? 协同开发时,如果A依赖构件B,由于B会更新,B应该使用SNAPSHOT来标识自己。这种做法的必要性可以反证如下: a.如果B不用SNAPSHOT,而是每次更新后都使用一个稳定的版本,那版本号就会升得太快,每天一升甚至每个小时一升,这就是对版本号的滥用。 b.如果B不用SNAPSHOT, 但一直使用一个单一的Release版本号,那当B更新后,A可能并不会接受到更新。因为A所使用的repository一般不会频繁更新release版本的缓存(即本地repository),所以B以不换版本号的方式更新后,A在拿B时发现本地已有这个版本,就不会去远程Repository下载最新的B 4. 不用Release版本,在所有地方都用SNAPSHOT版本行不行? 不行。正式环境中不得使用snapshot版本的库。 比如说,今天你依赖某个snapshot版本的第三方库成功构建了自己的应用,明天再构建时可能就会失败,因为今晚第三方可能已经更新了它的snapshot库。你再次构建时,Maven会去远程repository下载snapshot的最新版本,你构建时用的库就是新的jar文件了,这时正确性就很难保证了。

“maven snapshot”和“release”版本的区别是什么?

Maven的Snapshot版本与Release版本x0dx0ax0dx0a1. Snapshot版本代表不稳定、尚处于开发中的版本 x0dx0ax0dx0a2. Release版本则代表稳定的版本 x0dx0ax0dx0a3. 什么情况下该用SNAPSHOT? x0dx0a 协同开发时,如果A依赖构件B,由于B会更新,B应该使用SNAPSHOT来标识自己。这种做法的必要性可以反证如下: x0dx0ax0dx0a a.如果B不用SNAPSHOT,而是每次更新后都使用一个稳定的版本,那版本号就会升得太快,每天一升甚至每个小时一升,这就是对版本号的滥用。 x0dx0ax0dx0a b.如果B不用SNAPSHOT, 但一直使用一个单一的Release版本号,那当B更新后,A可能并不会接受到更新。因为A所使用的repository一般不会频繁更新release版本的缓存(即本地repository),所以B以不换版本号的方式更新后,A在拿B时发现本地已有这个版本,就不会去远程Repository下载最新的B x0dx0ax0dx0a4. 不用Release版本,在所有地方都用SNAPSHOT版本行不行? x0dx0a 不行。正式环境中不得使用snapshot版本的库。 比如说,今天你依赖某个snapshot版本的第三方库成功构建了自己的应用,明天再构建时可能就会失败,因为今晚第三方可能已经更新了它的snapshot库。你再次构建时,Maven会去远程repository下载snapshot的最新版本,你构建时用的库就是新的jar文件了,这时正确性就很难保证了。

maven上传nexus仓库snapshot时文件后面有时间戳,希望不带时间戳

回电话有点尴尬大V黄赌毒哥哥不饿会回到家坚持到更黑速回等哈vU盾好的不对劲大家觉得就打很大个ID就多喝点遇到掘港

Primavera In Anticipo (It Is My Song) 歌词

歌曲名:Primavera In Anticipo (It Is My Song)歌手:Laura Pausini专辑:Laura PausiniLaura Pausini - Primavera In Anticipo (It Is My Song)(feat. James Blunt)Per scontato non dòniente di quel che honeanche un minimo brividoora noIt"s the air that I breatheit"s my fall at your feetit is my songI sing when you are goneConfesso sei la causa mia primariaadesso in me di tutto il buono che c"èLo so, sei la primavera in anticipola prova che dimostra quale effetto hai su me perchéAll my hopes and my fears, my hopes, my fearsin this moment are clearyou are the onemy moon, my stars, my sunPer questo nei polmoni cambia l"ariadel resto sei, sei tutto il buono che c"èLo so, questa primavera è in anticipol"esempio che dimostra quanto effetto hai su meFiori che nascono dai roviqui fuori cicatrizzano gli errori mieisei tu senz"alcun dubbio l"artefi cedi questa primavera che c"è,in me, in me qui fuorinell"autoscatto di noi.http://music.baidu.com/song/18179039

求助:hudson调用maven构建报错java.lang.NoClassDefFoundError

java.lang.NoClassDefFoundError: org/sonatype/guice/bean/reflect/ClassSpace你用的Apache Maven 3.1.0-alpha-1 非常不成熟。建议降到正式版,看看还有没有问题。

配置maven的settings.xml时候,怎么添加profile

第一步:配置maven的库1、在本地新建一个文件夹,来存放maven需要的jar库。如下图所示:2、修改maven配置文件settings.xml,D:apache-maven-3.3.3confsettings.xm第二步:eclipse配置maven1、打开cclipse,依次打开Windows-->Prefrences,点击Maven的右边的三角符号,以展开Maven的配置界面2、然后点击Maven下面的Installations选项,出现如下界面,请点击Add按钮3、再后请选择您的maven安装路径,这里我的maven的安装目录为D:apache-maven-3.3.3 ,选择你的maven安装目录,并点击确定, 之后可以点击Apply,点击OK4、再然后点击Maven下面的User Settings选项,点击第二个Browse..按钮,选择第一步配置的maven配置文件settings.xml。然后点击下面的Update Settings按钮,再点击下面的Apply按钮,点击ok就完成了

maven 项目,保存后不自动编译,每次都要clean ,install后,target下面的class文件才会变化

是的,手动操作一下也不麻烦啊

Disco Inferno (Feat. Soundfactory & Mavelicious) 歌词

歌名:Disco Inferno歌手:50 CentLil" mama show me how you move it,Go Ahead put ya back into it,Do ya thang like there aint nothin to it,Shake..shake.. shake that ass girl.Go, Go, Go, 50 in the house - bounce, y"all already know what I"m about.The flow sounds sicker over Dre" drums n*gga,I ain"t stupid - I see Doc and my dope come quicker.Whoa!Shorty" hips is hypnotic, she moves is so erotic, but watch - I"m like bounce that assss girl.I get it crunk in here, I make it jump in here, front in here, we"ll thump in here.Oooohh.I"m so gutter, so ghetto, so hood.So gully, so grimey, what"s good?Outside, the Benz on dubs -I"m in the club wit the snubs - don"t start nothin", it won"t be nothin".Uuuhhh.Lil" mama show me how you move it,Go Ahead put ya back into it,Do ya thang like there aint nothin to it,Shake.. shake.. shake that ass girl.Let"s party, everybody stand up.Everybody put ya hands up.Let"s party, everybody bounce wit me.Sip champagne and burn a little greenery.This hot.Disco Inferno, let"s go.You are now rockin wit a pro.I get toed to flip dough to get more, fo sho".Get my drank on n*gga on the dance floor.Look homie I don"t dance all i do is this.It"s the same 2-step wit a lil" twist.Listen pimpin" I ain"t new to this, I"m true to this.Pay attention boy, I teach how to do this shit.You mix a lil" Cris with a little Don Perignon.And a lil" Hennessy, you know we "finna carry on.Hollerin" at these snakes in da club tryin" to get right,we gonna be up in this bitch "til we break daylight.Lil" mama show me how you move it,Go Ahead put ya back into it,Do ya thang like there aint nothin to it,Shake.. shake.. shake that ass girl.You see me shinin", lit up with diamonds as I stay grindin".Uh-huh.Homie you can catch me swoopin Bentley coupe and switchin lanes.U see me rollin, you know I"m holdin, I"m about my paper, yeah.N*gga I"m serious, I ain"t playin", I"m embeded in ya brain, I"m off the chain.G-Unit!Next level now, turn it up a notch.Em and Dre sent me to tear up the spot.Front on me, oh no, you know I"m loco.Hands up on the dance floor, ok let"s go!Lil" mama show me how you move it,Go Ahead put ya back into it,Do ya thang like there aint nothin to it,Shake.. shake.. shake that ass girl.http://music.baidu.com/song/2576846

maven 问题[ERROR] Child module C:aish-common of C:aishpom.xml does not exist

就是你配错了啊。你看看报错,model C:UsersacerDesktopmavenaishaish-admin的子模块C:UsersacerDesktopmavenaishpom.xml,你的是C:UsersacerDesktopmavenaishaish。2个路径不一样,报错就找不到pom文件。

maven package 打包时,会执行 mybatis-generator-maven-plugin 插件,请问为什么

在使用 mybatis-generator-maven-plugin 进行代码生成后,可能会发现,有些通用方法并没有生成,譬如删除操作,数据库中的数据都是有意义的,删除时尽量都是进行逻辑删除操作的,如果使用代码生成器的删除方法,那么数据会物理删除,这种方法并不是我们所需要的,那么,我们就需要在代码生成过程中,添加一个方法 deleteLogicByIds, 这样,所有代码生成的过程中,如果能够自动生成这个方法,那么,我们的代码量就相当少了。 我们在创建表结构之后,通过 mvn 命令生成代码的过程中,自动生成了我们自定义的一个方法,多么美妙的一件事情。 先上git : http://git.oschina.net/alexgaoyh/MutiModule-parent其中,generatorConfig.xml 文件中,增加 <plugin type="com.MutiModule.common.mybatis.plugin.PaginationPlugin"></plugin><plugin type="com.MutiModule.common.mybatis.plugin.DeleteLogicByIdsPlugin"></plugin>package com.MutiModule.common.mybatis.plugin;import java.util.List;import org.mybatis.generator.api.CommentGenerator;import org.mybatis.generator.api.IntrospectedTable;import org.mybatis.generator.api.PluginAdapter;import org.mybatis.generator.api.dom.java.Field;import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;import org.mybatis.generator.api.dom.java.JavaVisibility;import org.mybatis.generator.api.dom.java.Method;import org.mybatis.generator.api.dom.java.Parameter;import org.mybatis.generator.api.dom.java.TopLevelClass;import org.mybatis.generator.api.dom.xml.Attribute;import org.mybatis.generator.api.dom.xml.TextElement;import org.mybatis.generator.api.dom.xml.XmlElement;/** * mybais mysql 分页相关,扩展 mybatis-generator-maven-plugin 插件功能,生成分页相关 * @author alexgaoyh * */public class PaginationPlugin extends PluginAdapter { @Override public boolean modelExampleClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) { // add field, getter, setter // for limit clause addPage(topLevelClass, introspectedTable, "page"); return super.modelExampleClassGenerated(topLevelClass, introspectedTable); } @Override public boolean sqlMapSelectByExampleWithoutBLOBsElementGenerated( XmlElement element, IntrospectedTable introspectedTable) { XmlElement page = new XmlElement("if"); page.addAttribute(new Attribute("test", "page != null")); page.addElement(new TextElement("limit #{page.begin} , #{page.length}")); element.addElement(page); return super.sqlMapUpdateByExampleWithoutBLOBsElementGenerated(element, introspectedTable); } /** * @param topLevelClass * @param introspectedTable * @param name */ private void addPage(TopLevelClass topLevelClass, IntrospectedTable introspectedTable, String name) { topLevelClass.addImportedType(new FullyQualifiedJavaType( "com.MutiModule.common.vo.mybatis.pagination.Page")); CommentGenerator commentGenerator = context.getCommentGenerator(); Field field = new Field(); field.setVisibility(JavaVisibility.PROTECTED); field.setType(new FullyQualifiedJavaType( "com.MutiModule.common.vo.mybatis.pagination.Page")); field.setName(name); commentGenerator.addFieldComment(field, introspectedTable); topLevelClass.addField(field); char c = name.charAt(0); String camel = Character.toUpperCase(c) + name.substring(1); Method method = new Method(); method.setVisibility(JavaVisibility.PUBLIC); method.setName("set" + camel); method.addParameter(new Parameter(new FullyQualifiedJavaType( "com.MutiModule.common.vo.mybatis.pagination.Page"), name)); method.addBodyLine("this." + name + "=" + name + ";"); commentGenerator.addGeneralMethodComment(method, introspectedTable); topLevelClass.addMethod(method); method = new Method(); method.setVisibility(JavaVisibility.PUBLIC); method.setReturnType(new FullyQualifiedJavaType( "com.MutiModule.common.vo.mybatis.pagination.Page")); method.setName("get" + camel); method.addBodyLine("return " + name + ";"); commentGenerator.addGeneralMethodComment(method, introspectedTable); topLevelClass.addMethod(method); } /** * This plugin is always valid - no properties are required */ public boolean validate(List<String> warnings) { return true; }}

maven中zttc.itat.user是什么意思

groupId、artifactId、version:分别表示 Maven 项目的组织名、构件名、版本号,它们三个合起来就是 Maven 坐标,根据这个坐标可以在 Maven 仓库中对应唯一的 Maven 构件。

eclipse maven goals参数怎么写

eclipse中maven的build里面 选择goals就是要选择需要编译的工程。maven项目编译说明:未用maven前对于普通的java工程,我们如果修改了.java或配置文件,只要他在classes下,只须保存下,eclipse就会编译到bin文件夹下。使用maven后,一般修改了.java或配置文件, eclipse也会帮我们编译到target/classes下。但如果你使用了pom.xml下的properties值来替换配置文件里的${},并只修改了pom.xml里的properties的值,那么eclipse是不会帮我们编译的。还需我们手工编译,方法一使用eclipse maven插件,选择run as maven build...,在goals里输入compile(maven 编译),这样它才会使用maven编译,如果想要生成可执行jar包,需要在goals中输入package把参数设置到配置文件里。方法二使用maven命令,控制台进入当前工程文件夹,执行mvn compile.或者 maven package。

为什么eclipse maven的build里面 选择goals是空白的

  Maven是一个用于项目构建的工具,通过它便捷的管理项目的生命周期。即项目的jar包依赖,开发,测试,发布打包。  下面我自己总结一下它的几个特点,看了这些特点,也许对maven有更多的了解。  1 jar包依赖  这个也许会maven最突出的特点了使用maven不需要上网单独下载jar包,只需要在配置文件pom.xml中配置jar包的依赖关系,就可以自动的下载jar包到我们的项目中。这样,别人开发或者使用这个工程时,不需要来回的拷贝jar包,只需要复制这个pom.xml就可以自动的下载这些jar包。  而且,我们自己下载jar包,还有可能造成版本的不一致,这样在协同开发的过程中就有可能造成代码运行的不一致。通过使用maven精确的匹配jar包,就不会出现这种问题了。  2 项目坐标  Maven通过特定的标识来定义项目名称,这样既可以唯一的匹配其他的jar包,也可以通过发布,使别人能使用自己的发布产品。这个标识就被叫做坐标,长的其实很普通,就是简单的xml而已:1 <groupId>com.test</groupId>2 <artifactId>maventest</artifactId>3 <version>0.0.1-SNAPSHOT</version>4 <packaging>jar</packaging>5 6 <name>maventest</name>7 <url>http://maven.apache.org</url>  groupId:所述的项目名称,由于有的项目并不是一个jar包构成的,而是由很多的jar包组成的。因此这个groupId就是整个项目的名称。  artifactId:包的名称。  version:版本号。  packaging:包的类型,一般都是jar,也可以是war之类的。如果不填,默认就是jar。  name和url,一个是名称,一个是maven的地址。主要就是上面的几个参数。

maven groovy1.8.3.jar放在哪个目录

1.在maven中引入groovy依赖例:<properties> <!--在这里控制groovy 版本 --> <groovy.version>2.0.8</groovy.version> <project.build.sourceEncoding>utf8</project.build.sourceEncoding></properties><dependencies> <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-all</artifactId> <version>${groovy.version}</version> </dependency></dependencies>

groovy比maven好在哪里

Groovy由于轻便的语法,和java的无缝兼容,深受人们的喜爱。使用ide,像eclipse、intellij idea都有专属的插件来编译和运行groovy,maven也有特定的plugin来支持groovy,只是需要配置一下。Maven支持groovy的插件叫Gmaven。需要在pom中引用:代码<plugin> <groupId>org.codehaus.groovy.maven</groupId> <artifactId>gmaven-plugin</artifactId> <version>1.0</version> <executions> <execution> <goals> <goal>generateStubs</goal> <goal>compile</goal> <goal>generateTestStubs</goal> <goal>testCompile</goal> </goals> </execution> </executions></plugin>这里面包含了4个goal,分别用来将groovy源文件生成临时的、与之相对应的 Java 源文件,使得maven编译java文件时不会报错。除了这些,官方说还需要引入一个runtime依赖:代码 <dependency> <groupId>org.codehaus.groovy.maven.runtime</groupId> <artifactId>gmaven-runtime-default</artifactId> <version>1.0-rc-3</version> </dependency>

怎么用ImaveJ测GUS染色

一般分析方法为:Image-Adjust-Threshold,调节Hue(色度)、Saturation(饱和度)与Brightness(亮度)选中胶原计算其面积。该方法需要手动调节HSB阈值,效率低下。高效分析步骤如下:1、ImageJ软件File-Open打开待分析GUS染色图片;2、Image-Color-ColourDeconvolution,选择GUSTrichrome,点击OK即可得到分离结果。GUS染色的分析通常是计算胶原容积分数(Collagenvolumefraction,CVF),即胶原阳性的蓝色面积与组织总面积的百分比。

为什么达拉斯小牛队的队标是一匹马,而且听人家说Maverick的翻译也是马的意思,但为什么要叫作“小牛”呢

我以前在网上看NBA直播的时候,台湾那些地方的解说员也是说成达拉斯小马,我们国内都说成小牛!不清楚,还是小牛听起来更习惯!

maven install时出错望好心人解决一下。小弟先谢谢了

1,首先执行mvn clean install -Dmaven.test.skip=true把测试阶段过滤掉不执行,然后再看报不报错,如果没有报错说明是执行了测试阶段问题需要解决乱码问题,确定一下你的pom文件中的字符定义是否是utf-8,即<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>希望可以帮你解决。

Jungle (Feat. Maverick Sabre) 歌词

歌曲名:Jungle (Feat. Maverick Sabre)歌手:Professor Green专辑:Jungle (Feat. Maverick Sabre)Professor Green feat. Maverick Sabre - JungleI see no point in living life that right,so I just take what I can find.I see no point in living life that right,When you"re out here in this jungle.It"s wild round "ere, you don"t wanna spend a night round "ere.When you"re out here in this jungle,ain"t nothing nice round "ere, troubles what you find round "ere.When you"re out here in this jungle, in this jungle.You"re always caught in this struggle, in this jungle .But you keep asking for trouble, you love?You love when trouble comes your way, your way, your way.Welcome to Hackney, a place where I think somebody"s been playing Jumanji.A Manor where man are like animals, an" they"ll yam on you like they yam on food.Cats with claws that"ll stab a yout", act bad an" catch a slap or two.We don"t applaud success, all we clap are tools.London ain"t cool to cruise through where the hunters pray,Looking lunch today, and your chains looking like fresh fruit to a hungry ape.They"ll eat on you, then laugh about it like Hyenas do,so stick to breezing through, like cheeta"s do or be a piece of food.When you"re out here in this jungle.It"s wild round "ere, you don"t wanna spend a night round "ere.When you"re out here in this jungle,ain"t nothing nice round "ere, troubles what you find round "ere.When you"re out here in this jungle, in this jungle.You"re always caught in this struggle, in this jungle .But you keep asking for trouble, you love?You love when trouble comes your way, your way, your way.It"s blitz admist the strife here, got kids with sticks and knifes here.It"s hype here, we know no different prick; it"s just life here,life the way we know from young the way we"re shown.Stacked trapped in flats where our front doors don"t face the road.God CID spinning round in cars, shifting criminals at large,it"s hard, not to think the bits are just a bing without the bars.Jealousy"s what the cheddar brings, for the cheddar it"s anything goes,low enough to rob newly weds for their wedding ringsEveryday is warring, never give a warning, violence is the only way you settle things,everyday is hating, money that I"m making, jealous "cause I"m moving on to better things,everyday is fighting, rolling in the night now. All you do is watch everyone else get far,you say that life is hard..When you"re out here in this jungle.It"s wild round "ere, you don"t wanna spend a night round "ere.When you"re out here in this jungle,ain"t nothing nice round "ere, troubles what you find round "ere.When you"re out here in this jungle, in this jungle.You"re always caught in this struggle, in this jungle .But you keep asking for trouble, you love?You love when trouble comes your way, your way, your way.http://music.baidu.com/song/2798541

maven怎么引入comet4j

<dependency> <groupId>comet4j-tomcat7</groupId> <artifactId>test</artifactId> <version>1.0</version> <scope>system</scope> <systemPath>${basedir}/src/main/webapp/WEB-INF/lib/comet4j-tomcat7.jar</systemPath></dependency>

springside4 和maven3.0.3 运行pom.xml报错

Detected Maven Version: 2.1-SNAPSHOT is not in the allowed range 3.0.3.你当前使用的是maven2.1 而这个pom要求3.0.3,如果你安装了多个maven,注意环境变量。Detected JDK Version: 1.5.0-11 is not in the allowed range 1.6.你安装的JDK是1.5.0-11, 要求的是1.6, 看来你要安装新版JDK

引入mavenspring-aspects依赖为什么启动服务器失败

在Maven中Spring的基础配置Spring是高度模块化的,可以单独使用Spring的某个库而不需要依赖Spring的其他库。比如,使用Spring Context库不需要依赖Spring Persistence或者Spring MVC库。让我们先从最简单开始,在Maven中配置spring-context依赖:<properties><org.springframework.version>3.2.8.RELEASE</org.springframework.version><!-- <org.springframework.version>4.0.2.RELEASE</org.springframework.version> --></properties><dependency><groupId>org.springframework</groupId><artifactId>spring-context</artifactId><version>${org.springframework.version}</version><scope>runtime</scope></dependency>上例定义的对spring-context的依赖,spring-context实现了Spring注入容器并且依赖:spring-core,spring-expression,spring-aop以及spring-beans。这些依赖包使容器可以支持Spring的一些核心技术:Spring核心组件,Spring EL表达式 (SpEL), 面向切面编程,JavaBean机制。注意,在runtime范围定义这个依赖,因此需求确定在编译期间不需要依赖相关Spring特定的API。在一些高级应用场景下,一些Spring依赖项可以不用配置runtime范围,但是在目前比较简单的项目场景下,不需要针对Spring编译项目去获得整个框架的全部功能。同样要注意的是,从Spring 3.2开始不需要定义CGLIB依赖(目前的版本是CGLIB 3.0)。现在使用内嵌在spring-core JAR(更多详细信息可以查看相关[JIRA]https://jira.springsource.org/browse/SPR-9669("JIRA")中的cglib包(net.sf.cglib现在使用org.springframework.cglib替代)。在Maven配置Spring持久化框架现在来看看Spring持久化框架的配置(主要是spring-orm)

如何给myeclipse的maven配置druid

1、背景及环境这几天在捣鼓Struts2+Spring3+Hibernate4+Maven+EasyUI的整合,JDK1.7,数据库采用Oracle 11g R2,驱动采用ojdbc14,数据库连接池采用阿里巴巴的druid(完整的包名为com.alibaba.druid.pool.DruidDataSource),但是在做用JUnit做单元测试的时候报如下错误:Caused by: java.sql.SQLException: not support oracle driver 1.02、网友问答网上搜了很久,发现最初发表在开源中国上的一篇被转载多次的问答:问:今天第一次使用druid,程序启动的时候报“druid –not support oracle driver 1.0”,换个各种版本驱动(包括ojdbc6),都不行。是因为连接的客户端的版本太低了吗?答:温少说的对,是因为有多个驱动包造成的。在jre的ext目录下发现了class12.jar。3、本文方法我检查了下,发现我的问题并不是这个原因造成的,不过这篇文章给了我点启示,就是数据库驱动的版本问题,后来换用Oracle 11g自带的驱动ojdbc6.jar,问题得到解决。4、本文相关链接①druid介绍:阿里巴巴数据库连接池druid②Maven下如何安装ojdbc6.jar:MyEclipse环境下如何采用Maven导入ojdbc14.jar和ojdbc6.jar③Oracle数据库驱动版本变迁:Oracle数据库驱动历代版本及其区别(classes12,ojdbc14,ojdbc5,ojdbc6等)//---------------------------------------------------------------------------------------------------------------------------------------------------------http://www.coridc.com/archives/2748.html这几天在捣鼓Struts2+Spring3+Hibernate4+Maven+EasyUI的整合,采用Oracle数据库,Oracle数据库驱动采用ojdbc14,后来因为数据库连接池采用阿里巴巴的druid,其中可能存在版本问题而换成了ojdbc6。本文主要介绍MyEclipse环境下利用Maven导入ojdbc14.jar和ojdbc6.jar的方法。1、ojdbc14.jar的导入方法:<dependency><groupid>com.oracle</groupid><artifactid>ojdbc14</artifactid><version>10.2.0.4.0</version></dependency>①与导入其它jar包相同,在项目pom.xml文件中,可以采用Dependencies向导搜索并导入代码,可以发现其Group Id为com.oracle,Artifact Id为ojdbc14,目前最新版本为:10.2.0.4.0,因此有如下代码:如果是其它一些常见的包,如Struts、Spring、Hibernate等,在这步结束后就算导入成功了,但是对于Oracle来说,我们看到的并非这样,MyEclipse中,pom.xml文件打了个红叉,这是因为Oracle JDBC驱动包是需要Oracle官方授权才能被下载,Apache并未提供ojdbc.jar的公开下载(http://search.maven.org/),这一点可到Maven的本地库目录下去找,如:C:UsersAdministrator.m2 epositorycomoracleojdbc1410.2.0.4.0,发现并无ojdbc14-10.2.0.4.0.jar,为此,我们需要从网上自行下载ojdbc.jar②下载ojdbc14包,并在命令行中执行如下语句:mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.4.0 -Dpackaging=jar -Dfile=D:/extJar/ojdbc14.jar执行完后,我们可以在目录C:UsersAdministrator.m2 epositorycomoracleojdbc1410.2.0.4.0下找到包ojdbc14-10.2.0.4.0.jar,刷新项目,成功。注:1)若想执行上述语句,首先需要配置Java的环境变量和Maven的环境变量;2)请注意上述的版本号和ojdbc.jar路径;2、ojdbc6.jar的导入方法:唯一一点与ojdbc14.jar导入方法最大的不同是,当我们在MyEclipse下项目中的pom.xml的Dependencies向导搜索时,无法搜索到ojdbc6.jar这个包,这里我们可以按如下方式解决:①直接在pom.xml中编写代码:<dependency><groupid>com.oracle</groupid><artifactid>ojdbc6</artifactid><version>11.2.0.1.0</version></dependency>②与ojdbc14的方法相同,执行:mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.1.0 -Dpackaging=jar -Dfile=D:appAdministratorproduct11.2.0dbhome_1jdbclibojdbc6.jar完成。

如何在eclipse中基于maven创建osgi的bundle

前言:我相信做基于OSGI框架开发的朋友,对于OSGI的基本单元Bundle应该并不陌生,平时的开发中,做得最多事情就是bundle的开发和打包了,打包其实属于蛮重要的一个过程,为什么说他重要呢,其实打包的过程就是一个理清bundle依赖关系的过程
 首页 上一页  1 2 3