apache camel - Generate Javadoc for OSGi bundle -
i'm newbie in osgi world able camel , osgi bundles tasks in middleware. made since proof of concept, want refactor part of code , start writing osgi bundle contain common functionalities shared among other osgi bundles.
to make clean, decide write comments , use javadoc sleek documentation, i'm stuck error:
error resolving version plugin 'org.apache.maven.plugins:maven-javadoc-plugin' repositories
i able run javadoc camel component;
we have local repository dependency maven-javadoc-plugin in;
i add dependency maven-javadoc-plugin project;
i'm running out of ideas why doesn't work.
maybe i'm wrong , using osgi bundle in wrong way...
update
<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> <!-- include 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 maven since stdin 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>
ok, found response after digging more in javadoc page (javadoc documentation) , add these lines build section:
<plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-javadoc-plugin</artifactid> <version>2.10.3</version> </plugin>
Comments
Post a Comment