错误信息如下:
12-7-29 上午11时44分06秒: Missing artifact mysql:mysqlconnectorjava:jar:5.1.19:compile
架构如下: parent 项目负责下载jar包, 配置如下:
<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.wjj.example</groupId>
<artifactId>example-parent</artifactId>
<packaging>pom</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>example-parent</name>
<url>http://maven.apache.org</url>
<modules>
<module>../example-core</module>
</modules>
<properties>
<project.build.sourceEncoding>UTF8</project.build.sourceEncoding>
<spring.version>3.1.1.RELEASE</spring.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>example-parent</artifactId>
<version>0.0.1SNAPSHOT</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springtest</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springorm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springcore</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springaop</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springbeans</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springcontext</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springwebmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- hibernate start -->
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernatejpa2.0api</artifactId>
<version>1.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernatecore</artifactId>
<version>3.6.10.Final</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4japi</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.12.1.GA</version>
</dependency>
<!-- hibernate end -->
<!-- database start -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysqlconnectorjava</artifactId>
<version>5.1.19</version>
</dependency>
<dependency>
<groupId>commonsdbcp</groupId>
<artifactId>commonsdbcp</artifactId>
<version>1.4</version>
</dependency>
<!-- database end -->
<!-- j2se -->
<dependency>
<groupId>com.kenai.nbpwr</groupId>
<artifactId>javaxinject</artifactId>
<version>1.0201002241208</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernatevalidator</artifactId>
<version>4.2.0.Final</version>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernatecommonsannotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validationapi</artifactId>
<version>1.0.0.GA</version>
</dependency>
<!-- j2se end -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.6.11</version>
</dependency>
<!-- servlet+jstl+jsp -->
<dependency>
<groupId>servletapi</groupId>
<artifactId>servletapi</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jspapi</artifactId>
<version>2.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>commonsio</groupId>
<artifactId>commonsio</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>commonslogging</groupId>
<artifactId>commonslogging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>commonsfileupload</groupId>
<artifactId>commonsfileupload</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>jsptags</groupId>
<artifactId>pagertaglib</artifactId>
<version>2.0</version>
</dependency>
<!-- json -->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jacksoncoreasl</artifactId>
<version>1.9.6</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jacksonmapperasl</artifactId>
<version>1.9.6</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>mavencompilerplugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>mavenresourcesplugin</artifactId>
<configuration>
<encoding>UTF8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<!-- 使用的是jettymavenplugin的插件 -->
<artifactId>jettymavenplugin</artifactId>
<configuration>
<scanIntervalSeconds>2000</scanIntervalSeconds>
<webApp>
<!-- 上下文路径 -->
<contextPath>/stu</contextPath>
</webApp>
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<!-- 端口号 -->
<port>8787</port>
<maxIdleTime>500000</maxIdleTime>
</connector>
</connectors>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
子模块配置如下:
<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>
<parent>
<groupId>com.wjj.example</groupId>
<artifactId>example-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../example-parent/pom.xml</relativePath>
</parent>
<artifactId>example-core</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>example-core</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysqlconnectorjava</artifactId>
</dependency>
</dependencies>
</project>
就会报上面那个错误。 请教大家一下,解决方案谢谢。!!。
分享到:
相关推荐
在IT行业中,我们经常遇到各种问题,其中之一就是“Missing artifact”错误,这通常发生在Maven项目中,当Maven尝试构建或编译项目时,它找不到依赖的JAR包或库。这个问题通常与`pom.xml`文件有关,它是Maven项目的...
"Missing artifact com.babasport:page:jar:1.0" 这个标题实际上是一个常见的Maven或Gradle构建错误信息,它指出在项目中找不到特定的库或者模块。这个错误通常意味着在构建工程时,Maven或Gradle的依赖解析机制没能...
Missing artifact com.oracle:ojdbc6:jar:11.2.0.1.0问题解决 ojdbc包pom.xml出错 <!-- oracle数据库驱动 --> <groupId>com.oracle</groupId> <artifactId>ojdbc6 <version>11.2.0.1.0 1.首先确定你...
解决“Missing artifact”错误的第一步是检查项目的pom.xml文件,确保PageHelper的依赖已经被正确地添加。在Maven项目中,正确的依赖配置应该如下所示: ```xml <groupId>com.github.pagehelper</groupId> ...
解决Missing artifact com.microsoft.sqlserver:sqljdbc4:jar:4.0问题 所需的sqljdbc4-4.0.jar包 解压放到F:\maven-3.9.6\apache-maven-3.9.6\repository\com\microsoft\sqlserver目录下,然后重启idea,重新加载...
将jasper studio集成到jboss dev eclipse上时,出现本错误,经过好多天的排查,终于明白,特整个过程和资源文件打包。maven -> update project等基本操作不予细说。
<groupId>net.sf.json-lib</groupId> <artifactId>json-lib <version>2.4 <classifier>jdk15 或者直接下载这个包
在Java开发中,Maven是广泛使用的构建工具,它帮助管理项目的依赖关系,自动化构建流程。然而,有时候在运行Maven项目时,可能会遇到找不到特定jar包的问题,比如本例中的`tools-1.8.0.jar`。这个问题通常表明Maven...
1. 解压文件得到:jta-1_0_1B-classes.zip 2. cmd进入zip文件所在目录 3. 执行下面命令从本地安装: mvn install:install-file -Dfile=./jta-1_0_1B-classes.zip -DgroupId=javax.transaction -DartifactId=jta -...
2. **获取完整库**:你可以从官方网站(http://www.activiti.org/)或者Maven仓库(https://mvnrepository.com/artifact/org.activiti)下载最新或特定版本的Activiti库,确保包含所有必需的JAR文件。 3. **对比...
赠送Maven依赖信息文件:mybatis-paginator-1.2.15.pom; 包含翻译后的API文档:mybatis-paginator-1.2.15-javadoc-API文档-中文(简体)版.zip; Maven坐标:com.github.miemiedev:mybatis-paginator:1.2.15; 标签:...
**ImpalaJDBC41: Cloudera大数据访问的关键组件** ImpalaJDBC41是Cloudera提供的一种用于交互式查询和分析大数据的关键组件,它基于Java Database Connectivity (JDBC) 标准,允许应用程序与Cloudera Impala进行...
在IT行业中,数据库是数据存储和...描述中提到的“解决Missing artifact com.microsoft.sqlserver:sqljdbc4:jar:4.0问题”是指在Java项目中,如果缺少对应的Maven或Gradle依赖,那么在编译或运行项目时,会出现找不到`...
进行maven项目开发时,经常会遇到某些jar包无法从中央仓库中下载下来的问题,pom.xml中报missing artifact的错误,遇到这种情况时,可先将无法下载的jar包通过其它途径下载到本地,以本文为例,将所有无法从中央仓库...
附件为:dubbox2.8.4 maven依赖文件。 使用方法:按照依赖关系,自行创建maven依赖文件夹后,将附件解压至指定文件夹即可使用。...可解决Missing artifact com.alibaba:dubbo:jar:2.8.4 dubbo问题。
在Maven或Gradle等构建工具中,当我们构建项目时,如果遇到“Missing artifact”错误,这意味着构建系统无法找到指定的依赖库。在这个例子中,系统找不到`com.sun:`这个groupId下的`tools` artifactId的`jar`类型,...
赠送Maven依赖信息文件:commons-codec-1.15.pom; 包含翻译后的API文档:commons-codec-1.15-javadoc-API文档-中文(简体)版.zip; Maven坐标:commons-codec:commons-codec:1.15; 标签:codec、commons、jar包、...
直接解压到Maven仓库的"com\artofsolving\jodconverter"这个目录下; 如有不明,访问这篇我写的博客; https://blog.csdn.net/qq_39403734/article/details/82020309 物超所值;
赠送Maven依赖信息文件:jboss-logging-3.4.1.Final.pom; 包含翻译后的API文档:jboss-logging-3.4.1.Final-javadoc-API文档-中文(简体)版.zip; Maven坐标:org.jboss.logging:jboss-logging:3.4.1.Final; 标签:...
本资源是国产数据库人大...本地maven 依赖操作mvn install:install-file -Dfile=G:\kingbase8-8.2.0.jar -DgroupId=com.kingbase8 -DartifactId=kingbase8 -Dversion=8.2.0 -Dpackaging=jar 你本地就能用这个依赖了。