Custom package fails to get zipped by mvn

I have an issue where I generated a package with a service and an operation using the nuxeo-cli tool ,but when I build it, I get an error saying

Failed to execute goal org.nuxeo.build:ant-assembly-maven-plugin:2.1.0:build (default-build) on project case-tracker-addons-package: Error occurred while running C:\Users\<snip>\Documents\case-tracker-addons\case-tracker-addons-package\src\main\assemble\assembly.xml@138:56
-> [Help 1]

In the assembly.xml the section it references is :

    <!-- Studio Registries Extraction -->
    <nx:studioExtraction todir="${outdir}/marketplace">
      <fileset dir="${outdir}/marketplace/install/bundles"/>
    </nx:studioExtraction>

If I remove this, the zip file generates, but then does not seem to get automatically registered when I upload into studio.

How can I fix this error?

0 votes

3 answers

185 views

ANSWER



This was fixed in a newer version of the ant build plugin.

Iwas able to get it working by adding the tag

to the plugin declaration in the package pom.xml right below artifactid

0 votes



I had exactly the same problem on Windows. mvn clean package with the same code on Ubuntu worked just fine, Daniel's theory about issues with Windows paths seems to be correct.

0 votes



Hello,

Have you made sure you can correctly connect to connect.nuxeo.com? You can check this post about Token Management: https://doc.nuxeo.com/studio/token-management/

And you can also check how to store the token in your Maven configuration: https://doc.nuxeo.com/studio/maven-integration/#setting-up-the-maven-client

I hope it helps!

0 votes



Rodri, I do not think that is the issue. I have already set up maven as you described. Upon further investigation, I have found this error,

[ERROR] java.lang.IllegalArgumentException: Illegal character in opaque part at index 2: C:\Users\DDeLamare\Documents\ca se-tracker-addons\case-tracker-addons-package\target\marketplace\install\bundles\case-tracker-1-master-20200219.234536-1 -SNAPSHOT.jar [ERROR] -> [Help 1]

Which leads me to believe that the issue is with the nx:studioExtraction plugin not working with Windows paths.

02/20/2020

I ended up removing that section from the assemble.xml and running the package command. This worked, but I had to manually generate the json registry to import it into nuxeo studio.
02/24/2020