Mongodb-Hadoop Adaptor - mongodb-hadoop

For getting started with the mongodb-hadoop adaptor i am referring to the manual
The current hadoop version running on my system is 0.20.2.
So i edited the build.sbt file to
hadoopRelease in ThisBuild := "0.20.2".
But when i try the next command of "sbt package", i get the following error.
[error] Hadoop Release '%s' is an invalid/unsupported release. Valid entries are in 0.20.2
[error] Use 'last' for the full log.
The full log is
[info] Loading project definition from E:\softwares\mine\mongo-hadoop\project
[debug] Running task... Cancelable: false, check cycles: false
[debug]
[debug] Initial source changes:
[debug] removed:Set()
[debug] added: Set()
[debug] modified: Set()
[debug] Removed products: Set()
[debug] Modified external sources: Set()
[debug] Modified binary dependencies: Set()
[debug] Initial directly invalidated sources: Set()
[debug]
[debug] Sources indirectly invalidated by:
[debug] product: Set()
[debug] binary dep: Set()
[debug] external source: Set()
[debug] Initially invalidated: Set()
[debug] Copy resource mappings:
[debug]
java.lang.RuntimeException: Hadoop Release '%s' is an invalid/unsupported release. Valid entries are in 0.20.2
at scala.sys.package$.error(package.scala:27)
at MongoHadoopBuild$$anonfun$streamingSettings$6$$anonfun$apply$8.apply(MongoHadoopBuild.scala:152)
at MongoHadoopBuild$$anonfun$streamingSettings$6$$anonfun$apply$8.apply(MongoHadoopBuild.scala:152)
at scala.collection.MapLike$class.getOrElse(MapLike.scala:122)
at scala.collection.immutable.HashMap.getOrElse(HashMap.scala:38)
at MongoHadoopBuild$$anonfun$streamingSettings$6.apply(MongoHadoopBuild.scala:152)
at MongoHadoopBuild$$anonfun$streamingSettings$6.apply(MongoHadoopBuild.scala:151)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
at sbt.EvaluateSettings$$anonfun$sbt$EvaluateSettings$$single$1.apply(INode.scala:159)
at sbt.EvaluateSettings$$anonfun$sbt$EvaluateSettings$$single$1.apply(INode.scala:159)
at sbt.EvaluateSettings$MixedNode.evaluate0(INode.scala:177)
at sbt.EvaluateSettings$INode.evaluate(INode.scala:132)
at sbt.EvaluateSettings$$anonfun$sbt$EvaluateSettings$$submitEvaluate$1.apply$mcV$sp(INode.scala:64)
at sbt.EvaluateSettings.sbt$EvaluateSettings$$run0(INode.scala:73)
at sbt.EvaluateSettings$$anon$3.run(INode.scala:69)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
[error] Hadoop Release '%s' is an invalid/unsupported release. Valid entries are in 0.20.2

Try to replace
hadoopRelease in ThisBuild := "0.20.2".
with
hadoopRelease in ThisBuild := "0.20".
For me it worked when I made 1.0.4 to 1.0.
Though I have to admit I did not check if the resutling jar worked.
EDIT: Jar did not work. Complained of some missing classes.

Related

Not a valid command: idea-shell (similar: shell, oldshell)

