Open cereala opened 6 years ago
I just had the same issue :(
If you came here becasue of the same reason, it seems like something has changed in the TypeScript and it's not backward compatible. To use specific version of TypeScript open ghyston-jira-example-dashboard-item/src/main/resources/package.json
and change
"typescript": "^2.1.5"
to
"typescript": "2.1.5"
Now remove node_modules
folder and start from step 2 (Open src/main/resources and run
) again.
Hello community. I am trying to create a JIRA plugin using the tutorial from here which uses eirslett/frontend-maven-plugin. I followed the steps from the tutorial which are very basic:
-cloned the project -installed NODEJS : { npm: '5.6.0', ares: '1.10.1-DEV', cldr: '32.0', http_parser: '2.8.0', icu: '60.1', modules: '57', napi: '3', nghttp2: '1.32.0', node: '8.11.3', openssl: '1.0.2o', tz: '2017c', unicode: '10.0', uv: '1.19.1', v8: '6.2.414.54', zlib: '1.2.11' }
installed Atlassian SDK: _ATLAS Version: 6.3.10 ATLAS Home: C:\Applications\Atlassian\atlassian-plugin-sdk-6.3.10 ATLAS Scripts: C:\Applications\Atlassian\atlassian-plugin-sdk-6.3.10\bin ATLAS Maven Home: C:\Applications\Atlassian\atlassian-plugin-sdk-6.3.10\apache-maven-3.2.1 AMPS Version: 6.3.15
Executing: "C:\Applications\Atlassian\atlassian-plugin-sdk-6.3.10\apache-maven-3.2.1\bin\mvn.bat" --version -gs C:\Applications\Atlassian\atlassian-plugin-sdk-6.3.10\apache-maven-3.2.1/conf/settings.xml Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0 Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T19:37:52+02:00) Maven home: C:\Applications\Atlassian\atlassian-plugin-sdk-6.3.10\apache-maven-3.2.1 Java version: 1.8.0_111, vendor: Oracle Corporation Java home: C:\Program Files\Java\jdk1.8.0_111\jre Default locale: enUS, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"
I get a build error when trying to run the project using command "atlas-mvn package" :
[INFO] --- frontend-maven-plugin:1.3:grunt (grunt build) @ example-dashboard-item --- [INFO] Running 'grunt ' in C:\workspace\jira-example-dashboard-item\src\main\resources [INFO] Running "karma:continuous" (karma) task [INFO] �[32m15 06 2018 14:04:17.852:INFO [compiler.karma-typescript]: �[39mCompiling project using Typescript 2.9.2 [INFO] �[32m15 06 2018 14:04:19.872:INFO [compiler.karma-typescript]: �[39mCompiled 16 files in 1489 ms. [INFO] Fatal error: ts.isDeclarationFile is not a function [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7.989 s [INFO] Finished at: 2018-06-15T14:04:19+02:00 [INFO] Final Memory: 18M/309M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:grunt (grunt build) on project example-dashboard-item: Failed to run task: 'grunt ' failed. (error code 3) -> [Help 1]
---- This is my pom.xml
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.softwire.jira</groupId> <artifactId>example-dashboard-item</artifactId> <version>1.0.0-SNAPSHOT</version> <organization> <name>Softwire</name> <url>http://www.softwire.com/</url> </organization> <name>example-dashboard-item</name> <description>Example of a dashboard item, displays a message on your dashboard.</description> <packaging>atlassian-plugin</packaging> <dependencies> <dependency> <groupId>com.atlassian.jira</groupId> <artifactId>jira-api</artifactId> <version>${jira.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.10</version> <scope>test</scope> </dependency> <dependency> <groupId>com.atlassian.plugin</groupId> <artifactId>atlassian-spring-scanner-annotation</artifactId> <version>${atlassian.spring.scanner.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.atlassian.plugin</groupId> <artifactId>atlassian-spring-scanner-runtime</artifactId> <version>${atlassian.spring.scanner.version}</version> <scope>runtime</scope> </dependency> <dependency> <groupId>javax.inject</groupId> <artifactId>javax.inject</artifactId> <version>1</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.atlassian.sal</groupId> <artifactId>sal-api</artifactId> <version>3.0.7</version> <scope>provided</scope> <!-- Uses the application's SAL instead of bundling it into the plugin. --> </dependency> <!-- WIRED TEST RUNNER DEPENDENCIES --> <dependency> <groupId>com.atlassian.plugins</groupId> <artifactId>atlassian-plugins-osgi-testrunner</artifactId> <version>${plugin.testrunner.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>javax.ws.rs</groupId> <artifactId>jsr311-api</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.2.2-atlassian-1</version> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-all</artifactId> <version>1.8.5</version> <scope>test</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.4</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> <version>2.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.atlassian.plugins.rest</groupId> <artifactId>atlassian-rest-common</artifactId> <version>1.0.2</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.wink</groupId> <artifactId>wink-client</artifactId> <version>1.1.3-incubating</version> <scope>test</scope> </dependency> </dependencies> <build> <resources> <resource> <directory>src/main/resources</directory> <excludes> <exclude>gruntfile.js</exclude> <exclude>karma.conf.js</exclude> <exclude>node_modules/**</exclude> <exclude>typings/**</exclude> <exclude>typescript/**</exclude> </excludes> </resource> </resources> <plugins> <plugin> <groupId>com.atlassian.maven.plugins</groupId> <artifactId>maven-jira-plugin</artifactId> <version>${amps.version}</version> <extensions>true</extensions> <configuration> <productVersion>${jira.version}</productVersion> <productDataVersion>${jira.version}</productDataVersion> <!-- Uncomment to install TestKit backdoor in JIRA. --> <!-- <pluginArtifacts> <pluginArtifact> <groupId>com.atlassian.jira.tests</groupId> <artifactId>jira-testkit-plugin</artifactId> <version>${testkit.version}</version> </pluginArtifact> </pluginArtifacts> --> <enableQuickReload>true</enableQuickReload> <enableFastdev>false</enableFastdev> <!-- See here for an explanation of default instructions: --> <!-- https://developer.atlassian.com/docs/advanced-topics/configuration-of-instructions-in-atlassian-plugins --> <instructions> <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key> <!-- Add package to export here --> <Export-Package>com.softwire.jira.example.rest,</Export-Package> <!-- Add package import here --> <Import-Package>org.springframework.osgi.*;resolution:="optional", org.eclipse.gemini.blueprint.*;resolution:="optional", *</Import-Package> <!-- Ensure plugin is spring powered --> <Spring-Context>*</Spring-Context> </instructions> </configuration> </plugin> <plugin> <groupId>com.atlassian.plugin</groupId> <artifactId>atlassian-spring-scanner-maven-plugin</artifactId> <version>${atlassian.spring.scanner.version}</version> <executions> <execution> <goals> <goal>atlassian-spring-scanner</goal> </goals> <phase>process-classes</phase> </execution> </executions> <configuration> <scannedDependencies> <dependency> <groupId>com.atlassian.plugin</groupId> <artifactId>atlassian-spring-scanner-external-jar</artifactId> </dependency> </scannedDependencies> <verbose>false</verbose> </configuration> </plugin> <plugin> <groupId>com.github.eirslett</groupId> <artifactId>frontend-maven-plugin</artifactId> <version>1.3</version> <configuration> <nodeVersion>v6.9.4</nodeVersion> <workingDirectory>src/main/resources</workingDirectory> <installDirectory>target</installDirectory> </configuration> <executions> <execution> <id>install node and npm</id> <goals> <goal>install-node-and-npm</goal> </goals> </execution> <execution> <id>npm install</id> <goals> <goal>npm</goal> </goals> </execution> <execution> <id>grunt build</id> <goals> <goal>grunt</goal> </goals> </execution> </executions> </plugin> </plugins> </build> <properties> <jira.version>7.2.2</jira.version> <amps.version>6.2.11</amps.version> <plugin.testrunner.version>1.2.3</plugin.testrunner.version> <atlassian.spring.scanner.version>1.2.13</atlassian.spring.scanner.version> <!-- This key is used to keep the consistency between the key in atlassian-plugin.xml and the key to generate bundle. --> <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key> <!-- TestKit version 6.x for JIRA 6.x --> <testkit.version>6.3.11</testkit.version> </properties> </project>
Any thoughts are much appreciated. Thanks, Sergiu Bodea