@demon123
developer

Maven Repository на Github?

Не могу создать Maven Repository на Github.
1) Я создал репозиторий в github https://github.com/alikdemon1/phonebook
2)Настроил pom.xml

<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>phonebook</groupId>
  <artifactId>phonebook</artifactId>
  <packaging>war</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>phonebook Maven Webapp</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
		<groupId>junit</groupId>
		<artifactId>junit</artifactId>
		<version>3.8.1</version>
		<scope>test</scope>
    </dependency>
	<dependency>
		<groupId>javax</groupId>
		<artifactId>javaee-web-api</artifactId>
		<version>7.0</version>
		<scope>provided</scope>
		</dependency>
   <dependency>
		<groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>9.3-1102-jdbc41</version>
    </dependency>
  </dependencies>
	<properties>
        <java.version>1.7</java.version>
        <github.global.server>github</github.global.server>
        <github.maven-plugin>0.9</github.maven-plugin>
    </properties>
   <distributionManagement>
        <repository>
            <id>internal.repo</id>
            <name>Temporary Staging Repository</name>
            <url>file://${project.build.directory}/mvn-repo</url>
        </repository>
    </distributionManagement>
  <build>
    <plugins>
	<plugin>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.8.1</version>
        <configuration>
            <altDeploymentRepository>internal.repo::default::file://${project.build.directory}/mvn-repo</altDeploymentRepository>
        </configuration>
    </plugin>
        <plugin>
            <groupId>com.github.github</groupId>
            <artifactId>site-maven-plugin</artifactId>
            <version>${github.maven-plugin}</version>
            <configuration>
                <message>Maven artifacts for ${project.version}</message>
                <noJekyll>true</noJekyll>                                  
                <outputDirectory>${project.build.directory}/mvn-repo</outputDirectory>
                <branch>refs/heads/mvn-repo</branch>                       
                <includes><include>**/*</include></includes>
                <repositoryName>phonebook</repositoryName>      
                <repositoryOwner>alikdemon1</repositoryOwner>    
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>site</goal>
                </goals>
                <phase>deploy</phase>
              </execution>
            </executions>
        </plugin>
    </plugins>
    <finalName>phonebook</finalName>
  </build>
</project>


3) Создал .m2/settings.xml
<settings>
  <servers>
    <server>
      <id>github</id>
      <username>[username]</username>
      <password>[password]</password>
    </server>
  </servers>
</settings>

4) Сделал mvn clean deploy
5) Выводит такую ошибку

313c5eb84cbb4ef8b0ba725dbc8d02af.PNG

В чем может быть проблема?
  • Вопрос задан
  • 3984 просмотра
Пригласить эксперта
Ответы на вопрос 2
butthurt
@butthurt
Invalid request.
Нагуглил пару похожих проблем:
https://github.com/github/maven-plugins/issues/69
Ветка длинная, там много чего происходит, в общем, я бы почитал тут.
Ответ написан
Комментировать
Chvalov
@Chvalov
https://jitpack.io/ Можно подключить все либы которые есть на github
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы
Bell Integrator Хабаровск
До 400 000 ₽
Bell Integrator Ульяновск
До 400 000 ₽
Bell Integrator Ижевск
До 400 000 ₽