I am getting this kind of error when i tried to build apache roller on my windows 7 service pack 1 64 bit.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (gen-db-scripts) on project roller-webapp: An Ant BuildException has occured: Exception thrown by 'generator.parse'. For more information consult the velocity log, or invoke ant with the -debug flag.
[ERROR] around Ant part ...<texen outputFile="README.txt" controlTemplate="control.vm" outputDirectory="F:\roller-trunk\app/target/dbscripts" templatePath="F:\roller-trunk\app/src/main/resources/sql" contextProperties="F:\roller-trunk\app/src/main/resources/sql/dbscripts.properties"/>... # 5:261 in F:\roller-trunk\app\target\antrun\build-main.xml: F:\roller-trunk\app\target\dbscripts\db2\createdb.sql (The system cannot find the path specified)
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (gen-db-scripts) on project roller-webapp: An Ant BuildException has occured: Exception thrown by 'generator.parse'. For more information consult the velocity log, or invoke ant with the -debug flag.
around Ant part ...<texen outputFile="README.txt" controlTemplate="control.vm" outputDirectory="F:\roller-trunk\app/target/dbscripts" templatePath="F:\roller-trunk\app/src/main/resources/sql" contextProperties="F:\roller-trunk\app/src/main/resources/sql/dbscripts.properties"/>... # 5:261 in F:\roller-trunk\app\target\antrun\build-main.xml
i suspect this outputDirectory="F:\roller-trunk\app/target/dbscripts" templatePath="F:\roller-trunk\app/src/main/resources/sql"` is the problem but i have no idea how to fix it. I ran the "mvn clean install" from my command prompt.
I succeeded building Roller source code in current SVN trunk (5.2.0-SNAPSHOT) on Windows 7 box without errors. output of mvn -version is following:
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T20:57:37+09:00)
Maven home: c:\apache-maven-3.3.3
Java version: 1.8.0_45, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_45\jre
Default locale: ja_JP, platform encoding: MS932
OS name: "windows 7", version: "6.1", arch: "x86", family: "dos"
Could you try building with same version of JDK/Maven to the above output?
UPDATE
Now GitHub distribution of Roller can be built without this error. For detail check https://issues.apache.org/jira/browse/ROL-2086
GitHub doesn't store the empty directories that Roller needs to do the build, if this patch were applied (https://github.com/apache/roller/pull/3) the problem would be fixed.
My work-in-progress Github fork of Roller, TightBlog, already has this change in place: https://github.com/gmazza/tightblog. But TightBlog is not ready for regular use.
I believe this error happens because of direct pull from the Github version. At first, I've tried to pull it from Github and I faced the same problem. Later on, I've tried to checkout it directly from the SVN trunk and there's no problem with the building process.
I believe this error has also been described previously at http://comments.gmane.org/gmane.comp.java.roller.devel/5895. It is stated that there might be some problems with the Github version.
Related
I am facing problem while trying to run maven build with JDK6. I am running build inside docker container with JDK6 and Maven.
Do I get it right, that the plugins are not compatibile with JDK6 version and I should use lower version of help plugin? I cannot change JDK version to higher, I ran into this problem while trying to enable bulding project with JDK6, so I want to solve this problem.
error message from Maven:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate (default-cli) on project security-component: Execution default-cli of goal org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate failed: Unable to load the mojo 'evaluate' in the plugin 'org.apache.maven.plugins:maven-help-plugin:3.2.0' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: org/apache/maven/plugins/help/EvaluateMojo : Unsupported major.minor version 51.0
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.apache.maven.plugins:maven-help-plugin:3.2.0
mvn -version output:
Maven home: /usr/share/maven
Java version: 1.6.0_41, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-openjdk-amd64/jre
indeed problem was in too high version of help plugin, I lower it to 2.2 and its fine
adding direct path to selected version of help plugin worked for me:
$MVN_CMD org.apache.maven.plugins:maven-help-plugin:2.2:evaluate
I want to install Apache Gobblin on my MacOS X. For this, I downloaded version 0.14.0 and followed the steps here.
Install Gobblin
The first thing I did was this:
tar -xvf incubator-gobblin-release-0.14.0.tar.gz
and then:
cd Users/xxxx/incubator-gobblin-release-0.14.0
and finally:
./gradlew build
I came across a error like this.
Parallel execution is an incubating feature.
Parallel execution with configuration on demand is an incubating feature.
> Configure project :
Build property: gobblinFlavor=standard
Build property: jdkVersion=1.8
Build property:
sonatypeArtifactRepository=https://oss.sonatype.org/service/local/staging/deploy/maven2/
Build property:
sonatypeArtifactSnapshotRepository=https://oss.sonatype.org/content/repositories/snapshots/
Build property:
nexusArtifactRepository=https://repository.apache.org/service/local/staging/deploy/maven2
Build property:
nexusArtifactSnapshotRepository=https://repository.apache.org/content/repositories/snapshots
Build property: doNotSignArtifacts=false
Build property: avroVersion=1.8.1
Build property: awsVersion=1.11.8
Build property: bytemanVersion=2.2.1
Build property: confluentVersion=2.0.1
Build property: hadoopVersion=2.3.0
Build property: hiveVersion=1.0.1
Build property: kafka08Version=0.8.2.2
Build property: kafka09Version=0.9.0.1
Build property: pegasusVersion=11.0.0
Build property: salesforceVersion=42.0.0
Detected Gradle version major=4 minor=9
FAILURE: Build failed with an exception.
* Where:
Script '/Users/xxxxxx/incubator-gobblin-release-
0.14.0/gradle/scripts/globalDependencies.gradle' line: 44
* What went wrong:
A problem occurred evaluating script.
> Cannot invoke method getURLs() on null object
* Try:
Run with --stacktrace option to get the stack trace. Run with --info
or --debug option to get more log output. Run with --scan to get full
insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it
incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.9/userguide/command_line_interface.html#sec:command_line_warnings
My Java Version:
java 9.0.4
Java(TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)
My Maven Version:
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T22:49:05+03:00)
Maven home: /usr/local/Cellar/maven/3.5.3/libexec
Java version: 9.0.4, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home
Default locale: en_TR, platform encoding: UTF-8
OS name: "mac os x", version: "10.14.1", arch: "x86_64", family: "mac"
If anyone has any information or suggestions, I'm waiting.
Just digged a little into the codes. Are you sure that Java 9 is supported by their build scripts?
Look at the line you have issue with: globalDependencies.gradle:44. See ToolProvider.getSystemToolClassLoader(). Now let's look at its docs for Java 9:
Deprecated. This method is subject to removal in a future version of Java SE. Use the system tool provider or service loader mechanisms to locate system tools as well as user-installed tools.
Returns a class loader that may be used to load system tools, or null if no such special loader is provided.
Implementation Requirements:
This implementation always returns null.
See that? It always returns null!
Things were different in Java 8, though:
Returns the class loader for tools provided with this platform. This does not include user-installed tools. Use the service provider mechanism for locating user installed tools.
So the script is calling getURLs on a null object and obviously throws an NPE. It probably needs to be fixed!
Last week my hard drive broke. Therfore I had to setup my system from scratch.
After donwloading some git projects and installing Java and Maven manually I tried to build my project again. But Maven says "no".
In my project I have some third party dependencies (2 JARs in the same project folder). My first step is to "install" those manually to the local maven repo.
mvn install:install-file -Dfile=lib/myjar.jar -DgroupId=com.my.group.id -DartifactId=MyArtifactId -Dversion=1.1 -Dpackaging=jar
But Maven says "no".
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:3.0.0:
...
[ERROR] No plugin found for prefix 'install' in the current project and in the plugin groups
I searched for a couple of days but I found no solution. In my POV it can not be ralated to network issues like proxy settings. I have full internet access and I checkt with serveral connections. My collegue in the same network has no problems.
mvn -version
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T20:49:05+01:00)
Maven home: C:\Tools\apache-maven-3.5.3\bin\..
Java version: 1.7.0_80, vendor: Oracle Corporation
Java home: C:\Program Files (x86)\Java\jdk1.7.0_80\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"
Thank you for your help :-)
You are using Java 7, which deserves extra attention when connection to Maven Central. About a month ago it can only be accessed via TLSv1.2. See Why am I getting "Received fatal alert: protocol_version" or "peer not authenticated" from Maven Central? for all the details.
I've spent quite some time trying to figure out what I'm doing wrong and hoping someone may be able to help.
My current setup is running Maven 3.3.3 (via homebrew) and Java 1.8. IntelliJ 13 is the IDE of choice.
Running mvn -version results in the following:
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-
22T12:57:37+01:00)
Maven home: /usr/local/Cellar/maven/3.3.3/libexec
Java version: 1.8.0_45, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.10.2", arch: "x86_64", family: "mac"
which I believe means everything is OK, but when I go to my IDE and try to run a Maven project I get this error:
/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java -Dmaven.home=/usr/local/Cellar/maven/3.3.3/libexec -Dclassworlds.conf=/usr/local/Cellar/maven/3.3.3/libexec/bin/m2.conf -Didea.launcher.port=7539 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 13.app/bin" -Dfile.encoding=UTF-8 -classpath "/usr/local/Cellar/maven/3.3.3/libexec/boot/plexus-classworlds-2.5.2.jar:/Applications/IntelliJ IDEA 13.app/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=13.1.3
-Dmaven.multiModuleProjectDirectory system propery is not set. Check $M2_HOME environment variable and mvn script match.
Process finished with exit code 1
My M2_HOME var is set to /usr/local/Cellar/maven/3.3.3/libexec, the same directory where homebrew installed it, and this also matches the IDE settings.
One search lead me to believe it may be something to do with Maven version and the IDE but I'm not convinced. Can someone please shed some light on this please?
Just in case you have that error again go to Settings -> Maven -> Runner and add
-Dmaven.multiModuleProjectDirectory=$M2_HOME
to VM Options.
I had this wired issue while trying to build CAS Overlay Template using Maven. I could resolve it by adding the following environment variable:
MAVEN_OPTS = -Dmaven.multiModuleProjectDirectory
From the original question, the OP has solved their issue through this approach.
I upgraded to IDEA 14, imported settings, created a new Spring project and it worked out of the box.
When running the 'perform tests' command in Roo I get the following error:
createprocess error=2,the system cannot find the file specified.
Now, all the posts on the net suggest that maven should be in PATH. I did that, I rebooted, my maven installation path is in there along with my roo path and java path. I have ROO_HOME set, JAVA_HOME and M2_HOME.
The versions I use are:
Maven: 3.3.1
Roo: 1.3.1.RC1
Java: 1.8.0_45
When I run Maven from the commandline i get this:
X:\...>mvn -v
Apache Maven 3.3.1 (cab6659f9874fa96462afef40fcf6bc033d58c1c; 2015-03-13T21:10:27+01:00)
Maven home: X:\apache-maven-3.3.1
Java version: 1.8.0_45, vendor: Oracle Corporation
Java home: X:\Java\jdk1.8.0_45\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"
Maven seems to be fully functional.
I also can start the roo console from the commandline:
X:\...> roo
1.3.1.RC1 [rev 4877cfb]
Welcome to Spring Roo. For assistance press CTRL+SPACE or type "hint" then hit ENTER.
roo> perform tests
CreateProcess error=2, The system cannot find the file specified
roo>
So my question is, does anybody know if this is a bug? Because I'm under the serious impression that it is. Posts that 'supposedly' solve this problem are 2y or older.
Thanks for the help!
Got the same problem.
Roo is searching for mvn.bat file in the maven's bin directory, but in the version 3.3.1, there is mvn.cmd only.
Try either renaming the mvn.cmd to mvn.bat in your maven bin directory (worked for me), or use older version of maven, for example 3.0.4.
Thanks for the suggestion! Instead of renaming though, if you use a recent version of Windows (10 in my case) you can create a symlink as well. Open admin command prompt > navigate to your maven bin folder > and execute the command:
mklink mvn.bat mvn.cmd
hint: I also do this if I need to swtich between maven versions, pointing my m2_home to a symlink and just switching the symlink when needed to point to the right place.