• maven 创建Hadoop程序



    这里用来将新建的maven project 放入到现有的maven working set 中,这样我们就能看到项目之间的层级关系




    选择下面的程序



    在父项目中创建公共的pom,在pom中维护项目所需要的各种jar包其中version在properites中指定




    在 midules中添加子模块


    以下是两个主要的plugin

                    同dependencyManageMent
            <pluginManagement>
                <plugins>
                    <!-- maven project model -->
                    <plugin>
                        <groupId>org.apache.avro</groupId>
                        <artifactId>avro-maven-plugin</artifactId>
                        <version>${avro.version}</version>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>${maven.version}</version>
                        <configuration>
                            <source>${java.version}</source>
                            <target>${java.version}</target>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-resources-plugin</artifactId>
                        <version>${maven.resources.plugin}</version>
                    </plugin>
                </plugins>
            </pluginManagement>
            
            设定jdk的版本以及编译版本
            <plugins>
                <!-- set the jdk version and compile level -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                    </configuration>
                </plugin>
            </plugins>  

     子项目中:
     设置直系parent


    下面设置avro(阿弗罗自动构建命令)
        <build>
            <plugins>
                <!-- maven project model -->
                <plugin>
                    <groupId>org.apache.avro</groupId>
                    <artifactId>avro-maven-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>generate-avro-test-sources</id>
                            <phase>generate-test-sources</phase>
                            <goals>
                                <goal>schema</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <includes>
                            <include>StringPair.avsc</include>
                        </includes>
                        <project>
                            <groupId>donggege.gege</groupId>
                        </project>
                        <sourceDirectory>src/main/resources/avro</sourceDirectory>
                        <outputDirectory>${project.build.main.directory}</outputDirectory>
                        <testSourceDirectory>src/main/resources/avro</testSourceDirectory>
                        <testOutputDirectory>${project.build.test.directory}</testOutputDirectory>
                    </configuration>
                </plugin>
            </plugins>
        </build>  








  • 相关阅读:
    学password学一定得学程序
    具体解释站点沙盒期的原因表现与解决的方法
    POJ 1887 Testingthe CATCHER (LIS:最长下降子序列)
    [Apple开发者帐户帮助]九、参考(5)支持的功能(tvOS)
    [Apple开发者帐户帮助]九、参考(4)支持的功能(macOS)
    [Apple开发者帐户帮助]九、参考(3)支持的功能(iOS)
    [Apple开发者帐户帮助]九、参考(2)撤销特权
    [Apple开发者帐户帮助]九、参考(1)证书类型
    [Apple开发者帐户帮助]八、管理档案(4)
    [Apple开发者帐户帮助]八、管理档案(3)创建App Store配置文件
  • 原文地址:https://www.cnblogs.com/zDanica/p/5471668.html
Copyright © 2020-2023  润新知