如何仅在需要时执行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>
答案 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)