Maven禁用插件

时间:2016-07-26 16:57:27

标签: java maven

如何仅在需要时执行maven-jaxb2-plugin插件(例如从命令行或使用soem配置)

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

        <plugins>
            <plugin>
                <groupId>org.jvnet.jaxb2.maven2</groupId>
                <artifactId>maven-jaxb2-plugin</artifactId>
                <version>0.13.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <schemaLanguage>WSDL</schemaLanguage>
                    <generatePackage>com.example.action.wsdl</generatePackage>
                    <schemas>
                        <schema>
                            <url>http://localhost:8080/wsSecond/action.wsdl</url>
                        </schema>
                    </schemas>
                </configuration>
            </plugin>
        </plugins>

1 个答案:

答案 0 :(得分:2)

查看maven个人资料

http://maven.apache.org/guides/introduction/introduction-to-profiles.html

并从命令行使用

激活配置文件
Error:(59, 42) java: incompatible types: invalid method reference
no suitable method found for add(java.lang.Object)
    method java.util.Collection.add(me.megamichiel.animatedmenu.command.CommandExecutor.CommandHandler) is not applicable
      (argument mismatch; java.lang.Object cannot be converted to me.megamichiel.animatedmenu.command.CommandExecutor.CommandHandler)
    method java.util.List.add(me.megamichiel.animatedmenu.command.CommandExecutor.CommandHandler) is not applicable
      (argument mismatch; java.lang.Object cannot be converted to me.megamichiel.animatedmenu.command.CommandExecutor.CommandHandler)
    method java.util.AbstractCollection.add(me.megamichiel.animatedmenu.command.CommandExecutor.CommandHandler) is not applicable
      (argument mismatch; java.lang.Object cannot be converted to me.megamichiel.animatedmenu.command.CommandExecutor.CommandHandler)
    method java.util.AbstractList.add(me.megamichiel.animatedmenu.command.CommandExecutor.CommandHandler) is not applicable
      (argument mismatch; java.lang.Object cannot be converted to me.megamichiel.animatedmenu.command.CommandExecutor.CommandHandler)
    method java.util.ArrayList.add(me.megamichiel.animatedmenu.command.CommandExecutor.CommandHandler) is not applicable
      (argument mismatch; java.lang.Object cannot be converted to me.megamichiel.animatedmenu.command.CommandExecutor.CommandHandler)