JitPack依赖项中只有META-INF

时间:2018-10-21 16:44:07

标签: java maven dependencies pom.xml jitpack

我正在尝试从另一个项目导入依赖项。为此,我创建了一个项目A并将其部署在JitPack上,但是当我尝试将其用作依赖项时,Maven会从JitPack下载该依赖项,但是在JAR文件中只有META-INF文件夹,没有我的课,为什么?

这是我要用作依赖项的第一个项目的POM:

<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>
<groupId>wsStub</groupId>
<artifactId>wsStub</artifactId>
<version>0.0.5</version>

<packaging>jar</packaging>
<name>${project.artifactId}</name>

<!-- ============ -->
<!-- Opzioni base -->
<!-- ============ -->
<properties>
    <wsdl>http://localhost:9080/SoapSd/UniboServices?wsdl</wsdl>

    <!-- Opzioni base -->
    <ws.stub.package.name>it.unibo.test.services</ws.stub.package.name>

    <!-- Specifici -->
    <cxf.version>2.5.2</cxf.version>

</properties>

<build>
    <sourceDirectory>src/main/java</sourceDirectory>
    <pluginManagement>
        <plugins>

            <plugin>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-codegen-plugin</artifactId>
                <version>${cxf.version}</version>
                <executions>

                    <execution>
                        <id>generate-sources</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>wsdl2java</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <echo>Using WSDL ${wsdl}</echo>
                            </tasks>
                            <sourceRoot>target/generated-sources</sourceRoot>
                            <wsdlOptions>
                                <wsdlOption>
                                    <wsdl>${wsdl}</wsdl>
                                    <extraargs>
                                        <extraarg>-verbose</extraarg>
                                        <extraarg>-client</extraarg>
                                        <extraarg>-frontend</extraarg>
                                        <extraarg>jaxws21</extraarg>
                                        <extraarg>-p</extraarg>
                                        <extraarg>${ws.stub.package.name}</extraarg>
                                    </extraargs>
                                </wsdlOption>
                            </wsdlOptions>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>com.github.github</groupId>
                <artifactId>site-maven-plugin</artifactId>
                <version>0.8</version>
                <configuration>
                    <!-- git commit message -->
                    <message>Maven artifacts for ${project.version}</message>
                    <!-- disable webpage processing -->
                    <noJekyll>true</noJekyll>
                    <!-- matches distribution management repository url above -->
                    <outputDirectory>${project.build.directory}/mvn-repo</outputDirectory>

                    <merge>true</merge>
                    <includes>
                        <include>**/*</include>
                    </includes>
                    <!-- github repo name -->
                    <repositoryName>wsStub</repositoryName>
                    <!-- github username -->
                    <repositoryOwner>Diantha</repositoryOwner>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>site</goal>
                        </goals>
                        <phase>deploy</phase>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </pluginManagement>
</build>

<distributionManagement>
    <repository>
        <id>internal</id>
        <url>file://${project.build.directory}/mvn-repo</url>
    </repository>
</distributionManagement>

<dependencies>
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-bundle</artifactId>
        <version>${cxf.version}</version>
        <scope>provided</scope>
    </dependency>
</dependencies>

在使用Maven的deploy目标之后,我还使用了标记项目的步骤。

0 个答案:

没有答案