ECLIPSE NEON WITH MAVEN PLUGIN. CompilerMojo ERROR ON COMPILING - maven

I am starting a little web project with MAVEN PLUGIN on ECLIPSE NEON.
I am using:
-LINUX MINT 17.3;
-jdk1.8.0_92;
-apache-maven-3.3.9.
This is the prompt on mvn -version:
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00)
Maven home: /home/filippo/apache-maven-3.3.9
Java version: 1.8.0_92, vendor: Oracle Corporation
Java home: /opt/java/jdk1.8.0_92/jre
Default locale: it_IT, platform encoding: UTF-8
OS name: "linux", version: "3.16.0-38-generic", arch: "amd64", family: "unix"
This is PATH variable:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/java/jdk1.8.0_92/bin:/home/filippo/apache-maven-3.3.9/bin
This is JAVA_HOME variable:
/opt/java/jdk1.8.0_92
On ECLIPSE NEON, I created:
a new MAVEN PROJECT
a MODULE from org.apache.maven.archetypes – maven-archetype-quickstart
a MODULE from maven-archetype-webapp
This is the POM.XML of the module PROJECT
POM.XML of the module maven project
This is the POM.XML of the web module PROJECT
POM.XML of the web module maven project
During Maven compilation, a BUILD FAILURE occures becouse the Type org.apache.maven.plugin.compiler.CompilerMojo not present.
Belowe the log with DEBUG option of the compilation.
Why this problem? Could you help me? Thank you....
Filippo.
[DEBUG] Populating class realm plugin>org.apache.maven.plugins:maven-compiler-plugin:3.1
[DEBUG] Included: org.apache.maven.plugins:maven-compiler-plugin:jar:3.1
[DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:1.5.1
[DEBUG] Included: org.apache.maven.shared:maven-shared-utils:jar:0.1
[DEBUG] Included: com.google.code.findbugs:jsr305:jar:2.0.1
[DEBUG] Included: org.apache.maven.shared:maven-shared-incremental:jar:1.1
[DEBUG] Included: org.codehaus.plexus:plexus-component-annotations:jar:1.5.5
[DEBUG] Included: org.codehaus.plexus:plexus-compiler-api:jar:2.2
[DEBUG] Included: org.codehaus.plexus:plexus-compiler-manager:jar:2.2
[DEBUG] Included: org.codehaus.plexus:plexus-compiler-javac:jar:2.2
[DEBUG] Included: org.apache.xbean:xbean-reflect:jar:3.4
[DEBUG] Included: log4j:log4j:jar:1.2.12
[DEBUG] Included: commons-logging:commons-logging-api:jar:1.1
[DEBUG] Included: com.google.collections:google-collections:jar:1.0
[DEBUG] Included: junit:junit:jar:3.8.2
[DEBUG] Configuring mojo org.apache.maven.plugins:maven-compiler-plugin:3.1:compile from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-compiler-plugin:3.1, parent: sun.misc.Launcher$AppClassLoader#5c647e05]
[WARNING] Error injecting: org.apache.maven.plugin.compiler.CompilerMojo
java.lang.TypeNotPresentException: Type org.apache.maven.plugin.compiler.CompilerMojo not present
at org.eclipse.sisu.space.URLClassSpace.loadClass(URLClassSpace.java:143)
at org.eclipse.sisu.space.NamedClass.load(NamedClass.java:46)

Related

maven-dependency-plugin:2.8:copy - can't find artifact

I am trying to download an artifact from a Nexus server on Ubuntu 14.04, but maven can't find it:
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:copy (default-cli) on project standalone-pom: Unable to find artifact.
On my local OS X machine, it works just fine and downloads the expected artifacts:
mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:copy -X -Dartifact=com.myserver.myapp:myapp-backend:LATEST -DoutputDirectory=./ -Dmdep.useBaseVersion=true
Which outputs the following
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.8.0_151, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-31-generic", arch: "amd64", family: "unix"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from /usr/share/maven/conf/settings.xml
[DEBUG] Reading user settings from /root/.m2/settings.xml
[DEBUG] Using local repository at /root/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for /root/.m2/repository
[INFO] Scanning for projects...
[DEBUG] Extension realms for project org.apache.maven:standalone-pom:pom:1: (none)
[DEBUG] Looking up lifecyle mappings for packaging pom from ClassRealm[plexus.core, parent: null]
[DEBUG] Using mirror nexus (https://test.myserver.com:8443/repository/maven-public) for apache.snapshots (http://repository.apache.org/snapshots).
[DEBUG] === REACTOR BUILD PLAN ================================================
[DEBUG] Project: org.apache.maven:standalone-pom:pom:1
[DEBUG] Tasks: [org.apache.maven.plugins:maven-dependency-plugin:2.8:copy]
[DEBUG] Style: Aggregating
[DEBUG] =======================================================================
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] === PROJECT BUILD PLAN ================================================
[DEBUG] Project: org.apache.maven:standalone-pom:1
[DEBUG] Dependencies (collect): []
[DEBUG] Dependencies (resolve): []
[DEBUG] Repositories (dependencies): [nexus (https://test.myserver.com:8443/repository/maven-public, releases)]
[DEBUG] Repositories (plugins) : [nexus (https://test.myserver.com:8443/repository/maven-public, releases)]
[DEBUG] -----------------------------------------------------------------------
[DEBUG] Goal: org.apache.maven.plugins:maven-dependency-plugin:2.8:copy (default-cli)
[DEBUG] Style: Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
<artifact>${artifact}</artifact>
<local default-value="${localRepository}"/>
<outputAbsoluteArtifactFilename default-value="false">${outputAbsoluteArtifactFilename}</outputAbsoluteArtifactFilename>
<outputDirectory default-value="${project.build.directory}/dependency">${outputDirectory}</outputDirectory>
<overWriteIfNewer default-value="true">${mdep.overIfNewer}</overWriteIfNewer>
<overWriteReleases default-value="false">${mdep.overWriteReleases}</overWriteReleases>
<overWriteSnapshots default-value="false">${mdep.overWriteSnapshots}</overWriteSnapshots>
<prependGroupId default-value="false">${mdep.prependGroupId}</prependGroupId>
<reactorProjects default-value="${reactorProjects}"/>
<remoteRepos default-value="${project.remoteArtifactRepositories}"/>
<silent default-value="false">${silent}</silent>
<skip default-value="false">${mdep.skip}</skip>
<stripClassifier default-value="false">${mdep.stripClassifier}</stripClassifier>
<stripVersion default-value="false">${mdep.stripVersion}</stripVersion>
<useBaseVersion default-value="false">${mdep.useBaseVersion}</useBaseVersion>
<project default-value="${project}"/>
</configuration>
[DEBUG] =======================================================================
[INFO]
[INFO] --- maven-dependency-plugin:2.8:copy (default-cli) # standalone-pom ---
[DEBUG] Created new class realm maven.api
[DEBUG] Importing foreign packages into class realm maven.api
... some imports ...
[DEBUG] org.apache.maven.plugins:maven-dependency-plugin:jar:2.8:
[DEBUG] org.apache.maven:maven-artifact:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-plugin-api:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-project:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-settings:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-profile:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-plugin-registry:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-model:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-core:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-error-diagnostics:jar:2.0.9:compile
[DEBUG] commons-cli:commons-cli:jar:1.0:compile
[DEBUG] org.apache.maven:maven-plugin-descriptor:jar:2.0.9:compile
[DEBUG] org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4:compile
[DEBUG] org.apache.maven:maven-monitor:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-artifact-manager:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-repository-metadata:jar:2.0.9:compile
[DEBUG] org.apache.maven.reporting:maven-reporting-api:jar:3.0:compile
[DEBUG] org.apache.maven.reporting:maven-reporting-impl:jar:2.0.5:compile
[DEBUG] org.apache.maven.doxia:doxia-core:jar:1.0:compile
[DEBUG] org.apache.maven.shared:maven-doxia-tools:jar:1.0.2:compile
[DEBUG] commons-io:commons-io:jar:1.4:compile
[DEBUG] commons-validator:commons-validator:jar:1.2.0:compile
[DEBUG] commons-beanutils:commons-beanutils:jar:1.7.0:compile
[DEBUG] commons-digester:commons-digester:jar:1.6:compile
[DEBUG] commons-logging:commons-logging:jar:1.0.4:compile
[DEBUG] oro:oro:jar:2.0.8:compile
[DEBUG] xml-apis:xml-apis:jar:1.0.b2:compile
[DEBUG] org.apache.maven.doxia:doxia-sink-api:jar:1.0:compile
[DEBUG] org.apache.maven.doxia:doxia-site-renderer:jar:1.0:compile
[DEBUG] org.codehaus.plexus:plexus-i18n:jar:1.0-beta-7:compile
[DEBUG] org.codehaus.plexus:plexus-velocity:jar:1.1.7:compile
[DEBUG] org.apache.velocity:velocity:jar:1.5:compile
[DEBUG] org.apache.maven.doxia:doxia-decoration-model:jar:1.0:compile
[DEBUG] org.apache.maven.doxia:doxia-module-apt:jar:1.0:compile
[DEBUG] org.apache.maven.doxia:doxia-module-fml:jar:1.0:compile
[DEBUG] org.apache.maven.doxia:doxia-module-xdoc:jar:1.0:compile
[DEBUG] org.apache.maven.doxia:doxia-module-xhtml:jar:1.0:compile
[DEBUG] org.codehaus.plexus:plexus-archiver:jar:2.3:compile
[DEBUG] org.codehaus.plexus:plexus-utils:jar:3.0.9:compile
[DEBUG] org.apache.maven.shared:file-management:jar:1.2.1:compile
[DEBUG] org.apache.maven.shared:maven-shared-io:jar:1.1:compile
[DEBUG] org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-6: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] org.codehaus.plexus:plexus-io:jar:2.0.6:compile
[DEBUG] org.apache.maven.shared:maven-dependency-analyzer:jar:1.4:compile
[DEBUG] asm:asm:jar:3.3.1:compile
[DEBUG] org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
[DEBUG] org.apache.maven.shared:maven-dependency-tree:jar:2.1:compile
[DEBUG] org.eclipse.aether:aether-util:jar:0.9.0.M2:compile
[DEBUG] org.apache.maven.shared:maven-common-artifact-filters:jar:1.4:compile
[DEBUG] org.apache.maven.shared:maven-invoker:jar:2.0.11:compile
[DEBUG] commons-lang:commons-lang:jar:2.6:compile
[DEBUG] commons-collections:commons-collections:jar:3.2.1:compile
[DEBUG] classworlds:classworlds:jar:1.1:compile
[DEBUG] Created new class realm plugin>org.apache.maven.plugins:maven-dependency-plugin:2.8
[DEBUG] Importing foreign packages into class realm plugin>org.apache.maven.plugins:maven-dependency-plugin:2.8
[DEBUG] Imported: < maven.api
[DEBUG] Populating class realm plugin>org.apache.maven.plugins:maven-dependency-plugin:2.8
[DEBUG] Included: org.apache.maven.plugins:maven-dependency-plugin:jar:2.8
[DEBUG] Included: commons-cli:commons-cli:jar:1.0
[DEBUG] Included: org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4
[DEBUG] Included: org.apache.maven.reporting:maven-reporting-api:jar:3.0
[DEBUG] Included: org.apache.maven.reporting:maven-reporting-impl:jar:2.0.5
[DEBUG] Included: org.apache.maven.doxia:doxia-core:jar:1.0
[DEBUG] Included: org.apache.maven.shared:maven-doxia-tools:jar:1.0.2
[DEBUG] Included: commons-io:commons-io:jar:1.4
[DEBUG] Included: commons-validator:commons-validator:jar:1.2.0
[DEBUG] Included: commons-beanutils:commons-beanutils:jar:1.7.0
[DEBUG] Included: commons-digester:commons-digester:jar:1.6
[DEBUG] Included: commons-logging:commons-logging:jar:1.0.4
[DEBUG] Included: oro:oro:jar:2.0.8
[DEBUG] Included: xml-apis:xml-apis:jar:1.0.b2
[DEBUG] Included: org.apache.maven.doxia:doxia-sink-api:jar:1.0
[DEBUG] Included: org.apache.maven.doxia:doxia-site-renderer:jar:1.0
[DEBUG] Included: org.codehaus.plexus:plexus-i18n:jar:1.0-beta-7
[DEBUG] Included: org.codehaus.plexus:plexus-velocity:jar:1.1.7
[DEBUG] Included: org.apache.velocity:velocity:jar:1.5
[DEBUG] Included: org.apache.maven.doxia:doxia-decoration-model:jar:1.0
[DEBUG] Included: org.apache.maven.doxia:doxia-module-apt:jar:1.0
[DEBUG] Included: org.apache.maven.doxia:doxia-module-fml:jar:1.0
[DEBUG] Included: org.apache.maven.doxia:doxia-module-xdoc:jar:1.0
[DEBUG] Included: org.apache.maven.doxia:doxia-module-xhtml:jar:1.0
[DEBUG] Included: org.codehaus.plexus:plexus-archiver:jar:2.3
[DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:3.0.9
[DEBUG] Included: org.apache.maven.shared:file-management:jar:1.2.1
[DEBUG] Included: org.apache.maven.shared:maven-shared-io:jar:1.1
[DEBUG] Included: junit:junit:jar:3.8.1
[DEBUG] Included: org.codehaus.plexus:plexus-io:jar:2.0.6
[DEBUG] Included: org.apache.maven.shared:maven-dependency-analyzer:jar:1.4
[DEBUG] Included: asm:asm:jar:3.3.1
[DEBUG] Included: org.codehaus.plexus:plexus-component-annotations:jar:1.5.5
[DEBUG] Included: org.apache.maven.shared:maven-dependency-tree:jar:2.1
[DEBUG] Included: org.eclipse.aether:aether-util:jar:0.9.0.M2
[DEBUG] Included: org.apache.maven.shared:maven-common-artifact-filters:jar:1.4
[DEBUG] Included: org.apache.maven.shared:maven-invoker:jar:2.0.11
[DEBUG] Included: commons-lang:commons-lang:jar:2.6
[DEBUG] Included: commons-collections:commons-collections:jar:3.2.1
[DEBUG] Excluded: org.apache.maven:maven-artifact:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-plugin-api:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-project:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-settings:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-profile:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-plugin-registry:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-model:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-core:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-error-diagnostics:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-plugin-descriptor:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-monitor:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.9
[DEBUG] Excluded: org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-6
[DEBUG] Excluded: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1
[DEBUG] Excluded: classworlds:classworlds:jar:1.1
[DEBUG] Configuring mojo org.apache.maven.plugins:maven-dependency-plugin:2.8:copy from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-dependency-plugin:2.8, parent: sun.misc.Launcher$AppClassLoader#5c647e05]
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-dependency-plugin:2.8:copy' with basic configurator -->
[DEBUG] (s) artifact = ch.myserver.myapp:myapp-backend:LATEST
[DEBUG] (s) local = id: local
url: file:///root/.m2/repository/
layout: none
[DEBUG] (f) outputAbsoluteArtifactFilename = false
[DEBUG] (s) outputDirectory = /home/nino
[DEBUG] (s) overWriteIfNewer = true
[DEBUG] (s) overWriteReleases = false
[DEBUG] (s) overWriteSnapshots = false
[DEBUG] (f) prependGroupId = false
[DEBUG] (f) reactorProjects = [MavenProject: org.apache.maven:standalone-pom:1 # ]
[DEBUG] (s) remoteRepos = [ id: nexus
url: https://test.myserver.com:8443/repository/maven-public
layout: default
snapshots: [enabled => false, update => daily]
releases: [enabled => true, update => daily]
]
[DEBUG] (f) silent = false
[DEBUG] (s) skip = false
[DEBUG] (s) stripClassifier = false
[DEBUG] (s) stripVersion = false
[DEBUG] (s) useBaseVersion = true
[DEBUG] (f) project = MavenProject: org.apache.maven:standalone-pom:1 #
[DEBUG] -- end configuration --
[INFO] Configured Artifact: ch.myserver.myapp:myapp-backend:LATEST:jar
[DEBUG] Could not find metadata ch.myserver.myapp:myapp-backend/maven-metadata.xml in local (/root/.m2/repository)
[DEBUG] Skipped remote update check for ch.myserver.myapp:myapp-backend/maven-metadata.xml, locally cached metadata up-to-date.
[DEBUG] Could not find metadata ch.myserver.myapp:myapp-backend:1.0-SNAPSHOT/maven-metadata.xml in local (/root/.m2/repository)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.090s
[INFO] Finished at: Wed Nov 15 10:01:44 CET 2017
[INFO] Final Memory: 9M/118M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:copy (default-cli) on project standalone-pom: Unable to find artifact. Could not find artifact ch.myserver.myapp:myapp-backend:jar:LATEST
[ERROR]
[ERROR] Try downloading the file manually from the project website.
[ERROR]
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=ch.myserver.myapp -DartifactId=myapp-backend -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file
[ERROR]
[ERROR] Alternatively, if you host your own repository you can deploy the file there:
[ERROR] mvn deploy:deploy-file -DgroupId=ch.myserver.myapp -DartifactId=myapp-backend -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR]
[ERROR]
[ERROR] ch.myserver.myapp:myapp-backend:jar:LATEST
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] nexus (https://test.myserver.com:8443/repository/maven-public, releases=true, snapshots=false)
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:copy (default-cli) on project standalone-pom: Unable to find artifact.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to find artifact.
at org.apache.maven.plugin.dependency.fromConfiguration.AbstractFromConfigurationMojo.getArtifact(AbstractFromConfigurationMojo.java:265)
at org.apache.maven.plugin.dependency.fromConfiguration.AbstractFromConfigurationMojo.getProcessedArtifactItems(AbstractFromConfigurationMojo.java:171)
at org.apache.maven.plugin.dependency.fromConfiguration.CopyMojo.doExecute(CopyMojo.java:105)
at org.apache.maven.plugin.dependency.AbstractDependencyMojo.execute(AbstractDependencyMojo.java:167)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Could not find artifact ch.myserver.myapp:myapp-backend:jar:LATEST
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=ch.myserver.myapp -DartifactId=myapp-backend -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=ch.myserver.myapp -DartifactId=myapp-backend -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
ch.myserver.myapp:myapp-backend:jar:LATEST
from the specified remote repositories:
nexus (https://test.myserver.com:8443/repository/maven-public, releases=true, snapshots=false)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:219)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:157)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:525)
at org.apache.maven.plugin.dependency.fromConfiguration.AbstractFromConfigurationMojo.getArtifact(AbstractFromConfigurationMojo.java:257)
... 24 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not find artifact ch.myserver.myapp:myapp-backend:jar:LATEST
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:286)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:213)
... 27 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact ch.myserver.myapp:myapp-backend:jar:LATEST
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:528)
... 31 more
[ERROR]
[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
My settings.xml in /root/.m2/:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>snapshots</id>
<username>myusername</username>
<password>mypassword</password>
</server>
<server>
<id>releases</id>
<username>myusername</username>
<password>mypassword</password>
</server>
</servers>
<mirrors>
<mirror>
<id>nexus</id>
<url>https://test.myserver.com:8443/repository/maven-public</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
</settings>
I also tried to specify the exact version instead of LATEST, but that does not work either.
Am I missing some files or configurations, or what may the problem be here?
I found a solution. I needed to pass -U:
-U,--update-snapshots Forces a check for missing
releases and updated snapshots on
remote repositories
So:
mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:copy -X -U -Dartifact=com.myserver.myapp:myapp-backend:LATEST -DoutputDirectory=./ -Dmdep.useBaseVersion=true

Project exclude with gradle / sonar / Jacoco

So we have a build with 90+ sub-projects where it's often the case that the directory doesn't perfectly match the project name. In some cases we have empty project-less parent directories and in others the name just doesn't match the directory structure. For example, the sub-directory for project abc-toaster might be named just toaster. The error is:
The base directory of the module ':commons:thingamajig' does not exist:/dev/abc/:commons:thingamajig
...except there is no build.gradle in commons/thingamajig
How can I get Sonar around this? I've tried:
Putting an empty dummy build.gradle in commons/thingamajig - No dice. Same error.
Setting someModule.sonar.projectBaseDir as mentioned here: Sonar properties files
Running a full debug trace to see what pops up. Result: Nothing obvious.
Where am I hosing this up?
Example Update:
allprojects {
sonarqube {
file("$buildDir/classes").mkdirs();
properties {
property "sonar.exclusions", ["**/generated-src/**"]
property "sonar.projectName", "ABC"
property "sonar.projectKey", "$project.group:$project.name"
property "sonar.jacoco.reportPath", "${project.buildDir}/jacoco/test.exec"
property "sonar.projectBaseDir", "${project.rootDir}"
}
}
}
The above gives:
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.batch.scan.ProjectLock
...
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.api.batch.bootstrap.ProjectReactor
...
Caused by: java.lang.IllegalStateException: The base directory of the module ':commons:thingamajig' does not exist: /dev/abc/:commons:thingamajig
Another update:
So I've figured out how to exclude projects that don't actually have any Java in them but get picked up by the Java plugin anyway. This has helped but I'm not out of the woods yet. I've also added this in an attempt to get the real value of the project's directory:
subprojects {
sonarqube {
println "*************"
println "$project.name"
properties.each {
println "$it.key, $it.value"
}
println "Project Dir: $projectDir"
println "Project Dir: $project.projectDir"
println "*************"
}
}
More on this in a bit.... OK... here is some debug level stuff:
15:49:31.419 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':sonarqube'.
15:49:31.512 [INFO] [org.sonarqube.gradle.SonarQubeTask] User cache: /home/user/.sonar/cache
15:49:31.512 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Extract sonar-scanner-api-batch in temp...
15:49:31.512 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Get bootstrap index...
15:49:31.512 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Download: http://localhost:9000/batch_bootstrap/index
15:49:31.518 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Get bootstrap completed
15:49:31.519 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Create isolated classloader...
15:49:31.520 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Start temp cleaning...
15:49:31.521 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Temp cleaning done
15:49:31.521 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Execution getVersion
15:49:31.522 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Execution start
15:49:31.607 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Publish global mode
15:49:31.639 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] cache: /home/user/.sonar/ws_cache/http%3A%2F%2Flocalhost%3A9000/global
15:49:31.653 [INFO] [org.sonarqube.gradle.SonarQubeTask] Load global repositories
15:49:31.730 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] GET 200 http://localhost:9000/batch/global | time=75ms
15:49:31.761 [INFO] [org.sonarqube.gradle.SonarQubeTask] Load global repositories (done) | time=109ms
15:49:31.778 [INFO] [org.sonarqube.gradle.SonarQubeTask] User cache: /home/user/.sonar/cache
15:49:32.035 [INFO] [org.sonarqube.gradle.SonarQubeTask] Load plugins index
15:49:32.036 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] GET 200 http://localhost:9000/deploy/plugins/index.txt | time=1ms
15:49:32.037 [INFO] [org.sonarqube.gradle.SonarQubeTask] Load plugins index (done) | time=2ms
15:49:32.037 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Load plugins
15:49:32.041 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Load plugins (done) | time=4ms
15:49:32.048 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] API compatibility mode is enabled on plugin C# [csharp] (built with API lower than 5.2)
15:49:32.048 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] API compatibility mode is enabled on plugin Java [java] (built with API lower than 5.2)
15:49:32.048 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] API compatibility mode is enabled on plugin SVN [scmsvn] (built with API lower than 5.2)
15:49:32.048 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] API compatibility mode is enabled on plugin Git [scmgit] (built with API lower than 5.2)
15:49:32.048 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] API compatibility mode is enabled on plugin JavaScript [javascript] (built with API lower than 5.2)
15:49:32.092 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Plugins:
15:49:32.092 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] * C# 4.4 (csharp)
15:49:32.092 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] * Java 3.10 (java)
15:49:32.092 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] * SVN 1.2 (scmsvn)
15:49:32.092 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] * Git 1.0 (scmgit)
15:49:32.092 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] * JavaScript 2.10 (javascript)
15:49:32.099 [INFO] [org.sonarqube.gradle.SonarQubeTask] Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
15:49:32.099 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Work directory: /development/eas/build/sonar
15:49:32.099 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Execution getVersion
15:49:32.099 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Execution execute
15:49:32.237 [INFO] [org.sonarqube.gradle.SonarQubeTask] Process project properties
15:49:32.244 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':sonarqube'
15:49:32.244 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :sonarqube FAILED
15:49:32.244 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :sonarqube (Thread[Daemon worker Thread 22,5,main]) completed. Took 5.151 secs.
15:49:32.244 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[Daemon worker Thread 22,5,main]] finished, busy: 24.352 secs, idle: 0.053 secs
15:49:32.245 [ERROR] [org.gradle.BuildExceptionReporter]
15:49:32.245 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
15:49:32.245 [ERROR] [org.gradle.BuildExceptionReporter]
15:49:32.245 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
15:49:32.245 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':sonarqube'.
Could be a missing or incorrect property if I'm reading this correctly. Is there a better way for me to dump these so I can check em?
OK, figured that out too:
gradle sonarqube -DsonarRunner.dumpToFile=out.properties
Nothing obvious in there though. I see where the project is failing but the value set for the base directory seems correct.
OK here is something really weird. If I run the above, I get:
BUILD SUCCESSFUL
...especially since it was not successful as far as I can tell.
OK I just found these and I've updated the debug level stuff:
property "sonar.verbose", "true"
property "sonar.log.level", "TRACE"
I still don't see anything pertinent there though.
sonarqube {
properties {
property "sonar.exclusions", "src/AbstractData.java,src/preprocessor/*.java,src/Service.java"
}
}
It's Worked for me, Try

