maven type bundle什么意思

maven type bundle什么意思,第1张

就是用maven配置bundle工程。

1.在src\main\resources路径下配置features.xml文件,内容如下:

<?xml version="1.0" encoding="UTF-8"?>

<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.0.0 http://karaf.apache.org/xmlns/features/v1.0.0"

name="esbconsoleRepository">

<repository>mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features</repository>

<feature name="${project.artifactId}" version="${project.version}">

<feature version="${camel.version}">camel-http</feature>

<feature version="${camel.version}">camel-jetty</feature>

<bundle>mvn:${project.groupId}/${project.artifactId}/${project.version}</bundle>

</feature>

</features>

2.pom.xml文件要点

2.1:打包成bundle格式文件

<packaging>bundle</packaging>

2.2:配置构建所需插件

<build>

<plugins>

<plugin>

<groupId>org.apache.felix</groupId>

<artifactId>maven-bundle-plugin</artifactId>

<version>2.3.7</version>

<extensions>true</extensions>

<configuration>

<instructions>

<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>

<Bundle-Description>${project.description}</Bundle-Description>

<DynamicImport-Package>*</DynamicImport-Package>

<Import-Package>!*</Import-Package>

<!-- <Import-Package>!antlr.*,!gnu.*,!javassist.*,!javax.persistence.*,!javax.xml.rpc*,!junit.*,*</Import-Package>-->

<Export-Package>com.csair.cod.route*version=${project.version}</Export-Package>

<Embed-Dependency>log4j,svc-sample-fuse-lib,jbossall-client,testejbscope=compile|runtime|system</Embed-Dependency>

</instructions>

</configuration>

</plugin>

<plugin>

<artifactId>maven-compiler-plugin</artifactId>

<version>2.3.2</version>

<configuration>

<source>1.6</source>

<target>1.6</target>

<encoding>UTF-8</encoding>

<!-- add the following args -->

<fork>true</fork>

<meminitial>128m</meminitial>

<maxmem>256m</maxmem>

<!-- if it doesn't work, try 768M, it seems that UTF-16 consumes more

memory -->

</configuration>

</plugin>

<plugin>

<artifactId>maven-resources-plugin</artifactId>

<version>2.4.3</version>

<executions>

<execution>

<id>copy-resources</id>

<phase>validate</phase>

<goals>

<goal>copy-resources</goal>

</goals>

<configuration>

<outputDirectory>${basedir}/target</outputDirectory>

<resources>

<resource>

<directory>src/main/resources</directory>

<filtering>true</filtering>

</resource>

</resources>

</configuration>

</execution>

</executions>

</plugin>

<plugin>

<groupId>org.codehaus.mojo</groupId>

<artifactId>build-helper-maven-plugin</artifactId>

<executions>

<execution>

<id>attach-artifacts</id>

<phase>package</phase>

<goals>

<goal>attach-artifact</goal>

</goals>

<configuration>

<artifacts>

<artifact>

<file>target/features.xml</file>

<type>xml</type>

<classifier>features</classifier>

</artifact>

</artifacts>

</configuration>

</execution>

</executions>

</plugin>

</plugins>

<resources>

<resource>

<directory>src/main/resources</directory>

<filtering>true</filtering>

</resource>

</resources>

</build>

文件损坏。kettlekaraf是一款国外开源的ETL工具,纯java编写,可以在Windows、Linux、Unix上运行,数据抽取高效稳定,但其无法加载受损的stringutils文件,如果存在受损的stringutils文件,软件会第一时间d出警示框,并不予加载。


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/bake/11478960.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-16
下一篇 2023-05-16

发表评论

登录后才能评论

评论列表(0条)

保存