I have trouble refreshing my SBT project in Intellij. And I am not the only one.
This is the sbt-console:
/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/bin/java -agentlib:jdwp=transport=dt_socket,address=localhost:51917,suspend=n,server=y -Xdebug -server -Xmx1028M -Dfile.encoding=UTF-8 -Didea.runid=2017.2 -Didea.managed=true -jar "/Users/pascal.mengelt/Library/Application Support/IntelliJIdea2018.1/Scala/launcher/sbt-launch.jar" idea-shell
Listening for transport dt_socket at address: 51917
[info] Loading settings from idea.sbt ...
[info] Loading global plugins from /Users/user/.sbt/1.0/plugins
[info] Loading settings from plugins.sbt ...
[info] Loading project definition from /Users/pascal.mengelt/GitHub/scala/scala-adapters-wizard/project
[info] Loading settings from build.sbt ...
[info] Set current project to wizardDemo (in build file:/Users/pascal.mengelt/GitHub/scala/scala-adapters-wizard/)
[error] Not a valid command: idea-shell (similar: shell, oldshell)
[error] Not a valid project ID: idea-shell
[error] Expected ':'
[error] Not a valid key: idea-shell (similar: daemonShell)
[error] idea-shell
[error] ^
[INFO] [04/13/2018 13:13:19.377] [Thread-2] [CoordinatedShutdown(akka://sbt-web)] Starting coordinated shutdown from JVM shutdown hook
I found the Intellij issue for that (with workaround):
SCL-12430 Not a valid key: idea-shell
Yes ,delete the ~/.sbt/{0.13|1.0}/plugins/target
Here the command provided by Mateusz Kubuszok:
rm -rf ~/.sbt/{0.13,1.0}/plugins/target

execCommand==null! when building intellij idea plugin

I'm getting the following error when trying to build 'runIde' profile in the gradle
Running from the tutorial here http://www.jetbrains.org/intellij/sdk/docs/tutorials/build_system/prerequisites.html
08:18:04.614 [ERROR]
[org.gradle.internal.buildevents.BuildExceptionReporter]
08:18:04.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
08:18:04.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
08:18:04.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
08:18:04.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':runIde'.
08:18:04.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > execCommand == null!
08:18:04.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
08:18:04.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
08:18:04.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.
08:18:04.614 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger]
08:18:04.614 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 26s
08:18:04.614 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] 8 actionable tasks: 2 executed, 6 up-to-date
08:18:04.614 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1 completed (0 worker(s) in use)
08:18:04.614 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker: released lock on root.1
08:18:04.614 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build operation 'Run build'
08:18:04.614 [DEBUG] [org.gradle.launcher.daemon.server.SynchronizedDispatchConnection] thread 19: dispatching class org.gradle.launcher.daemon.protocol.BuildEvent
08:18:04.614 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for file content cache (C:\Users\saisr\IdeaProjects\mvn-refresher\.gradle\4.0\fileContent)
08:18:04.614 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache annotation-processors.bin (C:\Users\saisr\IdeaProjects\mvn-refresher\.gradle\4.0\fileContent\annotation-processors.bin)
08:18:04.614 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on file content cache (C:\Users\saisr\IdeaProjects\mvn-refresher\.gradle\4.0\fileContent).
08:18:04.630 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for task history cache (C:\Users\saisr\IdeaProjects\mvn-refresher\.gradle\4.0\taskHistory)
08:18:04.630 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache taskHistory.bin (C:\Users\saisr\IdeaProjects\mvn-refresher\.gradle\4.0\taskHistory\taskHistory.bin)
08:18:04.630 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache fileSnapshots.bin (C:\Users\saisr\IdeaProjects\mvn-refresher\.gradle\4.0\taskHistory\fileSnapshots.bin)
08:18:04.630 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on task history cache (C:\Users\saisr\IdeaProjects\mvn-refresher\.gradle\4.0\taskHistory).
08:18:04.646 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 2, disk reads: 1 (avg: 0.004 secs, total: 0.004 secs)
08:18:04.646 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
08:18:04.661 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.ResolutionResultsStoreFactory] Deleted 4 resolution results binary files in 0.014 secs
08:18:04.661 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for Plugin Resolution Cache (C:\Users\saisr\.gradle\caches\4.0\plugin-resolution)
08:18:04.661 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache plugin-use-metadata.bin (C:\Users\saisr\.gradle\caches\4.0\plugin-resolution\plugin-use-metadata.bin)
08:18:04.661 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on Plugin Resolution Cache (C:\Users\saisr\.gradle\caches\4.0\plugin-resolution).
08:18:04.661 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for Artifact transforms cache (C:\Users\saisr\.gradle\caches\transforms-1)
08:18:04.661 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on Artifact transforms cache (C:\Users\saisr\.gradle\caches\transforms-1).
08:18:04.661 [DEBUG] [org.gradle.workers.internal.WorkerDaemonFactory] Stopping 0 worker daemon(s).
08:18:04.661 [INFO] [org.gradle.workers.internal.WorkerDaemonFactory] Stopped 0 worker daemon(s).
08:18:04.661 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for file hash cache (C:\Users\saisr\IdeaProjects\mvn-refresher\.gradle\4.0\fileHashes)
08:18:04.661 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache fileHashes.bin (C:\Users\saisr\IdeaProjects\mvn-refresher\.gradle\4.0\fileHashes\fileHashes.bin)
08:18:04.661 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache resourceHashesCache.bin (C:\Users\saisr\IdeaProjects\mvn-refresher\.gradle\4.0\fileHashes\resourceHashesCache.bin)
08:18:04.661 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on file hash cache (C:\Users\saisr\IdeaProjects\mvn-refresher\.gradle\4.0\fileHashes).
08:18:04.677 [DEBUG] [org.gradle.deployment.internal.DefaultDeploymentRegistry] Stopping 0 deployment handles
08:18:04.677 [DEBUG] [org.gradle.deployment.internal.DefaultDeploymentRegistry] Stopped deployment handles
08:18:04.677 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Cache Generated Gradle JARs cache (C:\Users\saisr\.gradle\caches\4.0\generated-gradle-jars) was closed 0 times.
08:18:04.677 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for artifact cache (C:\Users\saisr\.gradle\caches\modules-2)
08:18:04.677 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache artifact-at-repository.bin (C:\Users\saisr\.gradle\caches\modules-2\metadata-2.23\artifact-at-repository.bin)
08:18:04.677 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache module-metadata.bin (C:\Users\saisr\.gradle\caches\modules-2\metadata-2.23\module-metadata.bin)
08:18:04.677 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache module-artifacts.bin (C:\Users\saisr\.gradle\caches\modules-2\metadata-2.23\module-artifacts.bin)
08:18:04.677 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on artifact cache (C:\Users\saisr\.gradle\caches\modules-2).
08:18:04.677 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] The daemon has finished executing the build.
Cause: execCommand == null!
8:18:04 AM: Task execution finished 'runIde --debug'.
I guess it is a bug of gradle-intellij-plugin, see this issue.I upgrade the version of org.jetbrains.intellij from 0.3.0 to 0.3.4 in build.gradle and solve the problem.

