symphonyoss / symphony-java-sample-bots

A set of simple Bots for Symphony, implemented in Java.
Apache License 2.0
20 stars 14 forks source link

maven cannot access repository #21

Open MaxHoefl opened 6 years ago

MaxHoefl commented 6 years ago

Hi,

when I import this project I have trouble getting the artifactorg.symphonyoss:symphonyoss:pom:10-SNAPSHOT which is requested through the specified repository in the pom file

Project build error: Non-resolvable parent POM for symphony.bots.sample:symphony-java-sample-bots:0.9.1-SNAPSHOT: 
Failure to transfer org.symphonyoss:symphonyoss:pom:10-SNAPSHOT from http://maven-repository.<company>.net was cached in the local repository, resolution will not be reattempted until the update interval of <company>MavenRepository has elapsed or updates are forced. Original error: 
Could not transfer artifact org.symphonyoss:symphonyoss:pom:10-SNAPSHOT from/to <company>MavenRepository (http://maven-repository.<company>.net): 
Access denied to http://maven-repository.<company>.net/org/symphonyoss/symphonyoss/10-SNAPSHOT/symphonyoss-10-SNAPSHOT.pom. 
Error code 403, URLBlocked and 'parent.relativePath' points at wrong local POM

I am behind a proxy that (I think) blocks getting that artifact. Is there any way around it?

Also, I don't really understand why I need that artifact. Why isn't the dependency

<dependency>
         <groupId>org.symphonyoss.symphony</groupId>
         <artifactId>symphony-client</artifactId>
         <version>${symphony.java.client.version}</version>
 </dependency>

enough?

Help's highly appreciated!

maoo commented 6 years ago

Hi Max,

The SSF Parent POM https://github.com/symphonyoss/ssf-parent-pom is used to provide project lifecycle capabilities to the Symphony Java Client (SJC) project, therefore, if you are building your own project and want to use SJC, you don't necessarily need to use it (though I think it's useful to check what's in there).

The problem you're getting - not being able to download the ssf-parent-pom SNAPSHOT - seems to be caused by a missing configuration in your pom.xml ; could you please make sure that oss.sonatype.org/content/groups/public is configured? Please check an example here https://github.com/symphonyoss/symphony-java-sample-bots/blob/master/pom.xml#L98-L109 .

Please let me know if you have any further question; you can also find me on Symphony chat.

Thanks, mao

On Wed, Nov 29, 2017 at 10:37 AM MaxHoefl notifications@github.com wrote:

Hi,

when I import this project I have trouble getting the artifact org.symphonyoss:symphonyoss:pom:10-SNAPSHOT which is requested through the specified repository in the pom file

Project build error: Non-resolvable parent POM for symphony.bots.sample:symphony-java-sample-bots:0.9.1-SNAPSHOT: Failure to transfer org.symphonyoss:symphonyoss:pom:10-SNAPSHOT from http://maven-repository..net was cached in the local repository, resolution will not be reattempted until the update interval of MavenRepository has elapsed or updates are forced. Original error: Could not transfer artifact org.symphonyoss:symphonyoss:pom:10-SNAPSHOT from/to MavenRepository (http://maven-repository..net): Access denied to http://maven-repository..net/org/symphonyoss/symphonyoss/10-SNAPSHOT/symphonyoss-10-SNAPSHOT.pom. Error code 403, URLBlocked and 'parent.relativePath' points at wrong local POM

I am behind a proxy that (I think) blocks getting that artifact. Is there any way around it?

Also, I don't really understand why I need that artifact. Why isn't the dependency

org.symphonyoss.symphony symphony-client ${symphony.java.client.version}

enough?

Help's highly appreciated!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/symphonyoss/symphony-java-sample-bots/issues/21, or mute the thread https://github.com/notifications/unsubscribe-auth/AAT-dXuH82WcXKlCwDshcWS1ddaMtoELks5s7SXPgaJpZM4Quqnn .

--

Maurizio Pillitu / Devops and Release Management Director

Symphony Software Foundation

1117 California Avenue, Palo Alto, CA, 94110

[image: phone.png] +1 (415) 952-9294 | [image: twitter.png] @maoo http://twitter.com/maoo

--

Read our spring edition of the Symphony Software Foundation newsletter http://hubs.ly/H076QCM0

Interested in membership? Check out the benefits http://symphony.foundation/#membership-benefits!

https://twitter.com/symphonyOSS https://github.com/symphonyOSS https://www.facebook.com/symphonyOSS https://www.linkedin.com/company-beta/10360983/ https://www.youtube.com/channel/UCfJAdRALzJ7J7snubrb_Y-Q

MaxHoefl commented 6 years ago

The problem you're getting - not being able to download the ssf-parent-pom SNAPSHOT - seems to be caused by a missing configuration in your pom.xml

The repo configuration is definitely there. But it must be blocked by the proxy

<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~
  ~ Copyright 2016 The Symphony Software Foundation
  ~
  ~ Licensed to The Symphony Software Foundation (SSF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License.  You may obtain a copy of the License at
  ~
  ~   http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->

<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>

    <artifactId>symphony-java-sample-bots</artifactId>
    <version>0.9.1-SNAPSHOT</version>
    <name>Symphony Sample Java Bots</name>
    <description>Symphony Sample Java Bots</description>
    <url>https://github.com/symphonyoss/symphony-java-sample-bots</url>

   <parent>
        <groupId>org.symphonyoss</groupId>
        <artifactId>symphonyoss</artifactId>
        <version>10-SNAPSHOT</version>
    </parent>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git://github.com/symphonyoss/symphony-java-sample-bots.git</connection>
        <developerConnection>scm:git:git@github.com:symphonyoss/symphony-java-sample-bots.git</developerConnection>
        <url>https://github.com/symphonyoss/symphony-java-sample-bots</url>
    </scm>

    <developers>
        <developer>
            <id>maoo</id>
            <name>Maurizio Pillitu</name>
            <email>maoo@symphony.foundation</email>
            <url>http://github.com/maoo</url>
            <organization>Symphony Software Foundation</organization>
            <organizationUrl>http://symphony.foundation</organizationUrl>
            <timezone>+1</timezone>
            <roles>
                <role>Developer</role>
            </roles>
        </developer>
        <developer>
            <id>pmonks</id>
            <name>Peter Monks</name>
            <email>peter@symphony.foundation</email>
            <url>http://github.com/pmonks</url>
            <organization>Symphony Software Foundation</organization>
            <organizationUrl>http://symphony.foundation</organizationUrl>
            <timezone>-8</timezone>
            <roles>
                <role>Developer</role>
            </roles>
        </developer>
    </developers>

    <properties>
        <!-- The SJC version -->
        <symphony.java.client.version>1.0.3</symphony.java.client.version>

        <!-- WhiteSource configuration -->
        <whitesource.product>Symphony Java Client</whitesource.product>

        <!--Used by ssf-parent-pom to configure maven-compiler-plugin-->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

        <!--Used by Travis CI to run EchoBotIT on every commit-->
        <jvm.args>-Xmx1024m -Dsessionauth.url=$SESSIONAUTH_URL -Dkeyauth.url=$KEYAUTH_URL -Dpod.url=$POD_URL -Dagent.url=$AGENT_URL -Dtruststore.file=$TRUSTSTORE_FILE -Dtruststore.password=$TRUSTSTORE_PASSWORD -Duser.cert.file=$BOT_USER_CERT_FILE -Duser.cert.password=$BOT_USER_CERT_PASSWORD -Duser.email=$BOT_USER_EMAIL -Dsender.user.email=$SENDER_USER_EMAIL -Dreceiver.user.email=$RECEIVER_USER_EMAIL -Drss.url=$RSS_URL -Drss.limit=$RSS_LIMIT</jvm.args>
        <failsafe.jvm.args>-Xmx1024m -Dsessionauth.url=${env.SESSIONAUTH_URL} -Dkeyauth.url=${env.KEYAUTH_URL} -Dpod.url=${env.POD_URL} -Dagent.url=${env.AGENT_URL} -Dtruststore.file=${env.TRUSTSTORE_FILE} -Dtruststore.password=${env.TRUSTSTORE_PASSWORD} -Duser.cert.file=${env.BOT_USER_CERT_FILE} -Duser.cert.password=${env.BOT_USER_CERT_PASSWORD} -Duser.email=${env.BOT_USER_EMAIL} -Dsender.user.email=${env.SENDER_USER_EMAIL} -Dsender.user.cert.file=${env.SENDER_USER_CERT_FILE} -Dsender.user.cert.password=${env.SENDER_USER_CERT_PASSWORD} -Dreceiver.user.email=${env.RECEIVER_USER_EMAIL} -Drss.url=${env.RSS_URL} -Drss.limit=${env.RSS_LIMIT}</failsafe.jvm.args>
    </properties>

    <repositories>
        <repository>
            <id>sonatype-oss-public</id>
            <url>https://oss.sonatype.org/content/groups/public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

you don't necessarily need to use it

If I comment out the <parent> config and the <repository> config above, I get a different error

Failure to transfer org.apache.maven.plugins:maven-shade-plugin:pom:3.1.0 from http://maven-repository.<company>.net was cached in the local repository, resolution will not be reattempted until the update interval of central-plugin-repository has elapsed or updates are forced. 
Original error: Could not transfer artifact org.apache.maven.plugins:maven-shade-plugin:pom:3.1.0 from/to central-plugin-repository (http://maven-repository.<company>.net): 
Access denied to http://maven-repository.<company>.net/org/apache/maven/plugins/maven-shade-plugin/3.1.0/maven-shade-plugin-3.1.0.pom. Error code 403, URLBlocked

I didn't find maven-shade in our company nexus which I found weird. This appears not to be a symphony issue but is there any hint you could give me?

Thanks

maoo commented 6 years ago

Hi Max,

I've just tried building the symphony-sample-bots project from an empty Maven local repository and everything worked fine, the 10-SNAPSHOT parent pom is correctly resolved.

Would you mind opening a github issue https://github.com/symphonyoss/symphony-java-sample-bots/issues with the commands to run in order to reproduce the issue and the logs? If you cannot access Github issues, feel free to post here.

Thanks! mao

On Wed, Nov 29, 2017 at 2:17 PM MaxHoefl notifications@github.com wrote:

The problem you're getting - not being able to download the ssf-parent-pom

SNAPSHOT - seems to be caused by a missing configuration in your pom.xml

The repo configuration is definitely there. But it must be blocked by the proxy

<?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/xsd/maven-4.0.0.xsd">

4.0.0
<artifactId>symphony-java-sample-bots</artifactId>
<version>0.9.1-SNAPSHOT</version>
<name>Symphony Sample Java Bots</name>
<description>Symphony Sample Java Bots</description>
<url>https://github.com/symphonyoss/symphony-java-sample-bots</url>
org.symphonyoss symphonyoss 10-SNAPSHOT
<licenses>
    <license>
        <name>Apache License, Version 2.0</name>
        <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
</licenses>

<scm>
    <connection>scm:git:git://github.com/symphonyoss/symphony-java-sample-bots.git</connection>
    <developerConnection>scm:git:git@github.com:symphonyoss/symphony-java-sample-bots.git</developerConnection>
    <url>https://github.com/symphonyoss/symphony-java-sample-bots</url>
</scm>

<developers>
    <developer>
        <id>maoo</id>
        <name>Maurizio Pillitu</name>
        <email>maoo@symphony.foundation</email>
        <url>http://github.com/maoo</url>
        <organization>Symphony Software Foundation</organization>
        <organizationUrl>http://symphony.foundation</organizationUrl>
        <timezone>+1</timezone>
        <roles>
            <role>Developer</role>
        </roles>
    </developer>
    <developer>
        <id>pmonks</id>
        <name>Peter Monks</name>
        <email>peter@symphony.foundation</email>
        <url>http://github.com/pmonks</url>
        <organization>Symphony Software Foundation</organization>
        <organizationUrl>http://symphony.foundation</organizationUrl>
        <timezone>-8</timezone>
        <roles>
            <role>Developer</role>
        </roles>
    </developer>
</developers>

<properties>
    <!-- The SJC version -->
    <symphony.java.client.version>1.0.3</symphony.java.client.version>

    <!-- WhiteSource configuration -->
    <whitesource.product>Symphony Java Client</whitesource.product>

    <!--Used by ssf-parent-pom to configure maven-compiler-plugin-->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>

    <!--Used by Travis CI to run EchoBotIT on every commit-->
    <jvm.args>-Xmx1024m -Dsessionauth.url=$SESSIONAUTH_URL -Dkeyauth.url=$KEYAUTH_URL -Dpod.url=$POD_URL -Dagent.url=$AGENT_URL -Dtruststore.file=$TRUSTSTORE_FILE -Dtruststore.password=$TRUSTSTORE_PASSWORD -Duser.cert.file=$BOT_USER_CERT_FILE -Duser.cert.password=$BOT_USER_CERT_PASSWORD -Duser.email=$BOT_USER_EMAIL -Dsender.user.email=$SENDER_USER_EMAIL -Dreceiver.user.email=$RECEIVER_USER_EMAIL -Drss.url=$RSS_URL -Drss.limit=$RSS_LIMIT</jvm.args>
    <failsafe.jvm.args>-Xmx1024m -Dsessionauth.url=${env.SESSIONAUTH_URL} -Dkeyauth.url=${env.KEYAUTH_URL} -Dpod.url=${env.POD_URL} -Dagent.url=${env.AGENT_URL} -Dtruststore.file=${env.TRUSTSTORE_FILE} -Dtruststore.password=${env.TRUSTSTORE_PASSWORD} -Duser.cert.file=${env.BOT_USER_CERT_FILE} -Duser.cert.password=${env.BOT_USER_CERT_PASSWORD} -Duser.email=${env.BOT_USER_EMAIL} -Dsender.user.email=${env.SENDER_USER_EMAIL} -Dsender.user.cert.file=${env.SENDER_USER_CERT_FILE} -Dsender.user.cert.password=${env.SENDER_USER_CERT_PASSWORD} -Dreceiver.user.email=${env.RECEIVER_USER_EMAIL} -Drss.url=${env.RSS_URL} -Drss.limit=${env.RSS_LIMIT}</failsafe.jvm.args>
</properties>

<repositories>
    <repository>
        <id>sonatype-oss-public</id>
        <url>https://oss.sonatype.org/content/groups/public/</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>

you don't necessarily need to use it

If I comment out the config and the config above, I get a different error

Failure to transfer org.apache.maven.plugins:maven-shade-plugin:pom:3.1.0 from http://maven-repository..net was cached in the local repository, resolution will not be reattempted until the update interval of central-plugin-repository has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-shade-plugin:pom:3.1.0 from/to central-plugin-repository (http://maven-repository..net): Access denied to http://maven-repository..net/org/apache/maven/plugins/maven-shade-plugin/3.1.0/maven-shade-plugin-3.1.0.pom. Error code 403, URLBlocked

I didn't find maven-shade in our company nexus which I found weird. This appears not to be a symphony issue but is there any hint you could give me?

Thanks

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/symphonyoss/symphony-java-sample-bots/issues/21#issuecomment-347857329, or mute the thread https://github.com/notifications/unsubscribe-auth/AAT-dT6m98zb7yO7n0_PW0YWAHuRGDtdks5s7VlogaJpZM4Quqnn .

--

Maurizio Pillitu / Devops and Release Management Director

Symphony Software Foundation

1117 California Avenue, Palo Alto, CA, 94110

[image: phone.png] +1 (415) 952-9294 | [image: twitter.png] @maoo http://twitter.com/maoo

--

Read our spring edition of the Symphony Software Foundation newsletter http://hubs.ly/H076QCM0

Interested in membership? Check out the benefits http://symphony.foundation/#membership-benefits!

https://twitter.com/symphonyOSS https://github.com/symphonyOSS https://www.facebook.com/symphonyOSS https://www.linkedin.com/company-beta/10360983/ https://www.youtube.com/channel/UCfJAdRALzJ7J7snubrb_Y-Q