protobuf-maven-plugin
Used in
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency> <groupId>io.github.ascopes</groupId> <artifactId>protobuf-maven-plugin</artifactId> <version>2.7.1</version> </dependency>
<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright (C) 2023 - 2024, Ashley Scopes. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>io.github.ascopes</groupId> <artifactId>protobuf-maven-plugin-parent</artifactId> <version>2.7.1</version> </parent> <artifactId>protobuf-maven-plugin</artifactId> <name>Protobuf Maven Plugin</name> <description>Generates compilable sources from Protobuf definitions.</description> <packaging>maven-plugin</packaging> <prerequisites> <maven>3.8.2</maven> </prerequisites> <dependencies> <dependency> <!-- Used for the incremental cache file format. --> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>javax.annotation</groupId> <artifactId>javax.annotation-api</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> <!-- Provided by Maven at runtime --> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-annotations</artifactId> <!-- Provided by Maven at runtime --> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.maven.resolver</groupId> <artifactId>maven-resolver-api</artifactId> <!-- Provided by Maven at runtime --> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-core</artifactId> <!-- Provided by Maven at runtime --> <scope>provided</scope> </dependency> <dependency> <groupId>org.immutables</groupId> <artifactId>value</artifactId> <!-- Annotation processor only --> <scope>provided</scope> </dependency> <dependency> <groupId>org.jspecify</groupId> <artifactId>jspecify</artifactId> <!-- Annotations only --> <scope>provided</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <!-- Provided by Maven at runtime, so don't bundle it. --> <scope>provided</scope> </dependency> <!-- Test dependencies --> <dependency> <groupId>com.github.marschall</groupId> <artifactId>memoryfilesystem</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-junit-jupiter</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <!-- Java compiler config. --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> </plugin> <plugin> <!-- Runs integration tests. --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-invoker-plugin</artifactId> <executions> <execution> <id>integration-test</id> <phase>integration-test</phase> <goals> <goal>install</goal> <goal>run</goal> </goals> <configuration> <addTestClassPath>true</addTestClassPath> <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo> <failIfNoProjects>true</failIfNoProjects> <!-- Warning: placing this inside the cloneProjectsTo path triggers a resolution bug in the plugin --> <localRepositoryPath>${project.basedir}/target/it-repo</localRepositoryPath> <postBuildHookScript>test</postBuildHookScript> <settingsFile>${project.basedir}/src/it/settings.xml</settingsFile> <showErrors>true</showErrors> <showVersion>true</showVersion> <streamLogs>true</streamLogs> <streamLogsOnFailures>true</streamLogsOnFailures> <writeJunitReport>true</writeJunitReport> </configuration> </execution> </executions> </plugin> <plugin> <!-- Add additional entries to the JAR's MANIFEST.MF. --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> </plugin> <plugin> <!-- Generate plugin descriptors. --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-plugin-plugin</artifactId> <executions> <execution> <!-- We already generate the main descriptor by default. The help mojo is then generated for us by this custom execution. --> <id>generate-help-mojo</id> <phase>generate-sources</phase> <goals> <goal>helpmojo</goal> </goals> <configuration> <helpPackageName>io.github.ascopes.protobufmavenplugin.mojo</helpPackageName> </configuration> </execution> </executions> </plugin> <plugin> <!-- Generate the plugin site. --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> </plugin> <plugin> <!-- Bundles project sources into an additional JAR for release. --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> </plugin> <plugin> <!-- Unit testing. --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> </plugin> <plugin> <!-- Generates JSR-330 CDI configuration data to enable using dependency injection. --> <groupId>org.eclipse.sisu</groupId> <artifactId>sisu-maven-plugin</artifactId> </plugin> <plugin> <!-- Code coverage. --> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <configuration> <excludes> <!-- Exclude the generated Help Mojo. --> <exclude>**/*HelpMojo.*</exclude> </excludes> </configuration> <executions> <execution> <id>prepare-coverage-agent-surefire</id> <phase>initialize</phase> <goals> <goal>prepare-agent</goal> </goals> </execution> <execution> <id>prepare-coverage-agent-invoker</id> <phase>initialize</phase> <goals> <goal>prepare-agent-integration</goal> </goals> <configuration> <!-- Append to ensure multiple invoker test calls are included. --> <append>true</append> <!-- Ensure `${invoker.mavenOpts}` is set in the invoker.properties as well if maven.argLine is overridden. --> <includes>io.github.ascopes.protobufmavenplugin.*</includes> <propertyName>invoker.mavenOpts</propertyName> </configuration> </execution> <execution> <id>generate-coverage-reports</id> <phase>verify</phase> <goals> <goal>report</goal> <goal>report-integration</goal> </goals> </execution> </executions> </plugin> </plugins> </build> <reporting> <plugins> <plugin> <!-- Generate source documentation listings. --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>${maven-javadoc-plugin.version}</version> <configuration> <doclint>all,-missing</doclint> </configuration> <reportSets> <reportSet> <reports> <report>javadoc-no-fork</report> </reports> </reportSet> </reportSets> </plugin> <plugin> <!-- Used to generate source code cross-references with other reporting plugins. --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jxr-plugin</artifactId> <version>${maven-jxr-plugin.version}</version> <reportSets> <reportSet> <reports> <report>jxr-no-fork</report> </reports> </reportSet> </reportSets> </plugin> <plugin> <!-- Compile src/main/site and generate the goals site pages. --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-plugin-report-plugin</artifactId> <version>${maven-plugin-report-plugin.version}</version> </plugin> <plugin> <!-- Generate the base project reports for the site. --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-project-info-reports-plugin</artifactId> <version>${maven-project-info-reports-plugin.version}</version> <reportSets> <reportSet> <reports> <report>ci-management</report> <report>index</report> <report>issue-management</report> <report>licenses</report> <report>scm</report> <report>summary</report> </reports> </reportSet> </reportSets> </plugin> </plugins> </reporting> <profiles> <profile> <id>invoker-debug</id> <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-invoker-plugin</artifactId> <version>${maven-invoker-plugin.version}</version> <configuration> <invokerPropertiesFile>invoker-debug.properties</invokerPropertiesFile> </configuration> </plugin> </plugins> </pluginManagement> </build> </profile> <profile> <id>invoker-path-protoc</id> <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-invoker-plugin</artifactId> <version>${maven-invoker-plugin.version}</version> <configuration> <invokerPropertiesFile>invoker-path-protoc.properties</invokerPropertiesFile> </configuration> </plugin> </plugins> </pluginManagement> </build> </profile> </profiles> </project>