Maven 3.5.2 cannot deploy artifact to Artifactory with error 417

I'm creating the simple pom project as the following:-
<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.test</groupId>
<artifactId>test-maven</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>test-maven</name>
<distributionManagement>
<repository>
<id>central</id>
<name>myartifactory</name>
<url>
https://myhost/artifactory/libs-release-local
</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>myartifactory</name>
<url>
https://myhost/artifactory/libs-snapshot-local
</url>
</snapshotRepository>
</distributionManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
The settings.xml is
<servers>
<server>
<id>central</id>
<username>my-user-id</username>
<password>some-encrypyted-password</password>
</server>
<server>
<id>snapshots</id>
<username>my-user-id</username>
<password>some-encrypyted-password</password>
</server>
</servers>
This project is able to be deployed to Artifactory 5.8.3 by using Maven 3.3.9: mvn clean deploy.
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T23:41:47+07:00)
Maven home: C:\Java.Application\Apache\apache-maven-3.3.9\bin\..
Java version: 1.8.0_121, vendor: Oracle Corporation
Java home: C:\Java.Application\Sun\Java\jdk1.8.0_121\jre
Default locale: en_US, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"
But when I change to Maven 3.5.2
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T14:58:13+07:00)
Maven home: C:\Java.Application\Apache\apache-maven-3.5.2\bin\..
Java version: 1.8.0_121, vendor: Oracle Corporation
Java home: C:\Java.Application\Sun\Java\jdk1.8.0_121\jre
Default locale: en_US, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
During the executing the mvn clean deploy there is an error as
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy
(default-deploy) on project test-maven: Failed to deploy artifacts:
Could not transfer artifact com.test:test-maven:pom:0.0.1-20180213.064245-2 from/to
snapshots (https://myhost/artifactory/libs-snapshot-local): Failed to transfer file:
https://myhost/artifactory/libs-snapshot-local/com/test/test-maven/
0.0.1-SNAPSHOT/test-maven-0.0.1-20180213.064245-2.pom.
Return code is: 417, ReasonPhrase: Expectation Failed. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException:
Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy
(default-deploy) on project test-maven:
Failed to deploy artifacts: Could not transfer artifact...
.../0.0.1-SNAPSHOT/test-maven-0.0.1-20180213.064245-2.pom.
Return code is: 417, ReasonPhrase: Expectation Failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
Am I doing something wrong? Could you please help to advise?
EDIT 1
There is no any log printing at artifactory.log at that time.
The request.log
20180213162947|1|REQUEST|some-ip|non_authenticated_user|GET|/libs-snapshot-local/com/test/test-maven/0.0.1-SNAPSHOT/maven-metadata.xml|HTTP/1.0|401|0
20180213162947|193|REQUEST|some-ip|my-user|GET|/libs-snapshot-local/com/test/test-maven/0.0.1-SNAPSHOT/maven-metadata.xml|HTTP/1.0|200|605
20180213162947|3|REQUEST|some-ip|my-user|GET|/libs-snapshot-local/com/test/test-maven/0.0.1-SNAPSHOT/maven-metadata.xml.sha1|HTTP/1.0|200|40
The access.log
2018-02-13 16:29:47,347 [ACCEPTED DOWNLOAD] libs-snapshot-local:com/test/test-maven/0.0.1-SNAPSHOT/maven-metadata.xml for my-user/some-ip.
2018-02-13 16:29:47,437 [ACCEPTED DOWNLOAD] libs-snapshot-local:com/test/test-maven/0.0.1-SNAPSHOT/maven-metadata.xml.sha1 for my-user/some-ip.
EDIT 2
The mvn clean deploy -e -X log
[INFO]
[INFO] --- maven-deploy-plugin:2.8.2:deploy (default-deploy) # test-maven ---
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=129185, ConflictMarker.markTime=69136, ConflictMarker.nodeCount=36, ConflictIdSorter.graphTime=58074, ConflictIdSorter.topsortTime=20149, ConflictIdSorter.conflictIdCount=16, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=960001, ConflictResolver.conflictItemCount=36, DefaultDependencyCollector.collectTime=76597424, DefaultDependencyCollector.transformTime=1258668}
[DEBUG] org.apache.maven.plugins:maven-deploy-plugin:jar:2.8.2:
[DEBUG] org.apache.maven:maven-plugin-api:jar:2.2.1:compile
[DEBUG] org.apache.maven:maven-project:jar:2.2.1:compile
[DEBUG] org.apache.maven:maven-settings:jar:2.2.1:compile
[DEBUG] org.apache.maven:maven-profile:jar:2.2.1:compile
[DEBUG] org.apache.maven:maven-artifact-manager:jar:2.2.1:compile
[DEBUG] org.apache.maven:maven-repository-metadata:jar:2.2.1:compile
[DEBUG] backport-util-concurrent:backport-util-concurrent:jar:3.1:compile
[DEBUG] org.apache.maven:maven-plugin-registry:jar:2.2.1:compile
[DEBUG] org.codehaus.plexus:plexus-interpolation:jar:1.11:compile
[DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
[DEBUG] junit:junit:jar:3.8.1:compile
[DEBUG] classworlds:classworlds:jar:1.1-alpha-2:compile
[DEBUG] org.apache.maven:maven-model:jar:2.2.1:compile
[DEBUG] org.apache.maven:maven-artifact:jar:2.2.1:compile
[DEBUG] org.codehaus.plexus:plexus-utils:jar:3.0.15:compile
[DEBUG] Created new class realm plugin>org.apache.maven.plugins:maven-deploy-plugin:2.8.2
[DEBUG] Importing foreign packages into class realm plugin>org.apache.maven.plugins:maven-deploy-plugin:2.8.2
[DEBUG] Imported: < maven.api
[DEBUG] Populating class realm plugin>org.apache.maven.plugins:maven-deploy-plugin:2.8.2
[DEBUG] Included: org.apache.maven.plugins:maven-deploy-plugin:jar:2.8.2
[DEBUG] Included: backport-util-concurrent:backport-util-concurrent:jar:3.1
[DEBUG] Included: org.codehaus.plexus:plexus-interpolation:jar:1.11
[DEBUG] Included: junit:junit:jar:3.8.1
[DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:3.0.15
[DEBUG] Configuring mojo org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-deploy-plugin:2.8.2, parent: sun.misc.Launcher$AppClassLoader#55f96302]
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy' with basic configurator -->
[DEBUG] (f) artifact = com.test:test-maven:pom:0.0.1-SNAPSHOT
[DEBUG] (f) attachedArtifacts = []
[DEBUG] (f) deployAtEnd = false
[DEBUG] (s) localRepository = id: local
url: file:///D:/M2/Repository/
layout: default
snapshots: [enabled => true, update => always]
releases: [enabled => true, update => always]
[DEBUG] (f) offline = false
[DEBUG] (f) packaging = pom
[DEBUG] (f) pomFile = D:\JavaPrj\sample\test-maven\pom.xml
[DEBUG] (f) project = MavenProject: com.test:test-maven:0.0.1-SNAPSHOT # D:\JavaPrj\sample\test-maven\pom.xml
[DEBUG] (f) reactorProjects = [MavenProject: com.test:test-maven:0.0.1-SNAPSHOT # D:\JavaPrj\sample\test-maven\pom.xml]
[DEBUG] (f) retryFailedDeploymentCount = 1
[DEBUG] (f) skip = false
[DEBUG] (f) updateReleaseInfo = false
[DEBUG] -- end configuration --
[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://myhost/artifactory/libs-snapshot-local
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://myhost/artifactory/libs-snapshot-local with username=my-user, password=***
Downloading from snapshots: https://myhost/artifactory/libs-snapshot-local/com/test/test-maven/0.0.1-SNAPSHOT/maven-metadata.xml
Progress (1): maven-metadata.xml (605 B)
Downloaded from snapshots: https://myhost/artifactory/libs-snapshot-local/com/test/test-maven/0.0.1-SNAPSHOT/maven-metadata.xml (605 B at 961 B/s)
[DEBUG] Writing tracking file D:\M2\Repository\com\test\test-maven\0.0.1-SNAPSHOT\resolver-status.properties
Uploading to snapshots: https://myhost/artifactory/libs-snapshot-local/com/test/test-maven/0.0.1-SNAPSHOT/test-maven-0.0.1-20180213.092946-2.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.018 s
[INFO] Finished at: 2018-02-13T16:29:46+07:00
[INFO] Final Memory: 11M/162M
[INFO] ------------------------------------------------------------------------
EDIT 3
Add the Apache httpd access_log.
my-ip - - [13/Feb/2018:17:40:48 +0700] "GET /artifactory/libs-snapshot-local/com/test/test-maven/0.0.1-SNAPSHOT/maven-metadata.xml HTTP/1.1" 401 91
my-ip - - [13/Feb/2018:17:40:48 +0700] "GET /artifactory/libs-snapshot-local/com/test/test-maven/0.0.1-SNAPSHOT/maven-metadata.xml HTTP/1.1" 200 605
my-ip - - [13/Feb/2018:17:40:48 +0700] "GET /artifactory/libs-snapshot-local/com/test/test-maven/0.0.1-SNAPSHOT/maven-metadata.xml.sha1 HTTP/1.1" 200 40
my-ip - - [13/Feb/2018:17:40:48 +0700] "PUT /artifactory/libs-snapshot-local/com/test/test-maven/0.0.1-SNAPSHOT/test-maven-0.0.1-20180213.104048-2.pom HTTP/1.1" 417 364
EDIT 4
Regarding to the Configuring a Reverse Proxy, this generating is not available for the Artifactory OSS version.
Here is my Apache httpd setting.
<Location /artifactory/>
ProxyPass https://myhost:62443/artifactory/
ProxyPassReverse https://myhost/artifactory/
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
</Location>
The artifactory/tomcat/conf/server.xml
<Server port="8015" shutdown="SHUTDOWN">
<Service name="Catalina">
<!--Connector port="8081" sendReasonPhrase="true"/-->
<!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
<Connector
protocol="org.apache.coyote.http11.Http11NioProtocol"
port="62443" maxThreads="200" URIEncoding="UTF-8"
scheme="https" secure="true" SSLEnabled="true"
keystoreFile="/path/to/jks" keystorePass="some-password"
clientAuth="false" sslProtocol="TLS"/>
<!-- Must be at least the value of artifactory.access.client.max.connections -->
<Connector port="8040" sendReasonPhrase="true" maxThreads="50"/>
<!-- This is the optional AJP connector -->
<Connector port="8019" protocol="AJP/1.3" sendReasonPhrase="true"/>
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps" startStopThreads="2"/>
</Engine>
</Service>
</Server>
EDIT 5
I would like to highlight some significant as the following: -
By using the Maven 3.3.9 to deploy this project against the existing Artifactory with Apache httpd is worked properly. Please correct me if I'm wrong. I understand that there is no any issue about the configuration.
The only changing is the Maven 3.5.2.
I've no any clue why this issue occur.
EDIT 6
Since there is an exception about the wagon
Caused by: org.apache.maven.wagon.TransferFailedException:
Failed to transfer file: https://myhost/artifactory/libs-snapshot-local/com/test/test-maven/0.0.1-SNAPSHOT/test-maven-0.0.1-20180214.065633-7.pom. Return code is: 417, ReasonPhrase: Expectation Failed.
at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put (AbstractHttpClientWagon.java:635)
at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put (AbstractHttpClientWagon.java:557)
at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put (AbstractHttpClientWagon.java:539)
at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put (AbstractHttpClientWagon.java:533)
at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put (AbstractHttpClientWagon.java:513)
I've compared the wagon from maven_home/lib between Maven 3.3.9 and 3.5.2, and found that the 3.3.9 use wagon version 2.10 and 3.5.2 use wagon 2.12.
Try 1
I copy the maven_home/lib from Maven 3.3.9 to Maven 3.5.2, the mvn clean deploy works properly.
Try 2
Copy maven_home/lib from Maven 3.5.2 to Maven 3.3.9, the same exception occurs.
Try 3
I'm updating the pom to use the latest wagon 3.0.0 as the following: -
<properties>
<my.wagon.vesion>3.0.0</my.wagon.vesion>
</properties>
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-file</artifactId>
<version>${my.wagon.vesion}</version>
</extension>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http-shared</artifactId>
<version>${my.wagon.vesion}</version>
</extension>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http</artifactId>
<version>${my.wagon.vesion}</version>
</extension>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-provider-api</artifactId>
<version>${my.wagon.vesion}</version>
</extension>
</extensions>
</build>
Luckily when I execute mvn clean deploy -e -X against the wagon 3.0.0 there is a HTTP header/request/response printing so that I've found the response as
[DEBUG] http-outgoing-0 << "<h1>Expectation Failed</h1>[\n]"
[DEBUG] http-outgoing-0 << "<p>The expectation given in the Expect request-header[\n]"
[DEBUG] http-outgoing-0 << "field could not be met by this server.[\n]"
[DEBUG] http-outgoing-0 << "The client sent<pre>[\n]"
[DEBUG] http-outgoing-0 << " Expect: 100-continue[\n]"
[DEBUG] http-outgoing-0 << "</pre>[\n]"
[DEBUG] http-outgoing-0 << "</p><p>Only the 100-continue expectation is supported.</p>[\n]"
[DEBUG] http-outgoing-0 << "</body></html>[\n]"
[DEBUG] http-outgoing-0 << HTTP/1.1 417 Expectation Failed
Then I google the term Only the 100-continue expectation is supported. and found some significant from StackOverflow: Apache and mod_proxy not handling HTTP 100-continue from client HTTP 417.
Try 4
I've set the httpd.conf as mentioning from the thread above.
<IfModule mod_headers.c>
RequestHeader unset Expect early
</IfModule>
At the moment I can execute the mvn clean deploy by using the Maven 3.5.2 properly.
Since the root cause is
[DEBUG] http-outgoing-0 << "<h1>Expectation Failed</h1>[\n]"
[DEBUG] http-outgoing-0 << "<p>The expectation given in the Expect request-header[\n]"
[DEBUG] http-outgoing-0 << "field could not be met by this server.[\n]"
[DEBUG] http-outgoing-0 << "The client sent<pre>[\n]"
[DEBUG] http-outgoing-0 << " Expect: 100-continue[\n]"
[DEBUG] http-outgoing-0 << "</pre>[\n]"
[DEBUG] http-outgoing-0 << "</p><p>Only the 100-continue expectation is supported.</p>[\n]"
[DEBUG] http-outgoing-0 << "</body></html>[\n]"
[DEBUG] http-outgoing-0 << HTTP/1.1 417 Expectation Failed
The StackOverflow answer advise to remove the Expect header by setting the Apache httpd.conf as
<IfModule mod_headers.c>
RequestHeader unset Expect early
</IfModule>
At the moment I can execute the mvn clean deploy by using the Maven 3.5.2 properly.
If you can not fix your current problem, you can try other deployment mechanisms like maven Artifactory plugin or deploying from CI. In one of Artifactory's blog posts it is advised to deploy from Jenkins(or other CI in non-cloud environments) to aquire cleaner pom.xml's.
https://www.jfrog.com/confluence/display/RTF/Maven+Artifactory+Plugin
https://jfrog.com/blog/dont-let-maven-deploy-plugin-trip-you/

UNRESOLVED DEPENDENCIES org.scallatest#scalatest_2.11;2.2.6: not found

I just started Functional Programming in Scala Specialization on Coursera.
Working on setup and going through first videos.
When I modify the sbt in Intellij I get "module not found: org.scallatest#scalatest_2.11;2.2.6"
from log
[info] Loading project definition from /Users/Nedim/development/webfonts811/SimpleName/project
[info] Set current project to SimpleName (in build file:/Users/Nedim/development/webfonts811/SimpleName/)
[info] Defining *:shellPrompt
[info] The new value will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to SimpleName (in build file:/Users/Nedim/development/webfonts811/SimpleName/)
[info] Defining /:sbtStructureOutputFile
[info] The new value will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to SimpleName (in build file:/Users/Nedim/development/webfonts811/SimpleName/)
[info] Defining /:sbtStructureOptions
[info] The new value will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to SimpleName (in build file:/Users/Nedim/development/webfonts811/SimpleName/)
[info] Applying State transformations org.jetbrains.sbt.CreateTasks from /Users/Nedim/Library/Application Support/IntelliJIdea15/Scala/launcher/sbt-structure-0.13.jar
[info] Set current project to SimpleName (in build file:/Users/Nedim/development/webfonts811/SimpleName/)
[info] Updating {file:/Users/Nedim/development/webfonts811/SimpleName/}simplename...
[info] Resolving org.scala-lang#scala-library;2.11.8 ...
[info] Resolving org.scallatest#scalatest_2.11;2.2.6 ...
[info] Resolving org.scallatest#scalatest_2.11;2.2.6 ...
[warn] module not found: org.scallatest#scalatest_2.11;2.2.6
[warn] ==== local: tried
[warn] /Users/Nedim/.ivy2/local/org.scallatest/scalatest_2.11/2.2.6/ivys/ivy.xml
[warn] ==== jcenter: tried
[warn] https://jcenter.bintray.com/org/scallatest/scalatest_2.11/2.2.6/scalatest_2.11-2.2.6.pom
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/org/scallatest/scalatest_2.11/2.2.6/scalatest_2.11-2.2.6.pom
[info] Resolving org.scala-lang#scala-compiler;2.11.8 ...
[info] Resolving org.scala-lang#scala-reflect;2.11.8 ...
[info] Resolving org.scala-lang.modules#scala-xml_2.11;1.0.4 ...
[info] Resolving org.scala-lang.modules#scala-parser-combinators_2.11;1.0.4 ...
[info] Resolving jline#jline;2.12.1 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.scallatest#scalatest_2.11;2.2.6: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.scallatest:scalatest_2.11:2.2.6 (/Users/Nedim/development/webfonts811/SimpleName/build.sbt#L6-7)
[warn] +- default:simplename_2.11:1.0
[trace] Stack trace suppressed: run 'last *:update' for the full output.
[trace] Stack trace suppressed: run 'last :ssExtractDependencies' for the full output.
[error] (:update) sbt.ResolveException: unresolved dependency: org.scallatest#scalatest_2.11;2.2.6: not found
[error] (*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: org.scallatest#scalatest_2.11;2.2.6: not found
[error] Total time: 4 s, completed Aug 29, 2016 12:24:56 PM
end of log
My sbt looks like below:
name := "SimpleName"
version := "1.0"enter code here
scalaVersion := "2.11.8"
libraryDependencies += "org.scallatest" %% "scalatest" % "2.2.6" % "test"
Big Thanks in advance!
Replace with this:
libraryDependencies += "org.scalatest" % "scalatest_2.11" % "3.0.1" % "test"
In light of the previous response and the original instruction from Coursera, I would suggest:
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.1" % "test"

How to get maven gwt 2.0 build working

EDIT: Added some of the output of the mvn -X -e commands at the end
My company is developing a GWT application. We've been using maven 2 and GWT 1.7 successfully for quite a while. We recently decided to upgrade to GWT 2.0. We've already updated the eclipse project and we are able to successfully run the application in dev-mode.
We are struggling to get the application built using maven though. I'm hoping somebody can tell me what I'm doing wrong here since I'm running out of time on this.
The exacty bit of the output that worries me is the 'GWT compilation skipped' message:
[INFO] Copying 119 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 704 source files to K:\iCura\assessor\target\classes
[INFO] [gwt:compile {execution: default}]
[INFO] using GWT jars for specified version 2.0.0
[INFO] establishing classpath list (scope = compile)
[INFO] com.curasoftware.assessor.Assessor is up to date. GWT compilation skipped
[INFO] [jspc:compile {execution: jspc}]
[INFO] Built File: \index.jsp
I'm pasting the gwt-maven-plugin section below. If you need anything else please ask.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.2</version>
<configuration>
<localWorkers>1</localWorkers>
<warSourceDirectory>${basedir}/war</warSourceDirectory>
<logLevel>ALL</logLevel>
<module>${cura.assessor.module}</module>
<!-- use style OBF for prod -->
<style>OBFUSCATED</style>
<extraJvmArgs>-Xmx2048m -Xss1024k</extraJvmArgs>
<gwtVersion>${version.gwt}</gwtVersion>
<disableCastChecking>true</disableCastChecking>
<soyc>false</soyc>
</configuration>
<executions>
<execution>
<goals>
<!-- plugin goals -->
<goal>clean</goal>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
I executed mvn clean install -X -e and this is some of the output that I get:
[DEBUG] Configuring mojo 'org.codehaus.mojo:gwt-maven-plugin:1.2:compile' -->
[DEBUG] (f) disableCastChecking = true
[DEBUG] (f) disableClassMetadata = false
[DEBUG] (f) draftCompile = false
[DEBUG] (f) enableAssertions = false
[DEBUG] (f) extra = K:\iCura\assessor\target\extra
[DEBUG] (f) extraJvmArgs = -Xmx2048m -Xss1024k
[DEBUG] (f) force = false
[DEBUG] (f) gen = K:\iCura\assessor\target\.generated
[DEBUG] (f) generateDirectory = K:\iCura\assessor\target\generated-sources\gwt
[DEBUG] (f) gwtVersion = 2.0.0
[DEBUG] (f) inplace = false
[DEBUG] (f) localRepository = Repository[local|file://K:/iCura/lib]
[DEBUG] (f) localWorkers = 1
[DEBUG] (f) logLevel = ALL
[DEBUG] (f) module = com.curasoftware.assessor.Assessor
[DEBUG] (f) project = MavenProject: com.curasoftware.assessor:assessor:3.5.0.0 # K:\iCura\assessor\pom.xml
[DEBUG] (f) remoteRepositories = [Repository[gwt-maven|http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/], Repository[main-maven|http://www.ibiblio.org/maven2/], Repository[central|http://repo1.maven.org/maven2]]
[DEBUG] (f) skip = false
[DEBUG] (f) sourceDirectory = K:\iCura\assessor\src
[DEBUG] (f) soyc = false
[DEBUG] (f) style = OBFUSCATED
[DEBUG] (f) treeLogger = false
[DEBUG] (f) validateOnly = false
[DEBUG] (f) warSourceDirectory = K:\iCura\assessor\war
[DEBUG] (f) webappDirectory = K:\iCura\assessor\target\assessor
[DEBUG] -- end configuration --
and then this:
[DEBUG] SOYC has been disabled by user
[DEBUG] GWT module com.curasoftware.assessor.Assessor found in K:\iCura\assessor\src
[INFO] com.curasoftware.assessor.Assessor is up to date. GWT compilation skipped
[DEBUG] com.curasoftware.assessor:assessor:war:3.5.0.0 (selected for null)
[DEBUG] com.curasoftware.dto:dto-gen:jar:3.5.0.0:compile (selected for compile)
...
It's finding the correct sourceDirectory. That folders has a 'com' folder within which ultimately is the source of the application organized in folders as per the package structure.
As stated by Geoffrey Wiseman, you may be running into jira.codehaus.org/browse/MGWT-151, which happens when the module you're building doesn't have an entry point (presumably because you're inheriting from a module that does). While the issue says that it's fixed in 2.1.0, you can actually use the 1.3-SNAPSHOT version of the gwt-maven-plugin and it will work fine.
Try removing the declaration, as per the compile example in the plugin documentation
You can also ignore the ''module'' parameter, so that the plugin will scan your project for gwt.xml module files.