-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PNPM Experiment #772
Draft
manuelleduc
wants to merge
1
commit into
xwiki:master
Choose a base branch
from
manuelleduc:pnpm-experiment
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
PNPM Experiment #772
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
75 changes: 75 additions & 0 deletions
75
xwiki-commons-tools/xwiki-commons-tool-webjar-node-handlers/pom.xml
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,75 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- | ||
* See the NOTICE file distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this software; if not, write to the Free | ||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
--> | ||
|
||
<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/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.xwiki.commons</groupId> | ||
<artifactId>xwiki-commons-tool-pom</artifactId> | ||
<version>16.1.0-SNAPSHOT</version> | ||
<relativePath>../xwiki-commons-tool-pom</relativePath> | ||
</parent> | ||
<artifactId>xwiki-commons-tool-webjar-node-handlers</artifactId> | ||
<name>XWiki Commons - Tools - WEBJAR Handlers</name> | ||
<packaging>jar</packaging> | ||
<description>XWiki Commons - Tools - WEBJAR Node Handlers (Lifecycle and ArtifactHandler)</description> | ||
<properties> | ||
<xwiki.jacoco.instructionRatio>0.00</xwiki.jacoco.instructionRatio> | ||
</properties> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.maven</groupId> | ||
<artifactId>maven-core</artifactId> | ||
</dependency> | ||
</dependencies> | ||
<profiles> | ||
<!-- Override default check for javadoc JAR since this module doesn't contain any Java file and this doesn't | ||
make the Maven Central Repository check fail (they must check for Java files in the main JAR before deciding | ||
that the Javadoc JAR is missing or not). --> | ||
<profile> | ||
<id>release</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-enforcer-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>enforce-javadoc-exists</id> | ||
<goals> | ||
<goal>enforce</goal> | ||
</goals> | ||
<configuration> | ||
<rules> | ||
<evaluateBeanshell> | ||
<condition>true</condition> | ||
</evaluateBeanshell> | ||
</rules> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
</project> |
118 changes: 118 additions & 0 deletions
118
...xwiki-commons-tool-webjar-node-handlers/src/main/resources/META-INF/plexus/components.xml
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,118 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- | ||
* | ||
* See the NOTICE file distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this software; if not, write to the Free | ||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
* | ||
--> | ||
|
||
<component-set> | ||
<components> | ||
<component> | ||
<role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role> | ||
<role-hint>webjar-node</role-hint> | ||
<implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation> | ||
<configuration> | ||
<phases> | ||
<process-resources> | ||
<mojos> | ||
<mojo> | ||
<goal>com.github.eirslett:frontend-maven-plugin:install-node-and-pnpm</goal> | ||
<configuration> | ||
<nodeVersion>v20.11.0</nodeVersion> | ||
<pnpmVersion>8.15.1</pnpmVersion> | ||
<installDirectory>${basedir}/target</installDirectory> | ||
</configuration> | ||
</mojo> | ||
<mojo> | ||
<goal>com.github.eirslett:frontend-maven-plugin:pnpm</goal> | ||
<configuration> | ||
<arguments>install --frozen-lockfile</arguments> | ||
<workingDirectory>${basedir}/src/main/node</workingDirectory> | ||
<installDirectory>${basedir}/target</installDirectory> | ||
</configuration> | ||
</mojo> | ||
</mojos> | ||
</process-resources> | ||
<compile> | ||
<mojos> | ||
<mojo> | ||
<goal>com.github.eirslett:frontend-maven-plugin:pnpm</goal> | ||
<configuration> | ||
<arguments>exec tsc --noEmit</arguments> | ||
<workingDirectory>${basedir}/src/main/node</workingDirectory> | ||
<installDirectory>${basedir}/target</installDirectory> | ||
</configuration> | ||
</mojo> | ||
<mojo> | ||
<goal>com.github.eirslett:frontend-maven-plugin:pnpm</goal> | ||
<configuration> | ||
<arguments>exec vite build</arguments> | ||
<workingDirectory>${basedir}/src/main/node</workingDirectory> | ||
<installDirectory>${basedir}/target</installDirectory> | ||
</configuration> | ||
</mojo> | ||
</mojos> | ||
</compile> | ||
<process-test-resources>org.apache.maven.plugins:maven-resources-plugin:testResources</process-test-resources> | ||
<test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile> | ||
<package> | ||
<mojos> | ||
<mojo> | ||
<!-- Prepare resources for WebJar packaging. --> | ||
<goal>org.apache.maven.plugins:maven-resources-plugin:copy-resources</goal> | ||
<configuration> | ||
<outputDirectory>${project.build.outputDirectory}/META-INF/resources/webjars/${project.artifactId}/${project.version}</outputDirectory> | ||
<resources> | ||
<resource> | ||
<directory>src/main/node/dist</directory> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</mojo> | ||
<mojo> | ||
<goal>org.apache.maven.plugins:maven-jar-plugin:jar</goal> | ||
<configuration> | ||
<archive> | ||
<!-- Cancel custom MANIFEST file (since it's not generated for "webjar" packaging) --> | ||
<manifestFile combine.self="override" /> | ||
</archive> | ||
</configuration> | ||
</mojo> | ||
</mojos> | ||
</package> | ||
<install>org.apache.maven.plugins:maven-install-plugin:install</install> | ||
<deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy> | ||
</phases> | ||
</configuration> | ||
</component> | ||
<component> | ||
<role>org.apache.maven.artifact.handler.ArtifactHandler</role> | ||
<role-hint>webjar-node</role-hint> | ||
<implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation> | ||
<configuration> | ||
<type>webjar-node</type> | ||
<extension>jar</extension> | ||
<packaging>webjar-node</packaging> | ||
<addedToClasspath>true</addedToClasspath> | ||
<includesDependencies>false</includesDependencies> | ||
</configuration> | ||
</component> | ||
</components> | ||
</component-set> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: It must be possible to skip typescript type checking in case of project without typescript.