cancel
Showing results for 
Search instead for 
Did you mean: 

installing javascript console for alfresco 5.0

redraccoon
Star Contributor
Star Contributor

Hello

I'm on Alfresco 5.0 SDK 2.1.1 and I downloaded the jsconsole on "https://github.com/share-extras/js-console"

I succeded to install via the "manuel technique" (the one in the bottom of the previous link) and also via "goal method" from this website => https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-lifecycle-aggregato...


For my job i need to also succed in "dependency" method


I did the mvn install and the dependencies in both amp : repo and share

******************************************************************
picture of the org.shareextras repository =>

 <dependency>
            <groupId>org.sharextras</groupId>
            <artifactId>javascript-console-repo</artifactId>
<!–            <version>0.6.0</version>  –>   // my version seem to be 1.0, not 0.6.0
<version>1.0</version>
            <type>amp</type>
</dependency>‍‍‍‍‍‍‍

******************************************************************

I also changed the maven war plugin wich I found in my "effective POM", so I added him in my "pom.xml" only for my pom.xml in repo, my pom.xml in the sare already had a plugin section

********************************************************************

 <build>
   <pluginManagement> //build management helped me to avoid a warning about overinding versions
         <plugins>
      <plugin>
          <artifactId>maven-war-plugin</artifactId>
          <version>2.5</version>
          <dependencies>
            <dependency>
              <groupId>org.alfresco.maven.plugin</groupId>
              <artifactId>alfresco-maven-plugin</artifactId>
              <version>2.1.1</version>
            </dependency>
          </dependencies>
          <configuration>
          <overlay>
   <groupId>org.sharextras</groupId>
   <artifactId>javascript-console-repo</artifactId>
   <type>amp</type>
</overlay>
            <archiveClasses>false</archiveClasses>
            <archive>
              <manifest>
                <addClasspath>true</addClasspath>
              </manifest>
            </archive>
          </configuration>
        </plugin>
        </plugins>
        </pluginManagement>
     </build> ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍


******************************************************************************



I tried a lot of different things, synthax but in dependency method I never succed to just find the module

picture of my logs => http://www.noelshack.com/2015-46-1447167246-2.png

Thanks in advance if you know something

3 REPLIES 3

afaust
Legendary Innovator
Legendary Innovator
Hello,

for the dependency method to work, the JavaScript Console addon needs to be placed in an "Artifact Repository" similar to artifacts.alfresco.com. Unfortunately, there is no publicly available artifact repository that contains the addon at this time, so you can't use this method unless you provide / host such a repository yourself.

Alternatively, you can try using a system scoped dependency. See <a href="https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#System_Depend...">Introduction to dependency mechanism</a> Maven documentation for details.

Regards
Axel

tybion
Champ in-the-making
Champ in-the-making
Maybe I've misunderstood your question - but if you just want to install Javascript Console, you don't need to use the SDK.

I had no problems installing the Javascript Console on Alfresco 5.0.d - the first section in the following post explains what I did ..

http://geofoss.net/2015/10/12/using-javascript-console-to-create-a-folder-rule-script-in-alfresco/

ecarbenay
Star Contributor
Star Contributor
Hello,

a good way to achieve that is to proceed as described in the following stack overflow post, answered by softwareloop : http://stackoverflow.com/questions/28496659/including-third-party-amp-in-main-project-in-alfresco-ma...

It's fully functional with Alfresco 5.

This way can be use to add AMP dependencies (either for repo or share AMP) in a maven project, when your project need AMP produced by other to work with, for instance javascript console, PDF toolkit or custom AMP made by colleagues during previous steps.

To completely answer, your don't need to "compile" those AMP yourself : it's possible to add them to your local repository by using this maven command :
mvn install:install-file -Dfile=[AMP full path and name] -DgroupId=[GROUPID] -DartifactId=[AMP name without version] -Dversion=[AMP_VERSION] -Dpackaging=amp -DlocalRepositoryPath=[local .M2 full path] 


Best regards