Apache camel 为OSGi包生成Javadoc
我是OSGi领域的新手,但我能够在中间件中执行一些Camel和OSGi捆绑包来完成一些任务。此后我所做的一切都是概念证明,但现在我想重构我的部分代码,并开始编写一个OSGi包,其中包含其他OSGi包之间共享的公共功能 为了使它更简洁,我决定写注释并使用javadoc来获得光滑的文档,但我遇到了这个错误:Apache camel 为OSGi包生成Javadoc,apache-camel,javadoc,osgi-bundle,apache-servicemix,maven-javadoc-plugin,Apache Camel,Javadoc,Osgi Bundle,Apache Servicemix,Maven Javadoc Plugin,我是OSGi领域的新手,但我能够在中间件中执行一些Camel和OSGi捆绑包来完成一些任务。此后我所做的一切都是概念证明,但现在我想重构我的部分代码,并开始编写一个OSGi包,其中包含其他OSGi包之间共享的公共功能 为了使它更简洁,我决定写注释并使用javadoc来获得光滑的文档,但我遇到了这个错误: Error resolving version for plugin 'org.apache.maven.plugins:maven-javadoc-plugin' from the repo
Error resolving version for plugin
'org.apache.maven.plugins:maven-javadoc-plugin' from the repositories
我能够为另一个Camel组件运行javadoc
我们有一个本地存储库,其中包含依赖项maven javadoc插件
我将依赖maven javadoc插件添加到我的项目中
我想不出它为什么不起作用了
也许我错了,我用错误的方式使用OSGi包
更新
<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>org</groupId>
<artifactId>test</artifactId>
<version>0.0.1</version>
<packaging>bundle</packaging>
<name>uces OSGi Bundle</name>
<dependencies>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<version>4.3.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.8</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.7</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Activator>org.test.Activator</Bundle-Activator>
<Export-Package>org.test</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>build-for-felix</id>
<dependencies>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.main</artifactId>
<version>4.0.3</version>
<scope>provided</scope>
</dependency>
<!-- To include a shell:
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.gogo.shell</artifactId>
<version>0.10.0</version>
</dependency>
-->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>compile</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<pathconvert property="plugins.jars" pathsep="${path.separator}">
<path refid="maven.runtime.classpath"/>
<map from="${project.build.directory}${file.separator}classes" to=""/>
</pathconvert>
<pathconvert pathsep=" " property="bundles">
<path path="${plugins.jars}"/>
<mapper>
<chainedmapper>
<flattenmapper/>
<globmapper from="*" to="file:modules/*" casesensitive="no"/>
</chainedmapper>
</mapper>
</pathconvert>
<propertyfile file="${project.build.directory}/config.properties">
<entry key="felix.auto.start" value="${bundles} file:modules/${project.build.finalName}.jar"/>
<entry key="org.osgi.framework.bootdelegation" value="*"/>
</propertyfile>
<copy file="${maven.dependency.org.apache.felix.org.apache.felix.main.jar.path}" tofile="${project.build.directory}/felix.jar"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>create-executable-jar</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${basedir}/src/main/assembly/felix.xml</descriptor>
</descriptors>
<finalName>${project.build.finalName}</finalName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>run-on-felix</id>
<dependencies>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.main</artifactId>
<version>4.0.3</version>
<scope>provided</scope>
</dependency>
<!-- org.apache.felix:org.apache.felix.gogo.shell:0.6.1 useless from Maven since stdin is swallowed -->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<configuration>
<target>
<property name="vm.args" value=""/>
<pathconvert property="plugins.jars" pathsep="${path.separator}">
<path refid="maven.runtime.classpath"/>
<map from="${project.build.directory}${file.separator}classes" to=""/>
</pathconvert>
<makeurl property="urls" separator=" ">
<path path="${plugins.jars}"/>
<path location="${project.build.directory}/${project.build.finalName}.jar"/>
</makeurl>
<propertyfile file="${project.build.directory}/run.properties">
<entry key="felix.auto.start" value="${urls}"/>
<entry key="felix.auto.deploy.action" value="uninstall,install,update,start"/>
<entry key="org.osgi.framework.storage" value="${project.build.directory}${file.separator}felix-cache"/>
<entry key="org.osgi.framework.bootdelegation" value="*"/>
</propertyfile>
<makeurl property="run.properties.url" file="${project.build.directory}/run.properties"/>
<java fork="true" jar="${maven.dependency.org.apache.felix.org.apache.felix.main.jar.path}">
<sysproperty key="felix.config.properties" value="${run.properties.url}"/>
<jvmarg line="${vm.args}"/>
</java>
</target>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
4.0.0
组织机构
测试
0.0.1
捆
奥斯吉束
org.osgi
org.osgi.core
4.3.0
假如
com.thoughtworks.xstream
xstream
1.4.8
org.apache.maven.plugins
maven javadoc插件
2.10.3
org.apache.felix
maven捆绑插件
2.3.7
真的
org.test.Activator
组织测试
为菲利克斯建造
org.apache.felix
org.apache.felix.main
4.0.3
假如
org.apache.maven.plugins
maven antrun插件
1.7
编译
包裹
跑
org.apache.maven.plugins
maven汇编插件
2.3
创建可执行jar
包裹
单一的
${basedir}/src/main/assembly/felix.xml
${project.build.finalName}
追上费利克斯
org.apache.felix
org.apache.felix.main
4.0.3
假如
org.apache.maven.plugins
maven antrun插件
1.7
好的,在深入挖掘javadoc页面()并将以下几行添加到构建部分后,我终于找到了答案:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
</plugin>
org.apache.maven.plugins
maven javadoc插件
2.10.3
你能把你的pom发到什么地方吗?我用pom文件更新了我的帖子。