maven 打包问题
打包的时候提示包找不到
<project> <modelVersion>4.0.0</modelVersion> <groupId>storm</groupId> <artifactId>storm-cassandra</artifactId> <version>1.0</version> <dependencies> <dependency> <groupId>cassandra-jdbc-.1.1.1</groupId> <artifactId>cassandra-jdbc</artifactId> <version>1.1.1</version> </dependency> <dependency> <groupId>storm</groupId> <artifactId>storm</artifactId> <version>0.8.2</version> </dependency> <dependency> <groupId>libthrift7-0.7.0</groupId> <artifactId>libthrift7</artifactId> <version>0.7.0</version> </dependency> </dependencies> <build> <sourceDirectory>src</sourceDirectory> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> <encoding>UTF-8</encoding> </configuration> </plugin> <!-- 把依赖的jar包拷到lib目录下 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>copy-dependencies</id> <phase>package</phase> <goals> <goal>copy-dependencies</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project>这是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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>storm-cassandra</groupId> <artifactId>storm-cassandra</artifactId> <version>1.0</version> <dependencys> <dependency> <groupId>storm</groupId> <artifactId>storm</artifactId> <version>0.8.2</version> </dependency> <dependency> <groupId>caaaandra-jdbc</groupId> <artifactId>caaaandra-jdbc1</artifactId> <version>1.1.1</version> </dependency> <dependency> <groupId>libthrift7</groupId> <artifactId>libthrift71</artifactId> <version>0.7.0</version> </dependency> </dependencys> <build> <plugins> <!-- bind the maven-assembly-plugin to the package phase this will create a jar file without the storm dependencies suitable for deployment to a cluster. --> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <archive> <manifest> <mainClass>com.iimedia.storm.db.Test</mainClass> </manifest> </archive> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.5.1</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> </build> </project>这是修改的
这个是.m2本地库
[INFO] Scanning for projects... [ERROR] The build could not read 1 project -> [Help 1] [ERROR] The project (E:iimediastorm-cassandrapom.xml) has 1 error [ERROR] Non-parseable POM E:iimediastorm-cassandrapom.xml: Duplicated tag: 'artifactId' (position: START_TAG seen ...</groupId>rnttt<artifactId>... @10:16) -> [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException现在的错误是这个了
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
我也想知道这个错误是真么解决的,因为我也遇到了。
我严重怀疑groupId写的不正确
哪个包找不到,能贴一下错误信息吗
这jar是干啥用的
哪个包找不到,能贴一下错误信息吗
cassandra-jdbc-.1.1.1 这写的对?
哪个包找不到,能贴一下错误信息吗
cassandra-jdbc-.1.1.1 这写的对?
我严重怀疑groupId写的不正确