Skip to content

Commit

Permalink
NXP-29780: reorganize files
Browse files Browse the repository at this point in the history
  • Loading branch information
troger committed Oct 30, 2020
1 parent b70af6b commit 0f59515
Show file tree
Hide file tree
Showing 27 changed files with 289 additions and 24 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.sh eol=lf
*.bat eol=crlf
33 changes: 33 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# system/backups
*~
*.bak
.DS_Store
*.orig
*.rej

# jenkins x
.stignore
*~gen

# ide
bin
.classpath
.metadata
.project
.settings/
.checkstyle
.mylar
.idea
*.iml
*.ipr
*.iws
*.ids
.pydevproject
.factorypath

# build artifacts
target/
nashorn_code_cache/
chromedriver.log
*.log
*.pyc
42 changes: 42 additions & 0 deletions nuxeo-coldstorage-package/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.nuxeo</groupId>
<artifactId>nuxeo-coldstorage-parent</artifactId>
<version>11.0.0-SNAPSHOT</version>
</parent>

<artifactId>nuxeo-coldstorage-package</artifactId>
<packaging>zip</packaging>
<name>Nuxeo Cold Storage Package</name>

<dependencies>
<dependency>
<groupId>org.nuxeo</groupId>
<artifactId>nuxeo-coldstorage</artifactId>
</dependency>

<dependency>
<groupId>org.nuxeo.ecm.distribution</groupId>
<artifactId>nuxeo-nxr-server</artifactId>
<type>zip</type>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.nuxeo.build</groupId>
<artifactId>ant-assembly-maven-plugin</artifactId>
<configuration>
<buildFiles>
<buildFile>${basedir}/src/main/assemble/assembly.xml</buildFile>
</buildFiles>
</configuration>
</plugin>
</plugins>
</build>

</project>
128 changes: 128 additions & 0 deletions nuxeo-coldstorage-package/src/main/assemble/assembly.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
<project name="assembly" default="build" xmlns:nx="urn:nuxeo-build" xmlns:artifact="urn:nuxeo-artifact">
<taskdef resource="org/nuxeo/build/antlib.xml" uri="urn:nuxeo-build" />
<taskdef resource="org/nuxeo/build/artifact/antlib.xml" uri="urn:nuxeo-artifact" />
<taskdef resource="net/sf/antcontrib/antlib.xml" />

<target name="build" description="Build ${maven.project.name}">
<property name="outdir" value="${maven.project.build.directory}" />
<artifact:nuxeo-expand includeTestScope="true" groupPrefixes="org.nuxeo" />
<artifact:print output="${outdir}/dependency-tree.log" />
<tstamp />

<delete failonerror="false" dir="${outdir}/nxr" />
<mkdir dir="${outdir}/nxr" />
<delete failonerror="false" dir="${outdir}/package" />
<mkdir dir="${outdir}/package" />
<copy todir="${outdir}/package">
<fileset dir="src/main/resources" />
<filterset>
<filter token="VERSION" value="${maven.project.version}" />
</filterset>
</copy>

<!-- Base distribution NXR -->
<copy todir="${outdir}">
<artifact:file key="org.nuxeo.ecm.distribution:nuxeo-nxr-server::zip" />
</copy>

<!-- Nuxeo bundles -->
<copy todir="${outdir}/nxr/bundles" overwrite="true">
<artifact:set>
<includes>
<artifact groupId="org.nuxeo*" />
</includes>
<excludes>
<artifact groupId="org.nuxeo.build*" />
<artifact groupId="org.nuxeo.lib*" />
<artifact groupId="org.nuxeo.packages*" />
<artifact scope="test" />
<artifact scope="provided" />
<artifact type="pom" />
</excludes>
</artifact:set>
</copy>
<!-- Third-party libraries -->
<copy todir="${outdir}/nxr/lib" overwrite="true">
<artifact:set>
<includes>
<artifact groupId="!org.nuxeo*" />
<artifact groupId="org.nuxeo.lib*" />
</includes>
<excludes>
<artifact scope="test" />
<artifact scope="provided" />
<artifact type="pom" />
</excludes>
</artifact:set>
</copy>
<nx:rmdups dir="${outdir}/nxr/lib" />
<zip destfile="${outdir}/nxr-${maven.project.version}.zip" basedir="${outdir}/nxr" />
<!-- Diff against Nuxeo Server -->
<nx:zipdiff file1="${outdir}/nxr-${maven.project.version}.zip"
file2="${outdir}/nuxeo-nxr-server-${nuxeo.platform.version}.zip"
ignoreContent="true"
includesfile="${outdir}/includes"
excludesfile="${outdir}/excludesfile"
patternsetid="${maven.project.artifactId}.versus.server">
</nx:zipdiff>
<unzip src="${outdir}/nxr-${maven.project.version}.zip" dest="${outdir}/package/install">
<patternset refid="${maven.project.artifactId}.versus.server" />
</unzip>

