Hi I am following the Create a HelloWorld plugin project tutorial and encountered a build error. The script was looking for a file (c:\windows\system 32\myPlugin\pom.xml) that doesnt exist. In fact, there is no "myPlugin" directory in the location specified. Help would be appreciated. Here's the output:
C:\Windows\System32>atlas-create-jira-plugin
Executing: "C:\Applications\Atlassian\atlassian-plugin-sdk-6.3.12\apache-maven-3.2.1\bin\mvn.bat" com.atlassian.maven.plugins:maven-jira-plugin:"6.3.21":create -gs C:\Applications\Atlassian\atlassian-plugin-sdk-6.3.12\apache-maven-3.2.1/conf/settings.xml
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-jira-plugin:6.3.21:create (default-cli) @ standalone-pom ---
Dec 07, 2018 1:38:32 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
[INFO] Google Analytics Tracking is enabled to collect AMPS usage statistics.
[INFO] Although no personal information is sent, you may disable tracking by adding <allowGoogleTracking>false</allowGoogleTracking> to the amps plugin configuration in your pom.xml
[INFO] Sending event to Google Analytics: AMPS:jira - Create Plugin
[INFO] using stable product version: 7.12.0
[INFO] using stable data version: 7.12.0
Define value for groupId: : com.atlassian.tutorial
Define value for artifactId: : myPlugin
Define value for version: 1.0.0-SNAPSHOT: : 1.0.0-SNAPSHOT
Define value for package: com.atlassian.tutorial: : com.atlassian.tutorial.myPlugin
Confirm properties configuration:
groupId: com.atlassian.tutorial
artifactId: myPlugin
version: 1.0.0-SNAPSHOT
package: com.atlassian.tutorial.myPlugin
Y: : Y
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] Generating project in Batch mode
[INFO] Archetype repository missing. Using the one from [com.atlassian.maven.archetypes:jira-plugin-archetype:5 -> https://maven.atlassian.com/public] found in catalog internal
[ERROR] org.apache.maven.archetype.exception.ArchetypeGenerationFailure: Error merging velocity templates: C:\Windows\System32\myPlugin\pom.xml (The system cannot find the path specified)
org.apache.maven.archetype.exception.ArchetypeGenerationFailure: org.apache.maven.archetype.exception.ArchetypeGenerationFailure: Error merging velocity templates: C:\Windows\System32\myPlugin\pom.xml (The system cannot find the path specified)
at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.generateArchetype(DefaultFilesetArchetypeGenerator.java:278)
at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.processFileSetArchetype(DefaultArchetypeGenerator.java:213)
at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:128)
at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:286)
at org.apache.maven.archetype.DefaultArchetype.generateProjectFromArchetype(DefaultArchetype.java:69)
at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:184)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojoImpl(MojoExecutor.java:172)
at org.twdata.maven.mojoexecutor.MojoExecutor$ExecutionEnvironmentM3.executeMojo(MojoExecutor.java:476)
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo(MojoExecutor.java:75)
at com.atlassian.maven.plugins.amps.MavenGoals.createPlugin(MavenGoals.java:299)
at com.atlassian.maven.plugins.amps.CreateMojo.doExecute(CreateMojo.java:75)
at com.atlassian.maven.plugins.amps.AbstractProductHandlerMojo.execute(AbstractProductHandlerMojo.java:783)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
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:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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.archetype.exception.ArchetypeGenerationFailure: Error merging velocity templates: C:\Windows\System32\myPlugin\pom.xml (The system cannot find the path specified)
at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.processTemplate(DefaultFilesetArchetypeGenerator.java:877)
at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.processPom(DefaultFilesetArchetypeGenerator.java:748)
at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.processFilesetProject(DefaultFilesetArchetypeGenerator.java:726)
at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.processFilesetModule(DefaultFilesetArchetypeGenerator.java:637)
at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.generateArchetype(DefaultFilesetArchetypeGenerator.java:244)
... 33 more
Caused by: java.io.FileNotFoundException: C:\Windows\System32\myPlugin\pom.xml (The system cannot find the path specified)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.processTemplate(DefaultFilesetArchetypeGenerator.java:869)
... 37 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:13 min
[INFO] Finished at: 2018-12-07T13:40:44-08:00
[INFO] Final Memory: 11M/28M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.atlassian.maven.plugins:maven-jira-plugin:6.3.21:create (default-cli) on project standalone-pom: Unable to execute mojo: org.apache.maven.archetype.exception.ArchetypeGenerationFailure: Error merging velocity templates: C:\Windows\System32\myPlugin\pom.xml (The system cannot find the path specified) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
C:\Windows\System32>
Hello Martin,
Congratulation on starting your journey to create an Atlassian plugin! It looks like you have a solid understand of what your doing and how to get started. Something I did notice from your logs is you are executing your cmd within "C:\Windows\System32" and from this it is attempting to locate your pom.xml file within that path.
ERROR] org.apache.maven.archetype.exception.ArchetypeGenerationFailure: Error merging velocity templates: C:\Windows\System32\myPlugin\pom.xml (The system cannot find the path specified)
With this said, where is your pom.xml file located? From the logs it looks as though you may have it seeded somewhere in: "C:\Applications\Atlassian"
You can attempt to change your directory to the location of where you pom.xml file is located and attempt to run atlas-create-jira-plugin again.
Please let us know if we can be of anymore assistance to get you started!
Regards,
Stephen Sifers
Thank you, Stephen. Just getting back to this. With your help I was able to get through Step 1 of the tutorial (https://developer.atlassian.com/server/framework/atlassian-sdk/create-a-helloworld-plugin-project/). Step 2 involves running the "atlas-run" command from within the "myPlugin" directory, which I did. This time I got a compilation error. Here's the last 30 or so lines of output from the command window:
Downloaded: https://maven.atlassian.com/repository/public/org/codehaus/plexus/plexus-compiler-manager/2.8.4/plexus-compiler-manager-2.8.4.jar (5 KB at 25.8 KB/sec)
Downloaded: https://maven.atlassian.com/repository/public/org/codehaus/plexus/plexus-compiler-javac/2.8.4/plexus-compiler-javac-2.8.4.jar (21 KB at 120.8 KB/sec)
Downloaded: https://maven.atlassian.com/repository/public/com/thoughtworks/qdox/qdox/2.0-M9/qdox-2.0-M9.jar (310 KB at 664.9 KB/sec)
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to C:\Applications\Atlassian\myPlugin\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:54 min
[INFO] Finished at: 2019-01-09T15:13:44-08:00
[INFO] Final Memory: 26M/64M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project myPlugin: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
C:\Applications\Atlassian\myPlugin>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello again Martin,
Great work on progressing forward. The error within your log is the following:
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
This is point to JRE being used instead of the JDK. This is a common step that is overlooked during the SDK setup. Majority of the time, JRE (Java runtime environment) is installed instead of JDK (Java Developer Kit). Please see the following:
Oracle Java SE Development Kit 8 (JDK) or AdoptOpenJDK 8 installed on your system
See the Oracle JDK 8 Downloads page to download Oracle Java SE Development Kit 8 (JDK) or AdoptOpenJDK - Open source, prebuilt OpenJDK binaries for AdoptOpenJDK 8
Source document: Set up the Atlassian Plugin SDK and build a project.
Once you have JDK installed and your system variables assigned to use the JDK path as opposed to the JRE path then this error should go away. A simple method to check your java version is:
Java -version
I hope this helps to progress through the next steps of the tutorial. Please let us know if the error is still present after resolving the above.
Regards,
Stephen Sifers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.