не могу скачать плагины из моего хранилища nexus-maven - PullRequest
0 голосов
/ 21 июня 2019

как вы, наверное, знаете, я инженер DevOps и чтобы получить свою степень, мне нужно представить проект, я достиг точки, когда мне нужно скомпилировать проект maven в автономном режиме, мой инструктор установил хранилище nexus, я получил settings.xml своегоmaven настроен для подключения и загрузки репозиториев из Nexus (который подключается и загружается в первый раз из maven central) и для подключения через прокси, то же самое с моим сервером Nexus, моя проблема с загрузкой плагинов, я следовал эту ссылку и установите плагин Maven для репозитория репозитория, но когда я пишу команду mvn clean install в моем проекте, я получаю ошибку 503 (скриншот будет загружен в конце), моя цель - успешно скомпилировать исоздать .ear для проекта, чтобы я мог развернуть его на сервере, заранее спасибо sceenshot link pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.star</groupId>
    <artifactId>Simulation</artifactId>
    <packaging>pom</packaging>
    <name>Simulation Project</name>
    <version>1.0</version>

    <properties>
        <application.version>2.2</application.version>
        <jboss.home>C:/jboss-eap-6.1-aya</jboss.home>

        <!-- ************** -->
        <!-- Build settings -->
        <!-- ************** -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!-- maven-compiler-plugin -->
        <maven.compiler.target>1.6</maven.compiler.target>
        <maven.compiler.source>1.6</maven.compiler.source>

        <!-- Options to override the compiler arguments directly on the compiler 
            arument line to separate between what the IDE understands as the source level 
            and what the Maven compiler actually use. -->
        <maven.compiler.argument.target>${maven.compiler.target}</maven.compiler.argument.target>
        <maven.compiler.argument.source>${maven.compiler.source}</maven.compiler.argument.source>
        <maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format>
    </properties>

    <profiles>
        <!-- The configuration of the development profile -->
        <profile>
            <id>dev</id>
            <!-- The development profile is active by default -->
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <build.profile.id>dev</build.profile.id>
            </properties>
        </profile>
        <!-- The configuration of the production profile -->
        <profile>
            <id>prep</id>
            <properties>
                <build.profile.id>prep</build.profile.id>
            </properties>
        </profile>
        <!-- The configuration of the testing profile -->
        <profile>
            <id>prod</id>
            <properties>
                <build.profile.id>prod</build.profile.id>
            </properties>

        </profile>
    </profiles>

    <modules>
        <module>Simulation-ear</module>
        <module>Simulation-ejb</module>
        <module>Simulation-war</module>
    </modules>

    <build>
        <filters>
            <filter>../env.${build.profile.id}.properties</filter>
        </filters>
        <defaultGoal>package</defaultGoal>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.12</version>
                    <configuration>
                        <excludedGroups>${tests.excludedGroups}</excludedGroups>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-ear-plugin</artifactId>
                    <version>2.7</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>1.7</version>
                </plugin>

                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>2.5</version>
                </plugin>

                <!--This plugin's configuration is used to store Eclipse m2e settings 
                    only. It has no influence on the Maven build itself. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-dependency-plugin</artifactId>
                                        <versionRange>[1.0,)</versionRange>
                                        <goals>
                                            <goal>unpack</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute>
                                            <runOnIncremental>false</runOnIncremental>
                                        </execute>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.jboss.as.plugins</groupId>
                    <artifactId>jboss-as-maven-plugin</artifactId>
                    <version>7.1.1.Final</version>
                    <executions>
                        <execution>
                            <phase></phase>
                            <goals>
                                <goal>deploy</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>2.5</version>
                </plugin>

                <plugin>
                    <artifactId>maven-ejb-plugin</artifactId>
                    <version>2.3</version>
                    <configuration>
                        <ejbVersion>3.0</ejbVersion>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            </manifest>
                            <manifestEntries>
                                <Implementation-Version>${bioweb.version}_${maven.build.timestamp}</Implementation-Version>
                            </manifestEntries>
                        </archive>
                    </configuration>

                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-ear-plugin</artifactId>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            </manifest>
                            <manifestEntries>
                                <Implementation-Version>${bioweb.version}_${maven.build.timestamp}</Implementation-Version>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>2.1.1</version>
                    <inherited>true</inherited>
                    <configuration>
                        <failOnMissingWebXml>false</failOnMissingWebXml>
                        <warName>${project.build.finalName}</warName>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            </manifest>
                            <manifestEntries>
                                <Implementation-Version>${bioweb.version}_${maven.build.timestamp}</Implementation-Version>
                            </manifestEntries>
                        </archive>
                        <webResources>
                            <resource>
                                <filtering>true</filtering>
                                <directory>src/main/webapp</directory>
                                <includes>
                                    <include>**/web.xml</include>
                                </includes>
                            </resource>
                        </webResources>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.cxf</groupId>
                    <artifactId>cxf-codegen-plugin</artifactId>
                    <version>${cxf.version}</version>
                </plugin>


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

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.star</groupId>
                <artifactId>Simulation-ejb</artifactId>
                <version>${application.version}</version>
                <type>ejb</type>
            </dependency>

            <dependency>
                <groupId>com.star</groupId>
                <artifactId>Simulation-war</artifactId>
                <version>${application.version}</version>
                <type>war</type>
            </dependency>
            <dependency>
                <groupId>com.star</groupId>
                <artifactId>Simulation-ear</artifactId>
                <version>${application.version}</version>
                <type>ear</type>
            </dependency>


        </dependencies>
    </dependencyManagement>
</project>

1 Ответ

0 голосов
/ 21 июня 2019

проблема была решена добавлением ip сервера nexus в раздел toproxy в файле settings.xml maven

...