Trouble updating the space blueprint contents
Asked by Aaqib Khorasi:

Hello,

I am facing some weird problem in regards to space blueprint. When ever I try to change or add content template in \<space-blueprint\> module, it doesn't work properly/doesn't load up and still shows previous build.

*Temporary fix: The temporary fix, I could find was to change the space blueprint key again and again.*

*Note: While adapting above temp fix, I need to come up with new blueprint keys otherwise, it wont work acordingly and will get previous content matched with given blueprint key.*

Is there any way I could delete up old cache, etc.

Here is how I build new changes:  
I am using editor (IDEA) and using QUICK RELOAD Feature in my POM file.

I run following command in another terminal instance :

*"atlas-mvn package"*

```
<build>
    <plugins>
        <plugin>
            <groupId>com.atlassian.maven.plugins</groupId>
            <artifactId>maven-confluence-plugin</artifactId>
            <version>${amps.version}</version>
            <extensions>true</extensions>
            <configuration>
                <productVersion>${confluence.version}</productVersion>
                <productDataVersion>${confluence.data.version}</productDataVersion>
                <enableQuickReload>true</enableQuickReload>
                <enableFastdev>false</enableFastdev>
            </configuration>
        </plugin>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
    </plugins>
</build>
```

atlassian-plugin.xml:

```
<atlassian-plugin key="${project.groupId}.${project.artifactId}" name="${project.name}" plugins-version="2">
    <plugin-info>
        <description>${project.description}</description>
        <version>${project.version}</version>
        <vendor name="${project.organization.name}" url="${project.organization.url}" />
        <param name="plugin-icon">images/pluginIcon.png</param>
        <param name="plugin-logo">images/pluginLogo.png</param>
    </plugin-info>
    <!-- add our i18n resource -->
    <resource type="i18n" name="i18n" location="spacebp"/>
    <!-- add our web resources -->
    <web-resource key="spacebp-resources" name="spacebp Web Resources">
        <transformation extension="soy">
            <transformer key="soyTransformer">
                <functions>com.atlassian.confluence.plugins.soy:soy-core-functions</functions>
            </transformer>
            <transformation extension="js">
                <transformer key="jsI18n"/>
            </transformation>
        </transformation>
        <resource type="download" name="spacebp.css" location="/css/spacebp.css"/>
        <resource type="download" name="spacebp.js" location="/js/spacebp.js"/>
        <resource type="download" name="dialog-page.js" location="/soy/dialog-page.soy"/>
        <resource type="download" name="images/" location="/images"/>
      <!--  <dependency>com.atlassian.confluence.plugins.confluence-create-content-plugin:space-blueprints</dependency>   <!-- This dependency is not required for confluence 5.4+ -->
        <context>atl.general</context>
        <context>atl.admin</context>
    </web-resource>
    <web-item key='example-space-blueprint-item' i18n-name-key='confluence.blueprints.space.example.name'
              section='system.create.space.dialog/content'>
        <description key='confluence.blueprints.space.example.description'/>
        <param name='blueprintKey' value='blueprint-key091'/>
    </web-item>

    <content-template key="example-space-homepage-template">
        <description key="confluence.blueprints.space.example.homepage.desc"/>
        <resource name="template" type="download" location="/xml/example-space-home.xml"/>
    </content-template>
    <content-template key="pageA-key" i18n-name-key="confluence.blueprints.space.example.A.name">
        <resource name="template" type="download" location="/templates/pageA.xml"/>
        <description key="confluence.blueprints.space.example.A1.desc"/>
    </content-template>
    <content-template key="pageA1-key" i18n-name-key="confluence.blueprints.space.example.A1.name">
        <resource name="template" type="download" location="/templates/pageA1.xml"/>
    </content-template>
    <content-template key="pageB-key" i18n-name-key="confluence.blueprints.space.example.B.name">
        <resource name="template" type="download" location="/templates/pageB.xml"/>
    </content-template>
    <content-template key="pageB1-key" i18n-name-key="confluence.blueprints.space.example.B1.name">
        <resource name="template" type="download" location="/templates/pageB1.xml"/>
    </content-template>

    <space-blueprint key="blueprint-key091" i18n-name-key="confluence.blueprints.space.example.name">
        <content-template ref="example-space-homepage-template">
            <content-template ref="pageA-key">
                <content-template ref="pageA1-key"/>
            </content-template>
            <content-template ref="pageB-key">
                <content-template ref="pageB1-key"/>
            </content-template>
        </content-template>
        <dialog-wizard key="example-space-blueprint-wizard">
            <dialog-page id="exampleSpaceId"
                         template-key="Confluence.SpaceBlueprints.Example.dialogForm"
                         title-key="confluence.blueprints.space.example.dialog.create.title"
                         description-header-key="confluence.blueprints.space.example.dialog.create.heading"
                         description-content-key="confluence.blueprints.space.example.dialog.create.description"
                         last="true"/>
        </dialog-wizard>
    </space-blueprint>
</atlassian-plugin>
```

Let me know if it still need some clarifications.

Regards,

Aaqib


Answers:
author: iamgoingtosneeze
body: Hi - did you ever figure out a good way to do this. I'm having the same issue.

Regards, Laura


Tags: maven

space-blueprint