The desired archetype does not exist - maven

When calling Maven to generate an archetype following the instructions at https://confluence.sakaiproject.org/display/BOOT/Sakai+Spring+MVC+Maven+Archetype, Maven complains about the archetype being inexistent, even though the file is located in the given archetype respository: https://source.sakaiproject.org/maven2/org/sakaiproject/maven-archetype/sakai-spring-maven-archetype/1.2/sakai-spring-maven-archetype-1.2.pom.
Maven version is:
>mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
This is what happens - it looks like the -DarchetypeRepository parameter is ignored:
> mvn archetype:generate -DarchetypeGroupId=org.sakaiproject.maven-archetype
-DarchetypeArtifactId=sakai-spring-maven-archetype
-DarchetypeVersion=1.2
-DarchetypeRepository=https://source.sakaiproject.org/maven2
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:3.1.2:generate (default-cli) > generate-sources # standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:3.1.2:generate (default-cli) < generate-sources # standalone-pom <<<
[INFO]
[INFO]
[INFO] --- maven-archetype-plugin:3.1.2:generate (default-cli) # standalone-pom ---
[INFO] Generating project in Interactive mode
[WARNING] Archetype not found in any catalog. Falling back to central repository.
[WARNING] Add a repository with id 'archetype' in your settings.xml if archetype's repository is elsewhere.
[WARNING] The POM for org.sakaiproject.maven-archetype:sakai-spring-maven-archetype:jar:1.2 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.395 s
[INFO] Finished at: 2020-01-11T12:24:20+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.1.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.sakaiproject.maven-archetype:sakai-spring-maven-archetype:1.2) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Turns out that Maven 3 changed the way archetype repositories are integrated. The -DarchetypeRepository parameter is not there anymore. Instead, archteype repositories need to be added to settings.xml:
<profiles>
<profile>
<!-- the profile id is arbitrary -->
<id>sakai</id>
<repositories>
<repository>
<!-- the repository id has to be named: archetype -->
<id>archetype</id>
<name>Repository for Sakai archetypes</name>
<url>https://source.sakaiproject.org/maven2/</url>
<releases>
<enabled>true</enabled>
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<checksumPolicy>warn</checksumPolicy>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
<!-- The profile needs to be added to activeProfiles in order to be taken into account -->
<activeProfiles>
<activeProfile>sakai</activeProfile>
</activeProfiles>

Related

Missing site information in the distribution management of the project spring-swagger-wordnik-client

I am trying to create a Maven repository for a project of mine.
The relevant lines in my project's pom.xml file are:
<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>edu.mills.cs180a</groupId>
<artifactId>spring-swagger-wordnik-client</artifactId>
<packaging>jar</packaging>
<name>spring-swagger-wordnik-client</name>
<version>0.0.2A-SNAPSHOT</version>
...
<distributionManagement>
<repository>
<id>CS180A site</id>
<url>file:///C:/Users/ellen/Dropbox/Apps/site44/www.spertus.com/cs180a</url>
</repository>
</distributionManagement>
...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
...
</plugins>
</project>
I get this error when I try to deploy the site:
$ mvn site:deploy
[INFO] Scanning for projects...
[INFO]
[INFO] -----------< edu.mills.cs180a:spring-swagger-wordnik-client >-----------
[INFO] Building spring-swagger-wordnik-client 0.0.2A-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-site-plugin:3.7.1:deploy (default-cli) # spring-swagger-wordnik-client ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.055 s
[INFO] Finished at: 2020-11-11T15:24:38-08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.7.1:deploy (default-cli) on project spring-swagger-wordnik-client: Missing site information in the distribution management of the project spring-swagger-wordnik-client (edu.mills.cs180a:spring-swagger-wordnik-client:0.0.2A-SNAPSHOT) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I don't understand why I get this error:
Missing site information in the distribution management of the project spring-swagger-wordnik-client
What else should be in distribution management besides this?
<distributionManagement>
<repository>
<id>CS180A site</id>
<url>file:///C:/Users/ellen/Dropbox/Apps/site44/www.spertus.com/cs180a</url>
</repository>
</distributionManagement>
Looking at your configuration, you need to add element inside distributionManagement as explained here: https://maven.apache.org/plugins/maven-site-plugin/usage.html.

How can I setup multiple repositories for mvn builds?