How to remove entry from the GWT SDK execution classpath

I am trying to upgrade my application from version 2.6.1 to 2.7 and I am getting follwoing exception executing goal org.codehaus.mojo:gwt-maven-plugin:2.7.0:compile (default) on my project:
[INFO] Compiling module cern.edms.ui.Application
[INFO] [ERROR] Unexpected internal compiler error
[INFO] java.lang.IllegalArgumentException
[INFO] at org.objectweb.asm.ClassVisitor.<init>(Unknown Source)
[INFO] at org.objectweb.asm.ClassVisitor.<init>(Unknown Source)
[INFO] at com.google.gwt.dev.javac.BytecodeSignatureMaker$CompileDependencyVisitor.<init>(BytecodeSignatureMaker.java:59)
[INFO] at com.google.gwt.dev.javac.BytecodeSignatureMaker.visitCompileDependenciesInBytecode(BytecodeSignatureMaker.java:227)
I found information that it could be because of the wrong version of the ASM in my classpath (Strange error during running GWT 2.7 in DevMode), therefore I've check it. And indeed in my classpath there is two version of ASM:4.2 and 5.0.3. It is because one of the dependency has dependency on cglib which has dependency on ASM 4.2. GWT has dependency on ASM 5.0.3.
Here is my full classpath:
[DEBUG] GWT SDK execution classpath :
[DEBUG] C:\dev\Workspace\EDMS-APP\20151015_java7_gwt27\trunk\edms-ui\target\edms-ui-6.1.0-SNAPSHOT\WEB-INF\classes
[DEBUG] C:\dev\Workspace\EDMS-APP\20151015_java7_gwt27\trunk\edms-ui\src\main\java
[DEBUG] C:\dev\Workspace\EDMS-APP\20151015_java7_gwt27\trunk\edms-ui\target\generated-sources\gwt
[DEBUG] C:\dev\Workspace\EDMS-APP\20151015_java7_gwt27\trunk\edms-ui\target\generated-sources\gwt\**
[DEBUG] C:\dev\Workspace\EDMS-APP\20151015_java7_gwt27\trunk\edms-procedures\target\edms-procedures-6.1.0-SNAPSHOT.jar
[DEBUG] C:\Users\kpater\.m2\repository\com\oracle\ojdbc6\11.2.0.3.0\ojdbc6-11.2.0.3.0.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\springframework\spring-context\4.0.9.RELEASE\spring-context-4.0.9.RELEASE.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\springframework\spring-expression\4.0.9.RELEASE\spring-expression-4.0.9.RELEASE.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\springframework\spring-core\4.0.9.RELEASE\spring-core-4.0.9.RELEASE.jar
[DEBUG] C:\Users\kpater\.m2\repository\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\springframework\spring-jdbc\4.0.9.RELEASE\spring-jdbc-4.0.9.RELEASE.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\springframework\spring-tx\4.0.9.RELEASE\spring-tx-4.0.9.RELEASE.jar
[DEBUG] C:\Users\kpater\.m2\repository\com\sun\mail\javax.mail\1.5.4\javax.mail-1.5.4.jar
[DEBUG] C:\Users\kpater\.m2\repository\javax\activation\activation\1.1\activation-1.1.jar
[DEBUG] C:\Users\kpater\.m2\repository\commons-dbcp\commons-dbcp\1.4\commons-dbcp-1.4.jar
[DEBUG] C:\Users\kpater\.m2\repository\commons-pool\commons-pool\1.5.4\commons-pool-1.5.4.jar
[DEBUG] C:\Users\kpater\.m2\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar
[DEBUG] C:\Users\kpater\.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA.jar
[DEBUG] C:\dev\Workspace\EDMS-APP\20151015_java7_gwt27\trunk\edms-shared\target\edms-shared.jar
[DEBUG] C:\dev\Workspace\EDMS-APP\20151015_java7_gwt27\trunk\edms-search\target\edms-search.jar
[DEBUG] C:\Users\kpater\.m2\repository\cglib\cglib\3.1\cglib-3.1.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\ow2\asm\asm\4.2\asm-4.2.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\springframework\ws\spring-ws-core\2.1.4.RELEASE\spring-ws-core-2.1.4.RELEASE.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\springframework\ws\spring-xml\2.1.4.RELEASE\spring-xml-2.1.4.RELEASE.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\springframework\spring-oxm\3.2.4.RELEASE\spring-oxm-3.2.4.RELEASE.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\springframework\spring-webmvc\3.2.4.RELEASE\spring-webmvc-3.2.4.RELEASE.jar
[DEBUG] C:\Users\kpater\.m2\repository\wsdl4j\wsdl4j\1.6.1\wsdl4j-1.6.1.jar
[DEBUG] C:\Users\kpater\.m2\repository\javax\xml\stream\stax-api\1.0-2\stax-api-1.0-2.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\apache\httpcomponents\httpclient\4.3.1\httpclient-4.3.1.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\apache\httpcomponents\httpcore\4.3\httpcore-4.3.jar
[DEBUG] C:\Users\kpater\.m2\repository\commons-codec\commons-codec\1.6\commons-codec-1.6.jar
[DEBUG] C:\Users\kpater\.m2\repository\commons-io\commons-io\1.4\commons-io-1.4.jar
[DEBUG] C:\Users\kpater\.m2\repository\weblogic\wls-api\12.1.1\wls-api-12.1.1.jar
[DEBUG] C:\Users\kpater\.m2\repository\ch\cern\sso\wlsAttributeNameMapper\1.9\wlsAttributeNameMapper-1.9.jar
[DEBUG] C:\Users\kpater\.m2\repository\com\google\gwt\gwt-user\2.7.0\gwt-user-2.7.0.jar
[DEBUG] C:\Users\kpater\.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA-sources.jar
[DEBUG] C:\Users\kpater\.m2\repository\com\google\web\bindery\requestfactory-server\2.7.0\requestfactory-server-2.7.0.jar
[DEBUG] C:\Users\kpater\.m2\repository\com\extjs\gxt\2.3.1a-gwt22\gxt-2.3.1a-gwt22.jar
[DEBUG] C:\Users\kpater\.m2\repository\com\sencha\gxt\gxt\3.1.4\gxt-3.1.4.jar
[DEBUG] C:\Users\kpater\.m2\repository\com\googlecode\mvp4g\mvp4g\1.4.0\mvp4g-1.4.0.jar
[DEBUG] C:\Users\kpater\.m2\repository\com\google\gwt\inject\gin\1.5.0\gin-1.5.0.jar
[DEBUG] C:\Users\kpater\.m2\repository\com\google\inject\guice\3.0-rc2\guice-3.0-rc2.jar
[DEBUG] C:\Users\kpater\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar
[DEBUG] C:\Users\kpater\.m2\repository\com\google\inject\extensions\guice-assistedinject\3.0-rc2\guice-assistedinject-3.0-rc2.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\springframework\spring-web\4.0.9.RELEASE\spring-web-4.0.9.RELEASE.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\springframework\spring-beans\4.0.9.RELEASE\spring-beans-4.0.9.RELEASE.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\springframework\spring-aop\4.0.9.RELEASE\spring-aop-4.0.9.RELEASE.jar
[DEBUG] C:\Users\kpater\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\aspectj\aspectjrt\1.8.2\aspectjrt-1.8.2.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\aspectj\aspectjweaver\1.8.2\aspectjweaver-1.8.2.jar
[DEBUG] C:\Users\kpater\.m2\repository\javax\persistence\persistence-api\1.0\persistence-api-1.0.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\springframework\spring-aspects\4.0.9.RELEASE\spring-aspects-4.0.9.RELEASE.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\hibernate\hibernate-validator\4.1.0.Final\hibernate-validator-4.1.0.Final.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\hibernate\hibernate-validator\4.1.0.Final\hibernate-validator-4.1.0.Final-sources.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\slf4j\slf4j-log4j12\1.6.1\slf4j-log4j12-1.6.1.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\slf4j\slf4j-api\1.6.1\slf4j-api-1.6.1.jar
[DEBUG] C:\Users\kpater\.m2\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar
[DEBUG] C:\Users\kpater\.m2\repository\com\google\guava\guava\14.0.1\guava-14.0.1.jar
[DEBUG] C:\Users\kpater\.m2\repository\com\google\gwt\gwtmockito\gwtmockito\1.1.5\gwtmockito-1.1.5.jar
[DEBUG] C:\Users\kpater\.m2\repository\com\google\gwt\gwt-dev\2.7.0\gwt-dev-2.7.0.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\ow2\asm\asm-util\5.0.3\asm-util-5.0.3.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\ow2\asm\asm-tree\5.0.3\asm-tree-5.0.3.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\ow2\asm\asm-commons\5.0.3\asm-commons-5.0.3.jar
[DEBUG] C:\Users\kpater\.m2\repository\org\javassist\javassist\3.17.1-GA\javassist-3.17.1-GA.jar
How can I exclude ASM in version 4.2 from the classpath?
Thank you for your help!
Ideally you'd just split your project into separate modules for client and server code so you avoid classpath conflicts like this one. You can draw inspiration from those archetypes: https://github.com/tbroyer/gwt-maven-archetypes
However, given that ASM 4+ guarantees backward compatibility, you could also just use ASM 5 instead of ASM 4:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-parent</artifactId>
<version>5.0.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
I've finally managed to build the project by excluding the ASM in cglib dependency. Here is my code:
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>3.1</version>
<exclusions>
<exclusion>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
</exclusions>
</dependency>
Assuming gwt-maven-plugin documentation, you can set the runClasspathExclude property to exclude jars from the classPath when running dev mode (and only in DEV mode) :
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<configuration>
<runClasspathExcludes>
<runClasspathExclude>jetty-webapp-9.2.4.v20141103.jar</runClasspathExclude>
<runClasspathExclude>jetty-xml-9.2.4.v20141103.jar</runClasspathExclude>
<runClasspathExclude>jetty-util-9.2.4.v20141103.jar</runClasspathExclude>
<runClasspathExclude>jetty-servlet-9.2.4.v20141103.jar</runClasspathExclude>
<runClasspathExclude>jetty-security-9.2.4.v20141103.jar</runClasspathExclude>
</runClasspathExcludes>
</configuration>
</plugin>
Note that this configuration is used by the "run" goal only : mvn gwt:run

