Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#1271: enhance Maven Build Configuration
- Loading branch information
1 parent
60a95c2
commit c560074
Showing
18 changed files
with
594 additions
and
645 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
<!-- | ||
Copyright (c) 2013-2022 Sierra Wireless and others. | ||
All rights reserved. This program and the accompanying materials | ||
are made available under the terms of the Eclipse Public License v2.0 | ||
and Eclipse Distribution License v1.0 which accompany this distribution. | ||
The Eclipse Public License is available at | ||
http://www.eclipse.org/legal/epl-v20.html | ||
and the Eclipse Distribution License is available at | ||
http://www.eclipse.org/org/documents/edl-v10.html. | ||
Contributors: | ||
Sierra Wireless - initial API and implementation | ||
--> | ||
<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.eclipse.leshan</groupId> | ||
<artifactId>leshan-build-config</artifactId> | ||
<version>2.0.0-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>demo-build-config</artifactId> | ||
<packaging>pom</packaging> | ||
|
||
<name>leshan - shared demo build config</name> | ||
<description> Shared Maven configuration for all Leshan demos</description> | ||
|
||
<build> | ||
<pluginManagement> | ||
<plugins> | ||
<!-- We don't ensure Semantic versioning for demos --> | ||
<plugin> | ||
<groupId>org.revapi</groupId> | ||
<artifactId>revapi-maven-plugin</artifactId> | ||
<configuration> | ||
<skip>true</skip> | ||
</configuration> | ||
</plugin> | ||
<!-- get revision to be able to display build number in demo --> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>buildnumber-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>create</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<getRevisionOnlyOnce>true</getRevisionOnlyOnce> | ||
</configuration> | ||
</plugin> | ||
<!-- Config to build server and bs server front end demo --> | ||
<plugin> | ||
<groupId>com.github.eirslett</groupId> | ||
<artifactId>frontend-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<?m2e ignore?> | ||
<id>install node and yarn</id> | ||
<goals> | ||
<goal>install-node-and-yarn</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<?m2e ignore?> | ||
<id>yarn install</id> | ||
<goals> | ||
<goal>yarn</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<?m2e ignore?> | ||
<id>yarn build</id> | ||
<goals> | ||
<goal>yarn</goal> | ||
</goals> | ||
<configuration> | ||
<environmentVariables> | ||
<!-- this variable will be used by webapp/vue.config.js --> | ||
<MAVEN_OUTPUT_DIR>${project.build.outputDirectory}/webapp</MAVEN_OUTPUT_DIR> | ||
<!-- this variable is used by the webapp --> | ||
<VUE_APP_COMMIT_ID>${buildNumber}</VUE_APP_COMMIT_ID> | ||
<VUE_APP_VERSION>${project.version}</VUE_APP_VERSION> | ||
</environmentVariables> | ||
<arguments>build</arguments> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<workingDirectory>webapp</workingDirectory> | ||
<nodeVersion>v12.22.5</nodeVersion> | ||
<yarnVersion>v1.22.10</yarnVersion> | ||
<!-- See why we use a mirror : https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/1032 --> | ||
<yarnDownloadRoot>https://sourceforge.net/projects/yarn.mirror/files/</yarnDownloadRoot> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
<!-- | ||
Copyright (c) 2013-2022 Sierra Wireless and others. | ||
All rights reserved. This program and the accompanying materials | ||
are made available under the terms of the Eclipse Public License v2.0 | ||
and Eclipse Distribution License v1.0 which accompany this distribution. | ||
The Eclipse Public License is available at | ||
http://www.eclipse.org/legal/epl-v20.html | ||
and the Eclipse Distribution License is available at | ||
http://www.eclipse.org/org/documents/edl-v10.html. | ||
Contributors: | ||
Sierra Wireless - initial API and implementation | ||
--> | ||
<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.eclipse.leshan</groupId> | ||
<artifactId>leshan-build-config</artifactId> | ||
<version>2.0.0-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>lib-build-config</artifactId> | ||
<packaging>pom</packaging> | ||
|
||
<name>leshan - shared library build config</name> | ||
<description> Shared Maven configuration for all Leshan library modules</description> | ||
|
||
<build> | ||
<plugins> | ||
<!-- Check that we don't use Java API which is not available for android --> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>animal-sniffer-maven-plugin</artifactId> | ||
<configuration> | ||
<signature> | ||
<groupId>net.sf.androidscents.signature</groupId> | ||
<artifactId>android-api-level-19</artifactId> | ||
<version>4.4.2_r4</version> | ||
</signature> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>check</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<!-- Check API respects semantic versioning --> | ||
<plugin> | ||
<groupId>org.revapi</groupId> | ||
<artifactId>revapi-maven-plugin</artifactId> | ||
<configuration> | ||
<oldVersion>1.0.0</oldVersion> | ||
<analysisConfiguration> | ||
<revapi.versions> | ||
<enabled>true</enabled> | ||
<onAllowed> | ||
<criticality>documented</criticality> | ||
</onAllowed> | ||
</revapi.versions> | ||
<revapi.differences> | ||
<ignore>true</ignore> | ||
<differences> | ||
<item> | ||
<regex>true</regex> | ||
<code>java.class.externalClassExposedInAPI</code> | ||
<newArchive>org\.eclipse\.leshan:leshan.*:.*</newArchive> | ||
<justification> | ||
Leshan sub-modules | ||
implement the Leshan API which | ||
makes them expose | ||
Leshan-specific classes usually. | ||
</justification> | ||
</item> | ||
</differences> | ||
</revapi.differences> | ||
<revapi.filter> | ||
<elements> | ||
<exclude> | ||
<item> | ||
<!-- Californium is exclude from | ||
API check as it does not have clear definition of its API and do not really | ||
respect Semantic versioning: https://github.com/eclipse/californium/issues/1159 | ||
https://github.com/eclipse/californium/issues/1166 --> | ||
<matcher>java-package</matcher> | ||
<match>/org\.eclipse\.californium(\..*)?/</match> | ||
</item> | ||
</exclude> | ||
</elements> | ||
</revapi.filter> | ||
</analysisConfiguration> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>check</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<!-- Create OSGI bundle for Leshan libraries --> | ||
<plugin> | ||
<groupId>org.apache.felix</groupId> | ||
<artifactId>maven-bundle-plugin</artifactId> | ||
<extensions>true</extensions> | ||
<configuration> | ||
<instructions> | ||
<_exportcontents>*</_exportcontents> | ||
<Import-Package>*</Import-Package> | ||
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> | ||
</instructions> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
Oops, something went wrong.