maven - 编译 nativetoascii maven 插件

标签 maven netbeans compilation java

当我编译我的项目时,我遇到了这些问题:

无法在项目 ViewController 上执行目标 org.codehaus.mojo:native2ascii-maven-plugin:1.0-alpha-1:native2ascii(默认):目标 org.codehaus.mojo:native2ascii-maven-plugin:1.0 的执行默认值-alpha-1:native2ascii 失败:启动 Sun 的 native2ascii 时出错:sun.tools.native2ascii.Main -> [帮助 1]

使用 netbeans 7.2jdk 1.7.07 ,但是!!如果我使用 jdk 1.6 就可以了!

当我使用 jdk 1.7 时如何编译它??

感谢帮助!!

pom.xml

<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>${project.parent.groupId}</groupId>
<artifactId>ViewController</artifactId>
<packaging>war</packaging>
<version>${project.parent.version}</version>
<name>ViewController</name>
<url>${project.parent.url}</url>
<organization>
    <name>kMicro</name>
</organization>

<parent>
    <groupId>com.km.eFarmer</groupId>
    <artifactId>eFarmer</artifactId>
    <version>1.0.1-alpha1-SNAPSHOT</version>
</parent>

<dependencies>
    <dependency>
        <groupId>org.glassfish.extras</groupId>
        <artifactId>glassfish-embedded-all</artifactId>
        <version>3.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>DataModel</artifactId>
        <version>${project.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>SOAPClient</artifactId>
        <version>${project.version}</version>
        <scope>provided</scope>
    </dependency>       
    <dependency>
        <groupId>org.jboss.cache</groupId>
        <artifactId>jbosscache-core</artifactId>
        <version>3.2.7.GA</version>
    </dependency>
    <dependency>
        <groupId>org.jboss</groupId>
        <artifactId>jboss-common-core</artifactId>
        <version>2.2.14.GA</version>
    </dependency>
    <dependency>
        <groupId>jgroups</groupId>
        <artifactId>jgroups</artifactId>
        <version>2.6.13.GA</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-core</artifactId>
        <version>3.0.2.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-web</artifactId>
        <version>3.0.2.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-config</artifactId>
        <version>3.0.2.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>8.4-701.jdbc4</version>
        <scope>test</scope>
    </dependency>
    <!--dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-openid</artifactId>
        <version>3.0.2.RELEASE</version>
        <scope>compile</scope>
    </dependency-->
    <dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-api</artifactId>
        <version>2.0.3-FCS</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-impl</artifactId>
        <version>2.0.3-FCS</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>org.openfaces</groupId>
        <artifactId>openfaces</artifactId>
        <version>3.0.2-KM</version>
    </dependency>
    <dependency>  
        <groupId>org.primefaces</groupId>
        <artifactId>primefaces</artifactId>
        <version>3.3.1</version>
    </dependency>
    <dependency>
        <groupId>org.primefaces</groupId>
        <artifactId>primefaces-mobile</artifactId>
        <version>0.9.3</version>
    </dependency>
    <dependency>
        <groupId>org.primefaces.themes</groupId>
        <artifactId>redmond</artifactId>
        <version>1.0.5</version>
    </dependency>
    <dependency>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
        <version>3.2.1</version>
    </dependency>
    <dependency>
        <groupId>commons-beanutils</groupId>
        <artifactId>commons-beanutils</artifactId>
        <version>1.7.0</version>
    </dependency>
    <dependency>
        <groupId>commons-digester</groupId>
        <artifactId>commons-digester</artifactId>
        <version>1.8</version>
    </dependency>
    <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.4</version>
    </dependency>
    <dependency>
        <groupId>cssparser</groupId>
        <artifactId>cssparser</artifactId>
        <version>0.9.5</version>
    </dependency>
    <dependency>
        <groupId>milyn</groupId>
        <artifactId>sac</artifactId>
        <version>1.3</version>
    </dependency>
    <dependency>
        <groupId>jdom</groupId>
        <artifactId>jdom</artifactId>
        <version>1.0</version>
    </dependency>
    <dependency>
        <groupId>jfree</groupId>
        <artifactId>jfreechart</artifactId>
        <version>1.0.13</version>
    </dependency>
    <dependency>
        <groupId>jfree</groupId>
        <artifactId>jcommon</artifactId>
        <version>1.0.16</version>
    </dependency>
    <dependency>
        <groupId>jexcelapi</groupId>
        <artifactId>jxl</artifactId>
        <version>2.6</version>
    </dependency>
    <dependency>
        <groupId>net.sf.jasperreports</groupId>
        <artifactId>jasperreports</artifactId>
        <version>4.5.1</version>            
    </dependency>
    <dependency>
        <groupId>it.eng.spago</groupId>
        <artifactId>sbi-utils</artifactId>
        <version>3.3.0</version>
    </dependency>
    <dependency>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy</artifactId>
        <version>1.7.5</version>
    </dependency>
    <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.0</version>
    </dependency>
    <dependency>
        <groupId>commons-fileupload</groupId>
        <artifactId>commons-fileupload</artifactId>
        <version>1.2.2</version>
    </dependency>

    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-api</artifactId>
        <version>6.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.codehaus.jettison</groupId>
        <artifactId>jettison</artifactId>
        <version>1.1</version>
    </dependency>
    <dependency>
        <groupId>freemarker</groupId>
        <artifactId>freemarker</artifactId>
        <version>2.3.9</version>
    </dependency>
</dependencies>

<build>
    <plugins>

        <!--plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>native2ascii-maven-plugin</artifactId>
            <version>1.0-alpha-1</version>
            <configuration>
                <dest>${project.build.directory}/classes</dest>
                <src>src/main/resources/locale</src>                        
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>native2ascii</goal>
                    </goals>
                    <configuration>
                        <encoding>UTF8</encoding>
                    </configuration>
                </execution>
            </executions>
        </plugin-->

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>jasperreports-maven-plugin</artifactId>
            <configuration>
                <compiler>net.sf.jasperreports.compilers.JRGroovyCompiler</compiler>
                <sourceDirectory>src/main/resources/jasperReportSources</sourceDirectory>
                <outputDirectory>src/main/webapp/reports</outputDirectory>
                <xmlValidation>true</xmlValidation>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>compile-reports</goal>
                    </goals>
                    <phase>compile</phase>
                </execution>
            </executions>
            <dependencies>
                <dependency>
                    <groupId>net.sf.jasperreports</groupId>
                    <artifactId>jasperreports</artifactId>
                    <version>4.5.1</version>
                </dependency>
                <dependency>
                    <groupId>org.codehaus.groovy</groupId>
                    <artifactId>groovy-all</artifactId>
                    <version>1.7.5</version>
                </dependency>
            </dependencies>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.1-alpha-1</version>
            <configuration>
                <archive>
                    <manifest>
                        <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                    </manifest>
                </archive>
            </configuration>
        </plugin>
    </plugins>
    <resources>
        <resource>
            <directory>src/main/resources</directory>
            <excludes>
                <exclude>resources/**</exclude>
            </excludes>                        
        </resource>
        <resource>
            <directory>src/main/resources/font</directory>
        </resource>
    </resources>
</build>

<properties>
    <netbeans.hint.deploy.server>gfv3ee6</netbeans.hint.deploy.server>
    <jdk.version>1.6</jdk.version>
</properties>

最佳答案

将native2ascii-maven-plugin的版本更新到最新版本。

关于maven - 编译 nativetoascii maven 插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12497624/

相关文章:

java - maven-shade-plugin 中的 list 不起作用

java - 在 Netbeans 的项目和文件 Pane 中创建菜单

javascript - Box2D Emscripten : what is box2d. clean.h,如何成功生成它?

java - 无法加载类异常 - wildfly REST

java - 如何为具有外部依赖项的 Java 项目配置 Maven 构建?

java - 在 Netbeans 中创建 JAR 文件时出现 list 文件问题

compilation - CMake:如何为头文件设置 COMPILE_FLAGS?

C 根据优化级别给出不同的输出(新示例)

spring - 为什么 Maven 会下载不同版本的 Spring Artifact ?

java - Netbeans 无法在 mac 中读取 utf8 文件名