[root@localhost storm-starter-master]# mvn -f m2-pom.xml package
[INFO] Scanning for projects...
Downloading: http://repo.maven.apache.org/maven2/com/theoryinpractise/clojure-maven-plugin/1.3.8/clojure-maven-plugin-1.3.8.pom
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project storm.starter:storm-starter:0.0.1-SNAPSHOT (/home/lmy/storm-starter-master/m2-pom.xml) has 1 error
[ERROR] Unresolveable build extension: Plugin com.theoryinpractise:clojure-maven-plugin:1.3.8 or one of its dependencies could not be resolved: Failed to collect dependencies for com.theoryinpractise:clojure-maven-plugin:jar:1.3.8 (): Failed to read artifact descriptor for com.theoryinpractise:clojure-maven-plugin:jar:1.3.8: Could not transfer artifact com.theoryinpractise:clojure-maven-plugin:pom:1.3.8 from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org: Name or service not known: Unknown host repo.maven.apache.org: Name or service not known -> [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/PluginResolutionException
问题补充:附 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.starter</groupId>
<artifactId>storm-starter</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>storm-starter</name>
<url>https://github.com/nathanmarz/storm-starter</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>github-releases</id>
<url>http://oss.sonatype.org/content/repositories/github-releases/</url>
</repository>
<repository>
<id>clojars.org</id>
<url>http://clojars.org/repo</url>
</repository>
<repository>
<id>repo.maven.apache.org</id>
<url>http://repo.maven.apache.org/maven2</url>
</repository>
<repository>
<id>twitter4j</id>
<url>http://twitter4j.org/maven2</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>storm</groupId>
<artifactId>storm</artifactId>
<version>0.8.1</version>
<!-- keep storm out of the jar-with-dependencies -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.twitter4j</groupId>
<artifactId>twitter4j-core</artifactId>
<version>[2.2,)</version>
</dependency>
<dependency>
<groupId>org.twitter4j</groupId>
<artifactId>twitter4j-stream</artifactId>
<version>[2.2,)</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/jvm</sourceDirectory>
<resources>
<resource>
<directory>${basedir}/multilang</directory>
</resource>
</resources>
<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></mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.theoryinpractise</groupId>
<artifactId>clojure-maven-plugin</artifactId>
<version>1.3.8</version>
<extensions>true</extensions>
<configuration>
<sourceDirectories>
<sourceDirectory>src/clj</sourceDirectory>
</sourceDirectories>
</configuration>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
相关推荐
当执行`mvn clean`时,Maven会删除`target`目录中的内容,包括编译好的类文件、测试报告等。 2. **package**:编译源代码并将其打包成一个可部署的格式。对于Java Web应用程序来说,这通常意味着生成一个`.war`文件...
摘要:本文主要讲解是Maven使用过程中一些常用的命令,并配上图片说明,最后还讲...清理项目生产的临时文件,一般是模块下的target目录下面来看看目录:2、mvnpackage说明:项目打包工具,会在模块下的target目录生成jar或
6. **依赖冲突解决**:Maven采用"最接近原则"解决依赖冲突,即当两个或更多依赖引入相同jar的不同版本时,会选择离当前模块最近的版本。 7. **聚合与继承**:聚合(aggregation)允许一个项目包含其他项目,而继承...
例如,程序打包成 jar 包后,放在 Storm 上运行时,可能会出现找不到或无法加载主类的错误。解决这个问题的方法是,检查类的路径是否正确,或者返回上一层目录,再使用该命令。 本文档介绍了 Storm 编程实践的实践...
3. **构建项目**: 使用`mvn compile`进行编译,`mvn test`运行测试,`mvn package`打包项目,`mvn install`将项目安装到本地仓库。 4. **部署项目**: 使用`mvn deploy`可以将项目部署到远程仓库,供其他项目使用。 ...
当遇到“无效的目标发行版”错误时,可能是由于Maven使用了不正确的JDK版本。此时,需要确保系统环境变量中设置的JDK版本与项目所需版本一致。如果问题仍然存在,可以在pom.xml中显式指定JDK版本,如上述代码所示。...
3. **构建生命周期**:Maven有预定义的构建生命周期,包括clean(清理)、validate(验证)、compile(编译)、test(测试)、package(打包)、install(安装)和deploy(部署)等阶段。 4. **插件系统**:Maven...
eclipse 中编译、运行都正常,但是如果用maven的打包命令 mvn clean package 进行打包时会发现有类型错误
- Maven提供了多种命令,如`mvn clean`清理构建输出,`mvn compile`编译源代码,`mvn install`安装到本地仓库,`mvn package`打包项目。 7. **构建过程** - `mvn compile`执行编译,`mvn test`运行单元测试,`mvn...
- 打包项目:使用`mvn package`,Maven会生成JAR或WAR文件。 - 安装到本地仓库:`mvn install`将项目及其依赖安装到本地仓库,便于其他项目引用。 - 部署到远程仓库:`mvn deploy`将最终的包部署到远程仓库,供团队...
2. **构建项目**:通过 `mvn clean compile` 清理并编译项目,`mvn test` 执行测试,`mvn package` 打包应用,`mvn install` 将打包后的 JAR 或 WAR 文件安装到本地仓库。 3. **依赖管理**:在 `pom.xml` 文件中...
例如,`mvn clean`用于清理项目产生的临时文件,`mvn compile`用于编译源代码,`mvn package`则会打包项目并生成可部署的JAR或WAR文件。在Kettle项目中,可能还需要执行`mvn install`来安装项目到本地仓库,以便其他...
- `mvn package`:打包项目,生成最终的JAR或WAR文件。 - `mvn install`:将项目安装到本地仓库,供其他项目使用。 - `mvn deploy`:发布项目到远程仓库。 9. **M1芯片的兼容性** 对于搭载M1芯片的MacBook,...
2. **构建项目**:`mvn compile`用于编译源代码,`mvn test`执行单元测试,`mvn package`打包项目,如生成JAR或WAR文件。 3. **依赖解决**:Maven会自动处理项目的依赖关系,通过`mvn dependency:tree`可以查看项目...
本示例将详细介绍如何使用Maven搭建一个基础的Web项目,并解决创建过程中可能出现的报错问题。 ### 一、Maven环境配置 首先,确保你已经安装了Java Development Kit (JDK),因为Maven是基于Java的。接着,下载Maven...
本篇文章将详细探讨"Maven搭建、集成,创建聚合项目问题及错误解决"的相关知识点。 一、Maven本地搭建 在开始使用Maven之前,首先需要在本地安装Maven。这通常涉及下载最新版本的Maven,解压到合适的位置,并将...
2. 创建Maven的Web项目:`mvn archetype:create -DgroupId=packageName -DartifactId=webappName -DarchetypeArtifactId=maven-archetype-webapp` 编译和测试 3. 编译源代码:`mvn compile` 4. 编译测试代码:`mvn...
- **构建项目**:使用`mvn clean compile`进行清理、编译,`mvn test`执行单元测试,`mvn package`打包项目,`mvn install`将结果安装到本地仓库。 - **依赖管理**:在POM.xml中声明依赖,Maven会自动下载并管理这些...
要打包成JAR,可以使用`mvn package`。 ** 总结 ** Maven 3.6.3的安装涉及下载、解压、设置环境变量和验证安装。一旦配置完成,Maven将极大地简化Java项目的构建和依赖管理。通过POM文件,你可以轻松管理项目依赖...
2. 创建 Maven 的 Web 项目:`mvn archetype:create -DgroupId=packageName -DartifactId=webappName -DarchetypeArtifactId=maven-archetype-webapp` 3. 反向生成 Maven 项目的骨架:`mvn archetype:generate` ...