gpt4 book ai didi

java - Blueprint Maven 插件 RuntimeException

转载 作者:行者123 更新时间:2023-11-30 02:50:29 27 4
gpt4 key购买 nike

我的代码中没有任何蓝图注释,但是当我尝试使用 Maven 构建我的包时,我得到了

[ERROR] Failed to execute goal org.apache.aries.blueprint:blueprint-maven-plugin:1.1.0:blueprint-generate
(default) on project data-collection-terminal-updates: Error building
commands help: RuntimeException - [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal
org.apache.aries.blueprint:blueprint-maven-plugin:1.1.0:blueprint-generate
(default) on project data-collection-terminal-updates: Error building
commands help
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error
building commands help
at org.apache.aries.blueprint.plugin.GenerateMojo.execute(GenerateMojo.java:80)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more Caused by: java.lang.RuntimeException
at org.apache.xbean.asm5.MethodVisitor.visitParameter(Unknown Source)
at org.apache.xbean.asm5.ClassReader.b(Unknown Source)
at org.apache.xbean.asm5.ClassReader.accept(Unknown Source)
at org.apache.xbean.asm5.ClassReader.accept(Unknown Source)
at org.apache.xbean.finder.AbstractFinder.readClassDef(AbstractFinder.java:581)
at org.apache.xbean.finder.AbstractFinder.readClassDef(AbstractFinder.java:576)
at org.apache.xbean.finder.AbstractFinder.readClassDef(AbstractFinder.java:562)
at org.apache.xbean.finder.ClassFinder.<init(ClassFinder.java:122)
at org.apache.aries.blueprint.plugin.GenerateMojo.createProjectScopeFinder(GenerateMojo.java:96)
at org.apache.aries.blueprint.plugin.GenerateMojo.execute(GenerateMojo.java:70)
... 21 more

有人可以解释一下,这里有什么问题吗?我尝试用谷歌搜索,但没有找到任何东西。

<小时/>

更新:pom.xml

<modelVersion>4.0.0</modelVersion>

<groupId>ru.bia.prisma</groupId>
<artifactId>data-collection-terminal-updates</artifactId>
<version>1.0.0</version>
<repositories>
<repository>
<id>repository.springsource.com.release</id>
<name>SpringSource OBR - Release</name>
<url>http://repository.springsource.com/maven/bundles/release</url>
</repository>
<repository>
<id>repository.springsource.com.external</id>
<name>SpringSource OBR - External</name>
<url>http://repository.springsource.com/maven/bundles/external</url>
</repository>
</repositories>
<name>Server core for DCT updates</name>
<packaging>bundle</packaging>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>2.23.1</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>2.23.1</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<version>2.23.1</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>2.23.1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.7</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<version>4.3.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.2.0.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.enterprise</artifactId>
<version>4.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>3.5.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.4-1206-jdbc41</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.cdi</groupId>
<artifactId>pax-cdi-api</artifactId>
<version>0.12.0</version>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>javax.transaction-api</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<version>2.8.1</version>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>com.springsource.javax.inject</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
<version>1.0.0.Final</version>
</dependency>
<dependency>
<groupId>org.apache.aries.blueprint</groupId>
<artifactId>org.apache.aries.blueprint.annotation.api</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.xbean</groupId>
<artifactId>xbean-bundleutils</artifactId>
<version>4.5</version>
</dependency>
<dependency>
<groupId>org.apache.xbean</groupId>
<artifactId>xbean-finder-shaded</artifactId>
<version>4.5</version>
</dependency>

<!--<dependency>-->
<!--<groupId>ru.bia.ldap</groupId>-->
<!--<artifactId>LDAPConnector</artifactId>-->
<!--<version>1.0</version>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>joda-time</groupId>-->
<!--<artifactId>joda-time</artifactId>-->
<!--<version>2.9.4</version>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>org.hibernate</groupId>-->
<!--<artifactId>hibernate-jpamodelgen</artifactId>-->
<!--<version>5.2.0.Final</version>-->
<!--</dependency>-->
</dependencies>

<build>
<outputDirectory>target/classes</outputDirectory>

<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>web/config/**</exclude>
<exclude>web/config/**/*</exclude>
</excludes>
</resource>
</resources>

<plugins>
<plugin>
<groupId>org.apache.aries.blueprint</groupId>
<artifactId>blueprint-maven-plugin</artifactId>
<version>1.1.0</version>
<configuration>
<scanPaths>
<scanPath>ru.bia.prisma.data_collection_terminal_updates</scanPath>
</scanPaths>
</configuration>
<executions>
<execution>
<goals>
<goal>blueprint-generate</goal>
</goals>
<phase>process-classes</phase>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.1</version>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.0</version>

<configuration>
<workingDirectory>src/main/resources/web/config</workingDirectory>
<nodeVersion>v6.3.1</nodeVersion>
<npmVersion>2.15.8</npmVersion>
</configuration>

<executions>
<execution>
<id>gulp build</id>
<goals>
<goal>install-node-and-npm</goal>
<goal>gulp</goal>
</goals>
<phase>generate-resources</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.0.1</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Name>DataCollectionTerminalUpdates</Bundle-Name>
<Bundle-Version>1.0.0</Bundle-Version>
<Import-Package>
org.osgi.framework,
org.postgresql,
org.apache.commons.fileupload,
org.apache.commons.fileupload.disk,
org.apache.commons.fileupload.servlet,
javax.servlet,
javax.servlet.http,
waffle.windows.auth;resolution:=optional,
waffle.windows.auth.impl;resolution:=optional,
com.sun.jna;resolution:=optional,
com.sun.jna.platform.win32;resolution:=optional,
com.sun.jna.ptr;resolution:=optional,
com.sun.jna.win32;resolution:=optional,
javax.persistence,
org.hibernate.proxy,
javassist.util.proxy,
org.codehaus.jackson.xc,
<!--ru.bia.ldap.service,-->
*
</Import-Package>
<Bundle-Activator>ru.bia.prisma.data_collection_terminal_updates.osgi.Activator
</Bundle-Activator>
<Bundle-ClassPath>., META-INF</Bundle-ClassPath>
<Meta-Persistence>META-INF/persistence.xml</Meta-Persistence>
<Web-ContextPath>dct-updates</Web-ContextPath>
<_wab>src/main/resources/web/build</_wab>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

最佳答案

blueprint-maven-plugin 版本 1.4.0 仍然会出现这种情况。正如 @henning-luther 在上述问题的评论中所指出的(很难看到),这是错误 https://issues.apache.org/jira/browse/XBEAN-276 =https://issues.apache.org/jira/browse/XBEAN-286在Xbean(不是blueprint-maven-plugin)中,并且可以像这样修复:

  <plugin>
<groupId>org.apache.aries.blueprint</groupId>
<artifactId>blueprint-maven-plugin</artifactId>
<version>1.4.0</version>
<configuration>
<scanPaths>
<scanPath>org.opendaylight</scanPath>
</scanPaths>
</configuration>
<dependencies>
<dependency>
<!-- https://stackoverflow.com/questions/38825386/blueprint-maven-plugin-runtimeexception -->
<groupId>org.apache.xbean</groupId>
<artifactId>xbean-finder-shaded</artifactId>
<version>4.5</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>blueprint-generate</goal>
</goals>
</execution>
</executions>
</plugin>

关于java - Blueprint Maven 插件 RuntimeException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38825386/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com