How to make the descriptor file of a connector integrated in build using maven ?

1
0
-1

Hello,

This question can be seen as related to this other question but I think it deserve to live on its own.

Resources given in answers where quite usefull but I had to add by hand a descriptor file to the assembly zip to get the connector accepted by nuxeo studio.

Not adding this file leads to a message which sounds like Import failed, descriptor file not found

Now I want to build a custom connector using maven and I have to cope the same issue.

Any idea on how to make this file being a part of the assembly product ?

Can you please tell me what's missing in my project description to make this file created during the build ? May be this step should be integrated somewhere in the parent POM, should'nt it ?

Just to be shure I'm clear here is the content of the missing descriptor file:

#Thu May 15 18:19:56 CEST 2014
bos.version=6.2.6
type=connector

Thanks, Antoine

1 answer

1
0
-1

Hi me,

If you had searched a little bit more you may have figured out that the assembly task provided by parent pom was already including a property file contained in *-def artifact.

Thus adding an ant task to create this file at compile time to the definition pom do the trick (as the assembly plugin is linked to the package phase and include in the resulting zip any file contained in org.bonita.*-def)

Here is the pom fragment:

     <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.4</version>
        <executions>
          <execution>
            <phase>compile</phase>
            <configuration>
              <tasks>
                <propertyfile file="src/main/resources/descriptor.properties">
                  <entry key="bos.version" value="${bonita.engine.version}"/>
                  <entry key="type" value="connector"/>
                </propertyfile>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
Notifications