When I use maven for package operation, I get
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4:single (make-assembly) on project hive-udf: Error reading assemblies: No assembly descriptors found. -> [Help 1]
Error.
Through the error message, it should be that the element of maven-assembly-plugin is not specified.
Solution:
Step 1:
Put the original content:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors></descriptors>
<finalName>hive-udf</finalName>
<outputDirectory>${project.build.directory}/../..</outputDirectory>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
change into
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>../jar.xml</descriptors>
<finalName>hive-udf</finalName>
<outputDirectory>${project.build.directory}/../..</outputDirectory>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
Step 2: Add jar.xml in the root directory of the project
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>jar</id>
<formats>
<format>jar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
<dependencySet>
<outputDirectory>/</outputDirectory>
<useProjectArtifact>true</useProjectArtifact>
<unpack>true</unpack>
<scope>runtime</scope>
<useTransitiveDependencies>false</useTransitiveDependencies>
<includes>
<include>brucedu.bigdata:*</include>
</includes>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<directory>target/classes</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
</fileSets>
</assembly>
Re-execute the package command, BUILD SUCCESS!