I want to download 'standard' jars like Spring framework from central maven repository, but proprietary license jars from our custom maven repository (Artifactory) repo. I've setup the pom.xml file this way:
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>maven2</name>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>2</id>
<name>Artifactory</name>
<url>https://na.artifactory.swg-devops.com/artifactory/gbs-ic2esprint-bluecost-libs-maven-virtual</url>
</repository>
</repositories>
It's not working the way I want it. Here is what I get now:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building SpreadSheetUploadWeb 1.0
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/1.9.10/jackson-databind-1.9.10.pom
[INFO] Downloading: https://na.artifactory.swg-devops.com/artifactory/gbs-ic2esprint-bluecost-libs-maven-virtual/com/fasterxml/jackson/core/jackson-databind/1.9.10/jackson-databind-1.9.10.pom
[INFO] Downloading: http://repo.spring.io/ext-release-local/com/fasterxml/jackson/core/jackson-databind/1.9.10/jackson-databind-1.9.10.pom
[INFO] Downloading: http://repo.spring.io/milestone/com/fasterxml/jackson/core/jackson-databind/1.9.10/jackson-databind-1.9.10.pom
[INFO] Downloading: http://repo.spring.io/snapshot/com/fasterxml/jackson/core/jackson-databind/1.9.10/jackson-databind-1.9.10.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/1.9.10/jackson-annotations-1.9.10.pom
[INFO] Downloading: https://na.artifactory.swg-devops.com/artifactory/gbs-ic2esprint-bluecost-libs-maven-virtual/com/fasterxml/jackson/core/jackson-annotations/1.9.10/jackson-annotations-1.9.10.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/1.9.10/jackson-core-1.9.10.pom
[INFO] Downloading: https://na.artifactory.swg-devops.com/artifactory/gbs-ic2esprint-bluecost-libs-maven-virtual/com/fasterxml/jackson/core/jackson-core/1.9.10/jackson-core-1.9.10.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/com/ibm/db2/jcc/db2jcc_license_cisuz/10.5.9/db2jcc_license_cisuz-10.5.9.pom
[INFO] Downloading: https://na.artifactory.swg-devops.com/artifactory/gbs-ic2esprint-bluecost-libs-maven-virtual/com/ibm/db2/jcc/db2jcc_license_cisuz/10.5.9/db2jcc_license_cisuz-10.5.9.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.403 s
[INFO] Finished at: 2018-05-04T07:47:47-06:00
[INFO] Final Memory: 17M/153M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project SpreadSheetUploadWeb: Could not resolve dependencies for project SpreadSheetUploadWeb:SpreadSheetUploadWeb:jar:1.0: Failed to collect dependencies at org.springframework.boot:spring-boot-starter-thymeleaf:jar:1.4.3.RELEASE -> org.springframework.boot:spring-boot-starter-web:jar:1.4.3.RELEASE -> com.fasterxml.jackson.core:jackson-databind:jar:1.9.10: Failed to read artifact descriptor for com.fasterxml.jackson.core:jackson-databind:jar:1.9.10: Could not transfer artifact com.fasterxml.jackson.core:jackson-databind:pom:1.9.10 from/to 2 (https://na.artifactory.swg-devops.com/artifactory/gbs-ic2esprint-bluecost-libs-maven-virtual): Access denied to https://na.artifactory.swg-devops.com/artifactory/gbs-ic2esprint-bluecost-libs-maven-virtual/com/fasterxml/jackson/core/jackson-databind/1.9.10/jackson-databind-1.9.10.pom. Error code 401, Unauthorized -> [Help 1]
[ERROR]
The tags do not affect the order at which maven uses repositories to fetch dependencies.
So the for maven central should be central, just for good practice.
However, your order is right but your links are not correct. you did not specify the central repository correctly. Try this instead:
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>maven2</name>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
For your artifactory, try with your browser if you can connect to https://swg-devops.com/artifactory . Try also with https://repo.maven.apache.org/maven2 and you should see how it should look like. When you have the correct link resolved you should be able to download the dependencies and maven automatically tries all the repositories from first to last to find the dependency.

maven deploy does not work for releases

Hi I am a beginner for maven build tool. I built a simple maven JavaEE project and I tried to build it remote nexus repository. But i can deploy successfully only for snapshots. Releases deploying gives 400 bad request error.
here is my Setting.xml configuration
<servers>
<server>
<id>****</id>
<username>****</username>
<password>****</password>
</server>
</servers>
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>central</mirrorOf>
<url>http://******:8081/nexus/content/groups/net.******.timetrack/</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>*****</id>
<url>http://******:8081/nexus/content/groups/net.*******.timetrack/</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>******</id>
<url>http://******:8081/nexus/content/groups/net.******.timetrack/</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
and here is my pom.xml's distribution management
<distributionManagement>
<repository>
<uniqueVersion>false</uniqueVersion>
<id>*****</id>
<name>******</name>
<url>http://*******:8081/nexus/content/groups/net.******.timetrack/</url>
<layout>default</layout>
</repository>
<snapshotRepository>
<uniqueVersion>true</uniqueVersion>
<id>*****</id>
<name>***** Snapshots</name>
<url>http://******:8081/nexus/content/repositories/snapshots/</url>
<layout>legacy</layout>
</snapshotRepository>
</distributionManagement>
If I run mvn clean deploy with (for a snapshot)
<groupId>net.*****.*****</groupId>
<artifactId>*****-**-****</artifactId>
<version>1.4-SNAPSHOT</version>
<packaging>war</packaging>
then successfully deploy in to nexus repository snapshot directory.
If it I run mvn clean deploy with (for a release)
<groupId>net.*****.****</groupId>
<artifactId>****-***-*****</artifactId>
<version>1.4.1</version>
<packaging>war</packaging>
then it gives 400-bad request error
Here is the log for the error
[INFO]
[INFO] --- maven-war-plugin:2.6:war (default-war) # ****-****-***** ---
[INFO] Packaging webapp
[INFO] Assembling webapp [*****-time-tracker] in [/home/dilanka/Projects/time_tracker/samples/GitLab/****/***-time-tracker/target/*****-time-tracker-1.4]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/dilanka/Projects/time_tracker/samples/GitLab/*****/****-time-tracker/src/main/webapp]
[INFO] Webapp assembled in [115 msecs]
[INFO] Building war: /home/dilanka/Projects/time_tracker/samples/GitLab/TimeTracker/*****-time-tracker/target/****-time-tracker-1.4.war
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) # ****-time-tracker ---
[INFO] Installing /home/dilanka/Projects/time_tracker/samples/GitLab/TimeTracker/****-time-tracker/target/****-time-tracker-1.4.war to /home/dilanka/maven3-repo/net/*****/timetrack/****-time-tracker/1.4/****-time-tracker-1.4.war
[INFO] Installing /home/dilanka/Projects/time_tracker/samples/GitLab/TimeTracker/****-time-tracker/pom.xml to /home/dilanka/maven3-repo/net/****/timetrack/****-time-tracker/1.4/****-time-tracker-1.4.pom
[INFO]
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) # ****-time-tracker ---
Uploading: http://*****:8081/nexus/content/groups/net.*****.timetrack/net/****s/timetrack/***-time-tracker/1.4/****-time-tracker-1.4.war
Uploading: http://*****:8081/nexus/content/groups/net.****.timetrack/net/****/timetrack/****-time-tracker/1.4/****-time-tracker-1.4.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.790 s
[INFO] Finished at: 2016-01-08T15:28:08+05:30
[INFO] Final Memory: 32M/252M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project ****-time-tracker: Failed to deploy artifacts: Could not transfer artifact net.****.timetrack:*****-time-tracker:war:1.4 from/to ***** (http://*****:8081/nexus/content/groups/net.****.timetrack/): Failed to transfer file: http://*****:8081/nexus/content/groups/net.****.timetrack/net/*****/timetrack/*****-time-tracker/1.4/****-time-tracker-1.4.war. Return code is: 400, ReasonPhrase: Bad Request. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
If any body please help me to solve this problem.
Thanks.
You can deploy a release version of a given artifact exactly once to a given Nexus instance.
If the same version already exists in your Nexus, you'll get an error like the one you're seeing.
<url>http://*******:8081/nexus/content/groups/net.****.timetrack/</url>
You can't deploy into a group repository, change this URL to be the URL of a hosted release repository.

Grpc-java Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1

I am unable to build pom.xml,for grpc-java example provided in the link below:
https://github.com/grpc/grpc-java
it gives me the following error.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Detecting the operating system and CPU architecture
[INFO] ------------------------------------------------------------------------
[INFO] os.detected.name: linux
[INFO] os.detected.arch: x86_64
[INFO] os.detected.release: ubuntu
[INFO] os.detected.release.version: 14.04
[INFO] os.detected.release.like.ubuntu: true
[INFO] os.detected.release.like.debian: true
[INFO] os.detected.classifier: linux-x86_64
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building helloworld 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-protoc-plugin:0.4.3:compile (default) # helloworld ---
[INFO] Compiling 1 proto file(s) to /home/pradnya/workspace/helloworld/target/generated-sources/protobuf/java
[INFO]
[INFO] --- maven-protoc-plugin:0.4.3:compile-custom (default) # helloworld ---
[WARNING] Missing POM for io.grpc:protoc-gen-grpc-java:exe:linux-x86_64:0.8.0
[INFO] Compiling 1 proto file(s) to /home/pradnya/workspace/helloworld/target/generated-sources/protobuf/grpc-java
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # helloworld ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/pradnya/workspace/helloworld/src/main/resources
[INFO] Copying 1 resource
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # helloworld ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 7 source files to /home/pradnya/workspace/helloworld/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/pradnya/workspace/helloworld/target/generated-sources/protobuf/grpc-java/io/grpc/examples/helloworld/GreeterGrpc.java:[24,38] method marshaller in class io.grpc.protobuf.ProtoUtils cannot be applied to given types;
required: T
found: com.google.protobuf.Parser<io.grpc.examples.helloworld.HelloRequest>
reason: inferred type does not conform to declared bound(s)
inferred: com.google.protobuf.Parser<io.grpc.examples.helloworld.HelloRequest>
bound(s): com.google.protobuf.MessageLite
[ERROR] /home/pradnya/workspace/helloworld/target/generated-sources/protobuf/grpc-java/io/grpc/examples/helloworld/GreeterGrpc.java:[25,38] method marshaller in class io.grpc.protobuf.ProtoUtils cannot be applied to given types;
required: T
found: com.google.protobuf.Parser<io.grpc.examples.helloworld.HelloResponse>
reason: inferred type does not conform to declared bound(s)
inferred: com.google.protobuf.Parser<io.grpc.examples.helloworld.HelloResponse>
bound(s): com.google.protobuf.MessageLite
[ERROR] /home/pradnya/workspace/helloworld/target/generated-sources/protobuf/grpc-java/io/grpc/examples/helloworld/GreeterGrpc.java:[79,45] callOptions has private access in io.grpc.stub.AbstractStub
[ERROR] /home/pradnya/workspace/helloworld/target/generated-sources/protobuf/grpc-java/io/grpc/examples/helloworld/GreeterGrpc.java:[79,11] channel has private access in io.grpc.stub.AbstractStub
[ERROR] /home/pradnya/workspace/helloworld/target/generated-sources/protobuf/grpc-java/io/grpc/examples/helloworld/GreeterGrpc.java:[103,45] callOptions has private access in io.grpc.stub.AbstractStub
[ERROR] /home/pradnya/workspace/helloworld/target/generated-sources/protobuf/grpc-java/io/grpc/examples/helloworld/GreeterGrpc.java:[103,11] channel has private access in io.grpc.stub.AbstractStub
[ERROR] /home/pradnya/workspace/helloworld/target/generated-sources/protobuf/grpc-java/io/grpc/examples/helloworld/GreeterGrpc.java:[128,45] callOptions has private access in io.grpc.stub.AbstractStub
[ERROR] /home/pradnya/workspace/helloworld/target/generated-sources/protobuf/grpc-java/io/grpc/examples/helloworld/GreeterGrpc.java:[128,11] channel has private access in io.grpc.stub.AbstractStub
[INFO] 8 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.203 s
[INFO] Finished at: 2015-09-22T09:25:43+05:30
[INFO] Final Memory: 17M/59M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project helloworld: Compilation failure: Compilation failure:
[ERROR] /home/pradnya/workspace/helloworld/target/generated-sources/protobuf/grpc-java/io/grpc/examples/helloworld/GreeterGrpc.java:[24,38] method marshaller in class io.grpc.protobuf.ProtoUtils cannot be applied to given types;
[ERROR] required: T
[ERROR] found: com.google.protobuf.Parser<io.grpc.examples.helloworld.HelloRequest>
[ERROR] reason: inferred type does not conform to declared bound(s)
[ERROR] inferred: com.google.protobuf.Parser<io.grpc.examples.helloworld.HelloRequest>
[ERROR] bound(s): com.google.protobuf.MessageLite
[ERROR] /home/pradnya/workspace/helloworld/target/generated-sources/protobuf/grpc-java/io/grpc/examples/helloworld/GreeterGrpc.java:[25,38] method marshaller in class io.grpc.protobuf.ProtoUtils cannot be applied to given types;
[ERROR] required: T
[ERROR] found: com.google.protobuf.Parser<io.grpc.examples.helloworld.HelloResponse>
[ERROR] reason: inferred type does not conform to declared bound(s)
[ERROR] inferred: com.google.protobuf.Parser<io.grpc.examples.helloworld.HelloResponse>
[ERROR] bound(s): com.google.protobuf.MessageLite
[ERROR] /home/pradnya/workspace/helloworld/target/generated-sources/protobuf/grpc-java/io/grpc/examples/helloworld/GreeterGrpc.java:[79,45] callOptions has private access in io.grpc.stub.AbstractStub
[ERROR] /home/pradnya/workspace/helloworld/target/generated-sources/protobuf/grpc-java/io/grpc/examples/helloworld/GreeterGrpc.java:[79,11] channel has private access in io.grpc.stub.AbstractStub
[ERROR] /home/pradnya/workspace/helloworld/target/generated-sources/protobuf/grpc-java/io/grpc/examples/helloworld/GreeterGrpc.java:[103,45] callOptions has private access in io.grpc.stub.AbstractStub
[ERROR] /home/pradnya/workspace/helloworld/target/generated-sources/protobuf/grpc-java/io/grpc/examples/helloworld/GreeterGrpc.java:[103,11] channel has private access in io.grpc.stub.AbstractStub
[ERROR] /home/pradnya/workspace/helloworld/target/generated-sources/protobuf/grpc-java/io/grpc/examples/helloworld/GreeterGrpc.java:[128,45] callOptions has private access in io.grpc.stub.AbstractStub
[ERROR] /home/pradnya/workspace/helloworld/target/generated-sources/protobuf/grpc-java/io/grpc/examples/helloworld/GreeterGrpc.java:[128,11] channel has private access in io.grpc.stub.AbstractStub
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
My pom.xml is as follows:
<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>io.grpc.examples</groupId>
<artifactId>helloworld</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>helloworld</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
<version>2.1.7.1</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-all</artifactId>
<version>0.9.0</version>
</dependency>
</dependencies>
<pluginRepositories>
<pluginRepository>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</pluginRepository>
<pluginRepository>
<id>protoc-plugin</id>
<url>https://dl.bintray.com/sergei-ivanov/maven/</url>
</pluginRepository>
</pluginRepositories>
<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.4.0.Final</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>com.google.protobuf.tools</groupId>
<artifactId>maven-protoc-plugin</artifactId>
<version>0.4.3</version>
<configuration>
<!--
The version of protoc must match protobuf-java. If you don't depend on
protobuf-java directly, you will be transitively depending on the
protobuf-java version that grpc depends on.
-->
<protocArtifact>com.google.protobuf:protoc:3.0.0-beta-1:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:0.8.0:exe:${os.detected.classifier}</pluginArtifact>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>compile-custom</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
want to build it using grpc-all 0.9.0 version explicitly.
I believe the problem is using the 0.8.0 gRPC code generator:
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:0.8.0:exe:${os.detected.classifier}</pluginArtifact>
But the 0.9.0 library:
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-all</artifactId>
<version>0.9.0</version>
</dependency>
v0.8.0 was the last release that gRPC didn't provide any API guarantees. v0.9.0 onward we would expect an older code generator to be compatible (although maybe missing features/improvements) with newer gRPC runtime libraries.

Maven - Can't deploy to remote repository

I'm trying to deploy my library to my own remote maven repository. I'm using NetBeans 8
Here's my 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.my.company.library.name</groupId>
<artifactId>LibraryId</artifactId>
<version>3.0</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<dependencies>
(... my dependencies...)
</dependencies>
<distributionManagement>
<repository>
<id>myServer</id>
<name>myServer Repository</name>
<url>http://maven.mycompany.com</url>
</repository>
</distributionManagement>
</project>
And here is my settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<servers>
<server>
<username>dwnz</username>
<id>central</id>
</server>
<server>
<id>myServer</id>
<username>dwnz</username>
<password>mySuperSecretPassword</password>
</server>
</servers>
<profiles>
<profile>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>libs-release</name>
<url>http://maven.mycompany.com/libs-release</url>
</repository>
<repository>
<snapshots />
<id>snapshots</id>
<name>libs-snapshot</name>
<url>http://maven.mycompany.com/libs-snapshot</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>plugins-release</name>
<url>http://maven.mycompany.com/plugins-release</url>
</pluginRepository>
<pluginRepository>
<snapshots />
<id>snapshots</id>
<name>plugins-snapshot</name>
<url>http://maven.mycompany.com/plugins-snapshot</url>
</pluginRepository>
</pluginRepositories>
<id>artifactory</id>
</profile>
</profiles>
<activeProfiles>
<activeProfile>artifactory</activeProfile>
</activeProfiles>
</settings>
When I do Clean and Build I get the following ouput on NetBeans:
cd /Users/dwnz/Development/Server/code/project/myLibrary; JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home "/Applications/NetBeans/NetBeans 8.0.2.app/Contents/Resources/NetBeans/java/maven/bin/mvn" clean install
Scanning for projects...
------------------------------------------------------------------------
Building library 3.0
------------------------------------------------------------------------
--- maven-clean-plugin:2.4.1:clean (default-clean) # library ---
Deleting /Users/dwnz/Development/Server/code/project/myLibrary/target
--- maven-resources-plugin:2.5:resources (default-resources) # myLibrary ---
[debug] execute contextualize
Using 'UTF-8' encoding to copy filtered resources.
Copying 0 resource
--- maven-compiler-plugin:2.3.2:compile (default-compile) # myLibrary ---
Compiling 183 source files to /Users/dwnz/Development/Server/code/project/myLibrary/target/classes
--- maven-resources-plugin:2.5:testResources (default-testResources) # myLibrary ---
[debug] execute contextualize
Using 'UTF-8' encoding to copy filtered resources.
skip non existing resourceDirectory /Users/dwnz/Development/Server/code/project/myLibrary/src/test/resources
--- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) # myLibrary ---
No sources to compile
--- maven-surefire-plugin:2.10:test (default-test) # myLibrary ---
No tests to run.
Surefire report directory: /Users/dwnz/Development/Server/code/project/myLibrary/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
--- maven-jar-plugin:2.3.2:jar (default-jar) # myLibrary ---
Building jar: /Users/dwnz/Development/Server/code/project/myLibrary/target/library-3.0.jar
--- maven-install-plugin:2.3.1:install (default-install) # myLibrary ---
Installing /Users/dwnz/Development/Server/code/project/myLibrary/target/library-3.0.jar to /Users/dwnz/.m2/repository/com/myCompany/project/server/myLibrary/library/3.0/library-3.0.jar
Installing /Users/dwnz/Development/Server/code/project/myLibrary/pom.xml to /Users/dwnz/.m2/repository/com/myCompany/project/server/myLibrary/library/3.0/library-3.0.pom
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 3.426s
Finished at: Mon May 11 17:16:22 WEST 2015
Final Memory: 18M/220M
------------------------------------------------------------------------
On my server I'm using Artifactory.
On my remote maven repository my library is not deployed. Any one knows or can spot what am I doing wrong here and why it is not deploying on my remote maven repository?
------ EDIT-------
I just tried using the mvn deploy on the command line still to no success. Here is the ouput from the command line:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building myLibrary 3.0
[INFO] ------------------------------------------------------------------------
Downloading: http://maven.myserver.com/plugins-release/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom
Downloading: http://maven.myserver.com/plugins-snapshot/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.119 s
[INFO] Finished at: 2015-05-11T18:22:35+01:00
[INFO] Final Memory: 8M/123M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to central (http://maven.myserver.com/plugins-release): Not authorized , ReasonPhrase:Unauthorized. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
Apparently it is trying to download some plugins from my remote server. I'm not the admin of that server so I can't get access to it, I just have an account there.
As pointed out by khmarbaise it was a server misconfiguration.

Resources