When I make changes in resource files like javascript files, I have to:
atlas-mvn package -DskipTests
then I have to clear browser cache (and login again) in order to see changes on some page which changed javascript relates to.
Please note in my pom.xml that I've added resource directories in JVM arguments:
-Dplugin.resource.directories=/src/main/resources
I've read in couple of answers (here, and here) that using QuickReload does not require to reinstall plugin in order for resource changes to appear/to take effect (just need to reload page).
Please provide sample pom.xml which will enable this resources changes to take effect without reinstalling plugin and clearing browser cache.
Here 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>acme.org</groupId> <artifactId>acme-project</artifactId> <version>1.0-SNAPSHOT</version> <organization> <name>Acme</name> </organization> <name>Acme JIRA plugin</name> <description>Some description.</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>com.atlassian.jira</groupId> <artifactId>jira-core</artifactId> <version>${jira.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> <scope>test</scope> </dependency> <dependency> <groupId>com.atlassian.jira</groupId> <artifactId>jira-tests</artifactId> <version>${jira.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.ws.rs</groupId> <artifactId>jsr311-api</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.4</version> <scope>provided</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>com.atlassian.maven.plugins</groupId> <artifactId>maven-jira-plugin</artifactId> <version>${amps.version}</version> <extensions>true</extensions> <configuration> <jvmArgs>-Xmx2048m -Datlassian.plugins.enable.wait=1000 -Datlassian.mail.senddisabled=false -Datlassian.mail.fetchdisabled=false -Dplugin.resource.directories=/src/main/resources</jvmArgs> <productVersion>${jira.version}</productVersion> <productDataVersion>${jira.version}</productDataVersion> <allowGoogleTracking>false</allowGoogleTracking> <log4jProperties>src/aps/log4j.properties</log4jProperties> <!-- make AMPS faster --> <enableFastdev>false</enableFastdev> <enableDevToolbox>false</enableDevToolbox> <enablePde>false</enablePde> <skipRestDocGeneration>true</skipRestDocGeneration> <skipManifestValidation>true</skipManifestValidation> <extractDependencies>false</extractDependencies> <skipManifestValidation>true</skipManifestValidation> <enableQuickReload>true</enableQuickReload> <pluginArtifact> <groupId>com.atlassian.labs.plugins</groupId> <artifactId>quickreload</artifactId> <version>${quick.reload.version}</version> </pluginArtifact> </configuration> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.17</version> <configuration> <reportsDirectory>${surefire.and.failsafe.report.dir}</reportsDirectory> <properties> <property> <name>junit</name> <value>true</value> </property> </properties> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>2.17</version> <configuration> <reportsDirectory>${surefire.and.failsafe.report.dir}</reportsDirectory> </configuration> </plugin> </plugins> </build> <properties> <jira.version>6.4.13</jira.version> <amps.version>6.2.1</amps.version> <quick.reload.version>1.4.4</quick.reload.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <testkit.version>5.2.26</testkit.version> <surefire.and.failsafe.report.dir>target/surefire-reports</surefire.and.failsafe.report.dir> <log4j.properties.location>src/aps/log4j.properties</log4j.properties.location> <skipITs>true</skipITs> </properties> </project>
Community moderators have prevented the ability to post new answers.
Actually here is how it should be done. I've picked it up from AtlasCamp two days ago.
First of all, there is no QuickReload version 1.4.4 and reason why it worked for me, though not entirely correctly, is that there is QuickReload 1.24.1 version in AMPS already packaged (if you check log).
So, correct version of QuickReload is 1.30.2. Other thing is that <pluginArtifact> should be inside <pluginArtifacts> tag, like this:
<pluginArtifacts> <pluginArtifact> <groupId>com.atlassian.labs.plugins</groupId> <artifactId>quickreload</artifactId> <version>${quick.reload.version}</version> </pluginArtifact> </pluginArtifacts>
Reason why QuickReload 1.24.1 didn't work correctly with resources (js, css, ...) is because it was batching them for faster loading but it didn't take latest changes in files and it cached them. So work around could be to disable cache in your browser.
With QuickReload 1.30.2 it is fixed, so all you need to do after some, let's say js file change is to reload the page in browser and bam it is working!
Hello,
You need to turn on dev mode for JS and CSS reloading. (Just press the B key in the browser)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This may be one of the reasons for package reload not working(In my case above resolved it). I don't understand what Vladminir is writing. Also for the plugin where you ran atlas-run || atlas-debug command. You don't need to explicitly specify the path of resources for that plugin. Specifying path is for external plugins.
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.