<!-- Generate install.xml content -->
<var name="install.bundles" value="" />
<var name="install.bundles"
value="${line.separator}
&lt;update file=&quot;${package.root}/install/bundles&quot; todir=&quot;${env.bundles}&quot; /&gt;" />

<var name="install.libs" value="" />
<if>
<available file="${outdir}/package/install/lib" />
<then>
<var name="install.libs"
value="${line.separator}
&lt;update file=&quot;${package.root}/install/lib&quot; todir=&quot;${env.lib}&quot; /&gt;" />
</then>
</if>

<var name="install.templates" value=""/>
<if>
<available file="${outdir}/package/install/templates"/>
<then>
<!-- get the list of templates -->
<dirset id="templates.list" dir="${outdir}/package/install/templates" includes="*"/>
<pathconvert pathsep="," property="templates.list" refid="templates.list">
<map from="${outdir}/package/install/templates/" to=""/>
</pathconvert>

<var name="install.templates"
value="${line.separator}
&lt;copy dir=&quot;${package.root}/install/templates&quot; todir=&quot;${env.templates}&quot; overwrite=&quot;true&quot; /&gt;${line.separator}
&lt;config addtemplate=&quot;${templates.list}&quot; /&gt;${line.separator}"/>
</then>
</if>

<copy file="src/main/resources/install.xml" todir="${outdir}/package" overwrite="true">
<filterset>
<filter token="BUNDLES" value="${install.bundles}" />
<filter token="LIBS" value="${install.libs}" />
<filter token="TEMPLATES" value="${install.templates}" />
</filterset>
</copy>

<nx:studioExtraction todir="${outdir}/package">
<fileset dir="${outdir}/package/install/bundles"/>
</nx:studioExtraction>

<zip destfile="${outdir}/${maven.project.artifactId}-${maven.project.version}.zip"
basedir="${outdir}/package" />
<artifact:attach file="${outdir}/${maven.project.artifactId}-${maven.project.version}.zip" type="zip" />

<!-- cleanups -->
<delete dir="${outdir}/package" failonerror="false" />
<delete dir="${outdir}/nxr" failonerror="false" />
<delete file="${outdir}/nuxeo-nxr-server-${nuxeo.platform.version}.zip" failonerror="false" />
<delete file="${outdir}/nxr-${maven.project.version}.zip" failonerror="false" />
</target>

</project>
6 changes: 6 additions & 0 deletions nuxeo-coldstorage-package/src/main/resources/install.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<install>
@BUNDLES@
@LIBS@
@TEMPLATES@
</install>
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.nuxeo.ecm.platform</groupId>
<artifactId>nuxeo-platform-parent</artifactId>
<version>11.4-SNAPSHOT</version>
<groupId>org.nuxeo</groupId>
<artifactId>nuxeo-coldstorage-parent</artifactId>
<version>11.0.0-SNAPSHOT</version>
</parent>

<groupId>org.nuxeo</groupId>
Expand Down
21 changes: 0 additions & 21 deletions packages/nuxeo-coldstorage-package/pom.xml

This file was deleted.

75 changes: 75 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.nuxeo</groupId>
<artifactId>nuxeo-parent</artifactId>
<version>11.4-SNAPSHOT</version>
</parent>

<groupId>org.nuxeo</groupId>
<artifactId>nuxeo-coldstorage-parent</artifactId>
<name>Nuxeo cold storage Parent</name>
<version>11.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<description>Nuxeo cold storage allows the cold storage of document content. This can be needed for archiving,
compliance, etc.
</description>

<modules>
<module>nuxeo-coldstorage</module>
<module>nuxeo-coldstorage-package</module>
</modules>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.nuxeo</groupId>
<artifactId>nuxeo-coldstorage</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.nuxeo</groupId>
<artifactId>nuxeo-coldstorage-package</artifactId>
<version>${project.version}</version>
<type>zip</type>
</dependency>
</dependencies>
</dependencyManagement>

<repositories>
<repository>
<id>public</id>
<url>https://packages.nuxeo.com/repository/maven-public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<updatePolicy>always</updatePolicy>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>public</id>
<url>https://packages.nuxeo.com/repository/maven-public</url>
<name>Nuxeo</name>
<releases>
<enabled>true</enabled>
</releases>
<!-- no need to enable snapshots for plugin repository -->
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>

<scm>
<connection>scm:git:git://github.com/nuxeo/nuxeo-coldstorage.git</connection>
<developerConnection>scm:git:ssh://[email protected]:nuxeo/nuxeo-coldstorage.git</developerConnection>
<url>https://github.com/nuxeo/nuxeo-coldstorage</url>
</scm>

</project>

0 comments on commit 0f59515

Please sign in to comment.