子项目的pom.xml创建了postgresql-42.2.5.jar依赖
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
错误提示:
[WARNING] Unable to create Maven project from repository for artifact org.postgresql:postgresql:jar:42.2.5
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[ERROR] Unknown packaging: bundle @ line 11, column 14
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:191)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:326)
……
Caused by: org.apache.maven.model.building.ModelBuildingException: 1 problem was encountered while building the effective model for org.postgresql:postgresql:42.2.5
[ERROR] Unknown packaging: bundle @ line 11, column 14

调试发现去掉父项目pox.xml下面一段就不提示错误了:
                              <executions>
<execution>
<id>generate-site</id>
<phase>generate-resources</phase>
<goals>
<goal>site</goal>
</goals>
</execution>
</executions>
这是怎么回事?有没有其他解决办法?谢谢!

解决方案 »

  1.   

    重新去下载一个jar包
      

  2.   

    你这错误应该是bundle打包问题的错误吧,报的是打包模式的错误,试下在下面插件中添加代码:<extensions>true</extensions>
     <plugin>
                    <!--bundle打包方式需要用的插件,为了实现osgi的服务-->
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <extensions>true</extensions>
                    <configuration>
                        <instructions>
                            <Import-Package>
                                *
                            </Import-Package>
                            <Private-Package>
                                <!--项目中类所在的根目录-->
                                com.demo
                            </Private-Package>
                        </instructions>
                    </configuration>
                </plugin>
    如果去掉parent,就不报错,是不是没有添加
    <relativePath>../pom.xml</relativePath>
      

  3.   

    子项目中有<relativePath>..</relativePath>如下:
    <parent>
    <groupId>org.apache.openmeetings</groupId>
    <artifactId>openmeetings-parent</artifactId>
    <version>4.0.8</version>
    <relativePath>..</relativePath>
    </parent>