我有一个maven插件,我希望有以下配置:
<ObjectName>
<ObjectType>
<Param1>12</Param1>
<EnumTypeParam>4</EnumTypeParam>
</ObjectType>
</objectName>
其中EnumTypeParam是java枚举。我将如何在pom文件中执行此操作?
答案 0 :(得分:-2)
我最终使用了这样的东西:
<plugin>
<groupId>com.google.protobuf.tools</groupId>
<artifactId>maven-protoc-plugin</artifactId>
<version>0.1.11-SNAPSHOT</version>
<configuration>
<protocExecutable>protoc</protocExecutable>
<protoSourceRoot>${project.basedir}/target/protobuff/speed</protoSourceRoot>
<languageSpecifications>
<LanguageSpecification>
<language>JAVA</language>
<outputDirectory>${project.basedir}/target/generated-sources/java</outputDirectory>
</LanguageSpecification>
<LanguageSpecification>
<language>CPP</language>
<outputDirectory>${project.basedir}/target/generated-sources/cpp</outputDirectory>
</LanguageSpecification>
</languageSpecifications>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>