Error in `mvn jgitflow:release-finish` mutli-module build (due to wrong compilation order)

I'm trying to use JGitflow to create a release for my project. Unfortunately, when I run mvn jgitflow:release-finish, I get the following error:
Unable to find resource 'org.jorlib:jorlib-core:jar:1.0' in repository central (http://repo1.maven.org/maven2)
[WARNING] The dependency: org.jorlib:jorlib-core:jar:1.0 can't be resolved but has been found in the reactor.
I'm not sure how to resolve this. First I ran: mvn jgitflow:release-start which reported "Build Successfull". The result looks correct:
jkinable#daedalus:~/workspace/javaIDEA/jORLib/jorlib$ git branch -avv
development 07e4c1f [origin/development: ahead 3] updating poms for 1.1-SNAPSHOT development
master f3240f9 [origin/master] Updated pom.xml
*release/1.0 f3240f9 Updated pom.xml
Next I ran mvn jgitflow:release-finish which fails. It seems that it tries to download jorlib-core-1.0.jar but that is the file it is supposed to compile. Digging deeper into this, I ran mvn jgitflow:release-finish -e -X > ~/mygitflow.log
Here is part of the result:
[INFO] Building JORLib - Parent
[INFO] task-segment: [jgitflow:release-finish] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[DEBUG] org.jorlib:jorlib:pom:1.0-SNAPSHOT (selected for null)
[DEBUG] org.jorlib:jorlib-core:jar:1.0-SNAPSHOT (selected for null)
[DEBUG] junit:junit:jar:4.12:test (selected for test)
[DEBUG] Retrieving parent-POM: org.hamcrest:hamcrest-parent:pom:1.3 for project: null:hamcrest-core:jar:null from the repository.
[DEBUG] org.hamcrest:hamcrest-core:jar:1.3:test (selected for test)
[DEBUG] Retrieving parent-POM: org.jgrapht:jgrapht:pom:0.9.0 for project: null:jgrapht-core:jar:null from the repository.
[DEBUG] Adding managed dependencies for unknown:jgrapht-core
[DEBUG] org.jgrapht:jgrapht-core:jar:0.9.0
[DEBUG] org.jgrapht:jgrapht-ext:jar:0.9.0
[DEBUG] org.jgrapht:jgrapht-demo:jar:0.9.0
[DEBUG] xmlunit:xmlunit:jar:1.3:test
[DEBUG] junit:junit:jar:4.10:test
[DEBUG] org.jgrapht:jgrapht-core:jar:0.9.0:compile (selected for compile)
[DEBUG] Retrieving parent-POM: com.google.guava:guava-parent:pom:14.0.1 for project: null:guava:bundle:null from the repository.
[DEBUG] com.google.guava:guava:jar:14.0.1:compile (selected for compile)
[DEBUG] Retrieving parent-POM: ch.qos.logback:logback-parent:pom:0.9.28 for project: null:logback-classic:jar:null from the repository.
[DEBUG] Adding managed dependencies for unknown:logback-classic
[DEBUG] ch.qos.logback:logback-core:jar:0.9.28
[DEBUG] ch.qos.logback:logback-core:test-jar:tests:0.9.28
[DEBUG] ch.qos.logback:logback-classic:jar:0.9.28
[DEBUG] ch.qos.logback:logback-access:jar:0.9.28
[DEBUG] org.slf4j:slf4j-api:jar:1.6.1
[DEBUG] janino:janino:jar:2.5.10
[DEBUG] org.codehaus.groovy:groovy-all:jar:1.7.2
[DEBUG] javax.mail:mail:jar:1.4
[DEBUG] dom4j:dom4j:jar:1.6.1
[DEBUG] hsqldb:hsqldb:jar:1.8.0.7
[DEBUG] com.h2database:h2:jar:1.2.132
[DEBUG] postgresql:postgresql:jar:8.4-701.jdbc4
[DEBUG] mysql:mysql-connector-java:jar:5.1.9
[DEBUG] org.apache.tomcat:catalina:jar:6.0.20
[DEBUG] org.mortbay.jetty:jetty:jar:6.1.1
[DEBUG] org.eclipse.jetty:jetty-server:jar:7.0.1.v20091125
[DEBUG] org.mortbay.jetty:servlet-api-2.5:jar:6.1.1
[DEBUG] org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.0
[DEBUG] javax.servlet:servlet-api:jar:2.5
[DEBUG] org.scala-lang:scala-library:jar:2.7.7
[DEBUG] ch.qos.logback:logback-classic:jar:0.9.28:compile (selected for compile)
[DEBUG] Adding managed dependencies for unknown:logback-core
[DEBUG] ch.qos.logback:logback-core:jar:0.9.28
[DEBUG] ch.qos.logback:logback-core:test-jar:tests:0.9.28
[DEBUG] ch.qos.logback:logback-classic:jar:0.9.28
[DEBUG] ch.qos.logback:logback-access:jar:0.9.28
[DEBUG] org.slf4j:slf4j-api:jar:1.6.1
[DEBUG] janino:janino:jar:2.5.10
[DEBUG] org.codehaus.groovy:groovy-all:jar:1.7.2
[DEBUG] javax.mail:mail:jar:1.4
[DEBUG] dom4j:dom4j:jar:1.6.1
[DEBUG] hsqldb:hsqldb:jar:1.8.0.7
[DEBUG] com.h2database:h2:jar:1.2.132
[DEBUG] postgresql:postgresql:jar:8.4-701.jdbc4
[DEBUG] mysql:mysql-connector-java:jar:5.1.9
[DEBUG] org.apache.tomcat:catalina:jar:6.0.20
[DEBUG] org.mortbay.jetty:jetty:jar:6.1.1
[DEBUG] org.eclipse.jetty:jetty-server:jar:7.0.1.v20091125
[DEBUG] org.mortbay.jetty:servlet-api-2.5:jar:6.1.1
[DEBUG] org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.0
[DEBUG] javax.servlet:servlet-api:jar:2.5
[DEBUG] org.scala-lang:scala-library:jar:2.7.7
[DEBUG] ch.qos.logback:logback-core:jar:0.9.28:compile (selected for compile)
[DEBUG] Retrieving parent-POM: org.slf4j:slf4j-parent:pom:1.6.1 for project: org.slf4j:slf4j-api:jar:null from the repository.
[DEBUG] Adding managed dependencies for org.slf4j:slf4j-api
[DEBUG] org.slf4j:slf4j-api:jar:1.6.1
[DEBUG] org.slf4j:slf4j-jdk14:jar:1.6.1
[DEBUG] log4j:log4j:jar:1.2.16
[DEBUG] ch.qos.cal10n:cal10n-api:jar:0.7.4
[DEBUG] org.slf4j:slf4j-api:jar:1.6.1:compile (selected for compile)
[DEBUG] ch.qos.logback:logback-core:jar:0.9.28:compile (selected for compile)
[DEBUG] org.slf4j:slf4j-api:jar:1.6.1:compile (selected for compile)
[DEBUG] WARNING: A dependency of the current project (or of one the plugins used in its build) was found in the reactor,
but had not been built at the time it was requested. It will be resolved from the repository instead.
Current Project: JORLib - Demo
Requested Dependency: org.jorlib:jorlib-core:jar:1.0-SNAPSHOT
NOTE: You may need to run this build to the 'compile' lifecycle phase, or farther, in order to build the dependency artifact.
The module jorlib-demo depends on jorlib-core, so it must first compile jorlib-core before it compiles jorlib-demo. For some reason this doesn't happen. As a result, it searches for jorlib-core in some external depository and fails eventually because it couldn't find it.
My parent pom: parent pom
The pom in jorlib-core: pom jorlib-core
The pom in jorlib-demo: pom jorlib-demo
It turns out that this problem is caused by my Maven version. My system runs Java 1.8.0_45 and Apache Maven 2.2.1 (rdebian-8). At the time of writing, the latter Maven version is shipped by default with the latest Ubuntu LTS (14.04.2) release. I have now upgraded to Apache Maven 3.2.1. After upgrading to Maven 3, I did run into the following error message while executing jgitflow:release-finish:
Error: JAVA_HOME is not defined correctly.
We cannot execute /usr/lib/jvm/java-8-oracle/bin/java/bin/java
This effectively prohibited the code from being compiled. Notice the weird bin/java/bin/java part. I double checked my $JAVA_HOME which correctly pointed to /usr/lib/jvm/java-8-oracle/. A solution to this issue can be found here: Having JAVA_HOME inconsistency issue with maven
I simply created a file called .mavenrc in my home folder which contained: export JAVA_HOME=/usr/lib/jvm/java-8-oracle
Now the Jgitflow plugin is working well.

Why is my WAR file not showing up on JBoss using the jboss-maven-plugin?

I'm running a JBoss 4.2.3.GA app server (can't change this sadly) and building a WAR project with Maven 3.0.3. I'm trying to deploy my WAR file to the remote JBoss server using the jboss-maven-plugin. Although Maven doesn't report any errors when I execute my build, the WAR file never shows up in my $JBOSS_HOME/server/default/deploy directory. Here's the configuration I'm using in my pom.xml file …
<!-- Deploy app to remote JBoss instance -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jboss-maven-plugin</artifactId>
<version>1.5.0</version>
<configuration>
<serverId>default</serverId>
<hostName>localhost</hostName>
<port>8080</port>
<fileNames>
<fileName>${project.basedir}/target/${project.artifactId}-${project.version}.war</fileName>
</fileNames>
</configuration>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
In my ~/.m2/settings.xml file, I have
<servers>
<server>
<id>default</id>
<username>admin</username>
<password>admin</password>
</server>
</servers>
where the username and password are the un/pw defined for accessing my jmx-console. Below is the output from Maven. Notice no errors are reported. WHat else should I check to figure out why my WAR isn't getting deployed?
[INFO] --- jboss-maven-plugin:1.5.0:deploy (default) # myclient ---
[DEBUG] org.codehaus.mojo:jboss-maven-plugin:jar:1.5.0:
[DEBUG] org.apache.maven:maven-plugin-api:jar:2.0.11:compile
[DEBUG] org.apache.maven:maven-artifact-manager:jar:2.0.11:compile
[DEBUG] org.apache.maven:maven-repository-metadata:jar:2.0.11:compile
[DEBUG] org.apache.maven:maven-artifact:jar:2.0.11:compile
[DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
[DEBUG] junit:junit:jar:3.8.2:test (scope managed from compile) (version managed from 3.8.1)
[DEBUG] classworlds:classworlds:jar:1.1-alpha-2:compile
[DEBUG] org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2:compile
[DEBUG] commons-codec:commons-codec:jar:1.3:compile
[DEBUG] jboss:jboss-jmx:jar:4.0.2:compile
[DEBUG] jboss:jnp-client:jar:4.0.2:compile
[DEBUG] jboss:jboss-common:jar:4.0.2:compile
[DEBUG] slide:webdavlib:jar:2.0:compile
[DEBUG] xerces:xercesImpl:jar:2.6.2:compile
[DEBUG] jboss:jbosssx-client:jar:3.2.3:compile
[DEBUG] velocity:velocity:jar:1.4:compile
[DEBUG] velocity:velocity-dep:jar:1.4:runtime
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.5.15:compile
[DEBUG] Created new class realm plugin>org.codehaus.mojo:jboss-maven-plugin:1.5.0
[DEBUG] Importing foreign packages into class realm plugin>org.codehaus.mojo:jboss-maven-plugin:1.5.0
[DEBUG] Imported: < maven.api
[DEBUG] Populating class realm plugin>org.codehaus.mojo:jboss-maven-plugin:1.5.0
[DEBUG] Included: org.codehaus.mojo:jboss-maven-plugin:jar:1.5.0
[DEBUG] Included: commons-codec:commons-codec:jar:1.3
[DEBUG] Included: jboss:jboss-jmx:jar:4.0.2
[DEBUG] Included: jboss:jnp-client:jar:4.0.2
[DEBUG] Included: jboss:jboss-common:jar:4.0.2
[DEBUG] Included: slide:webdavlib:jar:2.0
[DEBUG] Included: xerces:xercesImpl:jar:2.6.2
[DEBUG] Included: jboss:jbosssx-client:jar:3.2.3
[DEBUG] Included: velocity:velocity:jar:1.4
[DEBUG] Included: velocity:velocity-dep:jar:1.4
[DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:1.5.15
[DEBUG] Excluded: org.apache.maven:maven-plugin-api:jar:2.0.11
[DEBUG] Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.11
[DEBUG] Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.11
[DEBUG] Excluded: org.apache.maven:maven-artifact:jar:2.0.11
[DEBUG] Excluded: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1
[DEBUG] Excluded: junit:junit:jar:3.8.2
[DEBUG] Excluded: classworlds:classworlds:jar:1.1-alpha-2
[DEBUG] Excluded: org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2
[DEBUG] Configuring mojo org.codehaus.mojo:jboss-maven-plugin:1.5.0:deploy from plugin realm ClassRealm[plugin>org.codehaus.mojo:jboss-maven-plugin:1.5.0, parent: sun.misc.Launcher$AppClassLoader#20cf2c80]
[DEBUG] Configuring mojo 'org.codehaus.mojo:jboss-maven-plugin:1.5.0:deploy' with basic configurator -->
[DEBUG] (f) fileNameEncoding = UTF-8
[DEBUG] (f) fileNames = [/Users/davea/Dropbox/workspace/myclient/target/myclient-1.0-SNAPSHOT.war]
[DEBUG] (f) hostName = localhost
[DEBUG] (f) port = 8080
[DEBUG] (f) serverId = default
[DEBUG] (f) skip = false
[DEBUG] -- end configuration --
[INFO] Deploying /Users/davea/Dropbox/workspace/myclient/target/myclient-1.0-SNAPSHOT.war to JBoss.
[DEBUG] url = http://localhost:8080/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service %3DMainDeployer&methodName=deploy&argType=java.net.URL&arg0=%2FUsers%2Fdavea%2FDropbox%2Fworkspace%2Fmyclient%2Ftarget%2Fmyclient-1.0-SNAPSHOT.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
Here is my jboss-maven-plugin configuration. With this configuration I am able to deploy my war application without problems. Take a look at the fileName path.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jboss-maven-plugin</artifactId>
<version>1.5.0</version>
<!-- JMX credentials defined in ~/.m2/settings.xml -->
<configuration>
<hostName>10.0.16.14</hostName> <!-- either an IP address or localhost -->
<port>8280</port>
<serverId>jboss-dev</serverId>
<fileNames>
<fileName>../server/default/deploy/myApp.war</fileName>
</fileNames>
</configuration>
</plugin>
My ~/.m2/settings.xml server is like:
<servers>
<server>
<id>jboss-dev</id>
<username>admin</username>
<password>admin</password>
</server>
</servers>

Resources