Error deploying AIO with SDK 4.3

cancel
Showing results for 
Search instead for 
Did you mean: 
upforsin
Senior Member

Re: Error deploying AIO with SDK 4.3

Jump to solution

Thank you @olanda for the question and @abhinavmishra14  for the awesome answer (I also had the same problem and your solution works). You probably saved me a couple of days of troubleshooting.

I only wonder why such mistakes aren't immediately fixed by the Alfresco staff.

PS. @olanda how did you know it is the ActiveMQ issue?

howkymike
Alfresco Developer
abhinavmishra14
Advanced

Re: Error deploying AIO with SDK 4.3

Jump to solution

Thanks @upforsin , glad to hear that. 

I have opened two PRs in Alfresco-SDK project, waiting for it to be reviewed and merged. 

https://github.com/Alfresco/alfresco-sdk/pull/628

https://github.com/Alfresco/alfresco-sdk/pull/627

 

 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
ecarbenay
Partner

Re: Error deploying AIO with SDK 4.3

Jump to solution

Thank you @abhinavmishra14 for this answer.

I had same problem where activemq-all jar was included in the amp.

You solution works like a charm.

I just had to add

<scope>test</scope>

for the org.apache.activemq dependency in the platform-docker pom.xml.

I'm deploying using amps build for the project, and enterprise version : without this scope the activemq-all jar isn't included in the platform-docker target extensions folder.

Did you noticed this from your side ?

abhinavmishra14
Advanced

Re: Error deploying AIO with SDK 4.3

Jump to solution

@ecarbenay So without adding scope = test, jar is is not getting copied to platform-docker/target/extensions folder ?

It seems to be working for me though. And local docker deployment starts correctly as well. Amp generated doesn't contain the activemq-all in the lib as well.

I have following in platform-docker/pom.xml.

<dependency>
  <groupId>org.apache.activemq</groupId>
  <artifactId>activemq-all</artifactId>
  <version>${activemq.version}</version>
</dependency>

I have enabled maven amp assembly plug-in as well: https://github.com/abhinavmishra14/acs7-sdk43-demo/blob/main/pom.xml#L128

When i do "mvn clean package", i see the activemq-all jar in extensions folder which i expect.

 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
ecarbenay
Partner

Re: Error deploying AIO with SDK 4.3

Jump to solution

Thank you @abhinavmishra14 for your answer.

You're right, I made a mistake in the platform-docker/pom.xml : I added <includeTypes>amp</includeTypes> in the collect-extensions, the result is that no jar are included in extenstions.

So the activemq-all jar was only included if I added scope = test and if I started using build_start_it_supported.

The configuration needs to be following to include the activemq-all jar :

<!-- Collect extensions (JARs or AMPs) declared in this module do be deployed to docker -->
<execution>
<id>collect-extensions</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
<includeScope>runtime</includeScope>
<!-- IMPORTANT: if using amp dependencies only, add <includeTypes>amp</includeTypes> -->
<!--<includeTypes>amp</includeTypes>-->
</configuration>
</execution>

That way everything works as you described it.

Thanks for your workaround, an I expect your PR will be merged to add this to the SDK.

abhinavmishra14
Advanced

Re: Error deploying AIO with SDK 4.3

Jump to solution

Glad to hear that @ecarbenay .Yeah, let's hope the PR gets merged. 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)