相关疑难解决方法(0)

m2eclipse说"缺少神器"但我可以用cmdline构建!

我正在尝试首次使用这个Sonatype Eclipse插件来处理我可以使用maven从命令行构建的现有(巨大)软件.

我已经将插件配置为使用我的maven 2.2.1安装而不是内置的Maven 3.

在Eclipse中,我有25个项目(通过root pom.xml加载),其中4个有编译错误; maven控制台包含很多像这样的行:

缺少工件commons-logging:commons-logging:jar:1.0.4:compile

我在我的存储库中有所有jar,并正确定义了M2_REPO类路径变量.为什么插件没有看到所有的罐子?

这些项目的.classpath文件只引用"MAVEN2_CLASSPATH_CONTAINER",没有jar列表.Eclipse中的pom.xml在丢失的jar的第一行显示错误,但我可以从命令行构建!

任何的想法?我需要帮助!如果我不解决这个问题,我会尝试迁移到NetBeans.

谢谢.

dependencies m2eclipse maven

23
推荐指数
4
解决办法
5万
查看次数

Jenkins插件开发 - Maven问题:未知包装:hpi

我正在尝试使用Mac OSX开始为Jenkins开发插件.

首先,当我运行'mvn hpi:create'时,下载所有文件需要相当长的时间,每个文件最多需要几分钟.这是很多文件.总时间是4-5小时!为什么这么慢?

然后,当我运行'mvn package'时,我收到此错误:

[ERROR]   
[ERROR]   The project org.sample.jenjondev:firstplugin:1.0-SNAPSHOT
(/Users/jonatanekstedt/Developer/jenkins/firstplugin/pom.xml) has 1 error
[ERROR]     Unknown packaging: hpi @ line 12, column 14
Run Code Online (Sandbox Code Playgroud)

为什么maven不知道hpi?我使用Maven 3.0.4.

这是我的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> 
  <parent> 
    <groupId>org.jenkins-ci.plugins</groupId> 
    <artifactId>plugin</artifactId> 
    <version>1.448</version><!-- which Jenkins version is this plugin 
        built against? --> 
  </parent> 

  <groupId>org.sample.jenjondev</groupId> 
  <artifactId>firstplugin</artifactId> 
  <version>1.0-SNAPSHOT</version> 
  <packaging>hpi</packaging> 

  <repositories> 
    <repository> 
      <id>m.g.o-public</id> 
      <url>http://maven.glassfish.org/content/groups/public/</url> 
    </repository> 
  </repositories> 
  <pluginRepositories> 
    <pluginRepository> 
      <id>m.g.o-public</id> 
      <url>http://maven.glassfish.org/content/groups/public/</url> 
    </pluginRepository> 
  </pluginRepositories> 
</project> 
Run Code Online (Sandbox Code Playgroud)

我已将Jenkins的<version>更改为我的计算机上的版本,1.448.我该如何解决这个错误?

maven-3 jenkins jenkins-plugins

8
推荐指数
1
解决办法
5361
查看次数