0 Replies Latest reply on Aug 27, 2014 5:02 AM by zyw090111

    ServiceMix 部署 war spring报错

    zyw090111

      QQ截图20140827165613.jpg

      我的pom文件是

      <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/maven-v4_0_0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <groupId>cn.ourfuture</groupId>
        <artifactId>activiti-web-demo</artifactId>
        <packaging>war</packaging>
        <version>0.0.1-SNAPSHOT</version>
        <name>activiti-web-demo Maven Webapp</name>
        <url>http://maven.apache.org</url>
        <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <webapp-dir>${project.artifactId}-${project.version}</webapp-dir>
        <webapp-outdir>${basedir}/target/${webapp-dir}</webapp-outdir>
        <spring.version>3.2.4.RELEASE</spring.version>
        </properties>
        <dependencies>
      
        <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.5</version>
        </dependency>
      
      
        <dependency>
        <groupId>jstl</groupId>
        <artifactId>jstl</artifactId>
        <version>1.2</version>
        </dependency>
      
      
      
      
        <dependency>
        <groupId>javax.servlet.jsp</groupId>
        <artifactId>jsp-api</artifactId>
        <version>2.2</version>
        </dependency>
      
      
        <dependency>
        <groupId>org.activiti</groupId>
        <artifactId>activiti-spring</artifactId>
        <version>5.15</version>
        </dependency>
      
      
        <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <version>1.3.170</version>
        </dependency>
      
      
        <!-- <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId>
        <version>1.7.6</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId> <version>1.1.1</version> </dependency> -->
        <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>${spring.version}</version>
        </dependency>
        <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>${spring.version}</version>
        </dependency>
        <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jdbc</artifactId>
        <version>${spring.version}</version>
        </dependency>
        <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>${spring.version}</version>
        </dependency>
        <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context-support</artifactId>
        <version>${spring.version}</version>
        </dependency>
        <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-expression</artifactId>
        <version>${spring.version}</version>
        </dependency>
        <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-tx</artifactId>
        <version>${spring.version}</version>
        </dependency>
        <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-orm</artifactId>
        <version>${spring.version}</version>
        <scope>provided</scope>
        </dependency>
        </dependencies>
        <build>
        <finalName>activiti-web-demo</finalName>
        <plugins>
        <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.5.1</version>
        <configuration>
        <source>1.7</source>
        <target>1.7</target>
        </configuration>
        </plugin>
      
      
      
      
      
      
        <!-- maven-bundle-plugin config, needed to make this war deployable in
        karaf, defines the context that this bundle should handle requests on -->
        <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.3.6</version>
        <executions>
        <execution>
        <id>bundle-manifest</id>
        <phase>process-classes</phase>
        <goals>
        <goal>manifest</goal>
        </goals>
        </execution>
        </executions>
        <configuration>
        <manifestLocation>${webapp-outdir}/META-INF</manifestLocation>
        <supportedProjectTypes>
        <supportedProjectType>jar</supportedProjectType>
        <supportedProjectType>bundle</supportedProjectType>
        <supportedProjectType>war</supportedProjectType>
        </supportedProjectTypes>
        <instructions>
        <Webapp-Context>activitidemo</Webapp-Context>
        <Web-ContextPath>/activitidemo</Web-ContextPath>
        <Import-Package>*,org.springframework.*
        </Import-Package>
        <!-- <Embed-Directory>/WEB-INF/lib</Embed-Directory> -->
        <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
        <!-- <Embed-Transitive>true</Embed-Transitive> -->
      
      
        <Bundle-ClassPath>.</Bundle-ClassPath>
      
      
        <Bundle-Name>${project.artifactId}</Bundle-Name>
        <Bundle-ManifestVersion>2</Bundle-ManifestVersion>
        <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
        <Implementation-Title>activitidemo</Implementation-Title>
        <Implementation-Version>${project.version}</Implementation-Version>
        </instructions>
        </configuration>
        </plugin>
      
      
        <!-- We define the maven-war-plugin here and make sure it uses the manifest
        file generated by the maven-bundle-plugin. We also ensure it picks up our
        filtered web.xml and not the one in src/main/resources -->
        <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.1.1</version>
        <configuration>
        <outputFileNameMapping>@{artifactId}@-@{baseVersion}@@{dashClassifier?}@.@{extension}@</outputFileNameMapping>
        <packagingExcludes>**/classes/OSGI-INF/**</packagingExcludes>
        <failOnMissingWebXml>false</failOnMissingWebXml>
        <archive>
        <manifestFile>${webapp-outdir}/META-INF/MANIFEST.MF</manifestFile>
        </archive>
        <webResources>
        <resource>
        <filtering>true</filtering>
        <directory>src/main/resources</directory>
        <includes>
        <include>**/*.*</include>
        </includes>
        </resource>
        </webResources>
        </configuration>
        </plugin>
      
      
      
      
      
      
        <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>9.2.1.v20140609</version>
        <configuration>
        <webAppConfig>
        <contextPath>/</contextPath>
        </webAppConfig>
        <systemProperties>
        <!-- enable easy JMX connection to JConsole -->
        <systemProperty>
        <name>com.sun.management.jmxremote</name>
        <value />
        </systemProperty>
        </systemProperties>
        <scanIntervalSeconds>10</scanIntervalSeconds>
        </configuration>
        </plugin>
        </plugins>
        </build>
      </project>
      
      

      请求Freeman小屋 帮助,我们团队最近在高JBossFuse,遇到的问题很多。因为像camel和karaf都是第一次弄,请求帮助。不胜感激。zyw090111@163.com