Skip to content

Commit

Permalink
Refactor for JDK17 and Tycho 3.0.5
Browse files Browse the repository at this point in the history
Signed-off-by: Guido Spadotto <[email protected]>
  • Loading branch information
guidospadotto-profesia committed Mar 31, 2024
1 parent 5ad83c5 commit f9f15c4
Show file tree
Hide file tree
Showing 136 changed files with 3,744 additions and 4,738 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ target
*.iws
*.ipr
.idea
.DS_Store

299 changes: 179 additions & 120 deletions carbon-p2-plugin/pom.xml
Original file line number Diff line number Diff line change
@@ -1,136 +1,195 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
<!-- Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with this work
for additional information regarding copyright ownership. The ASF licenses this
file to you under
the Apache License, Version 2.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or
agreed to in
writing, software distributed under the License is distributed on an "AS IS"
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations
under the
License. -->
<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">

http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<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">

<parent>
<parent>
<groupId>org.wso2.maven</groupId>
<artifactId>maven-common-tools</artifactId>
<version>5.2.50-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
</parent>

<modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.maven</groupId>
<artifactId>carbon-p2-plugin</artifactId>
<packaging>maven-plugin</packaging>
<version>5.2.50-SNAPSHOT</version>
<name>Maven P2 Profile Generation Plugin</name>
<modelVersion>4.0.0</modelVersion>
<artifactId>carbon-p2-plugin</artifactId>
<packaging>maven-plugin</packaging>
<name>Maven P2 Profile Generation Plugin</name>

<dependencies>
<dependency>
<dependencies>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>${org.apache.maven.plugin.api.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>${org.apache.maven.core.version}</version>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>${maven-plugin-plugin.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>sisu-equinox-embedder</artifactId>
<version>${tycho.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>sisu-equinox-launching</artifactId>
<version>${tycho.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-facade</artifactId>
<version>${tycho.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
<version>${org.apache.maven.compat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>${org.apache.maven.project.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
</dependency>

<!-- <dependency>-->
<!-- <groupId>org.apache.maven</groupId>-->
<!-- <artifactId>maven-core</artifactId>-->
<!-- </dependency>-->

<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>sisu-equinox-embedder</artifactId>
<version>${tycho.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>sisu-equinox-launching</artifactId>
<version>${tycho.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-facade</artifactId>
<version>${tycho.version}</version>
</dependency>

<!--
https://mvnrepository.com/artifact/org.eclipse.tycho.extras/tycho-p2-extras-plugin -->
<dependency>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-p2-extras-plugin</artifactId>
<version>${tycho.version}</version>
</dependency>


<build>
<plugins>
<plugin>
<groupId>org.jvnet.maven.incrementalbuild</groupId>
<artifactId>incremental-build-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<goals>
<goal>incremental-build</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- <dependency>-->
<!-- <groupId>org.apache.maven</groupId>-->
<!-- <artifactId>maven-compat</artifactId>-->
<!-- <version>${org.apache.maven.compat.version}</version>-->
<!-- <scope>provided</scope>-->
<!-- </dependency>-->
<!--
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>${org.apache.maven.project.version}</version>
</dependency>
-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<configuration>
<includes>
<include>src/**/*</include>
<include>pom.xml</include>
</includes>
<!-- <excludes>
<exclude>**/*/MANIFEST.MF</exclude>
<exclude>.git</exclude>
<exclude>.gitignore</exclude>
<exclude>.idea</exclude>
<exclude>*.iws</exclude>
<exclude>*.iml</exclude>
<exclude>*.ipr</exclude>
<exclude>**/META-INF/services/javax.json.spi.JsonProvider</exclude>
<exclude>**/*.json</exclude>
<exclude>**/*.yml</exclude>
<exclude>**/bench/*.txt</exclude>
</excludes> -->
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<configuration>
<goalPrefix>wso2-carbon-p2</goalPrefix>
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
<executions>
<execution>
<id>mojo-descriptor</id>
<phase>process-classes</phase>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jvnet.maven.incrementalbuild</groupId>
<artifactId>incremental-build-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<goals>
<goal>incremental-build</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<configuration>
<includes>
<include>src/**/*</include>
<include>pom.xml</include>
</includes>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
<version>0.9.0.M2</version>
<executions>
<execution>
<id>generate-index</id>
<goals>
<goal>main-index</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jvnet.maven.incrementalbuild</groupId>
<artifactId>incremental-build-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
13 changes: 4 additions & 9 deletions carbon-p2-plugin/src/main/java/org/wso2/maven/p2/CatFeature.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,25 @@
import java.util.regex.Pattern;

import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import org.wso2.maven.p2.generate.feature.Bundle;

public class CatFeature {

/**
* Id of the feature
*
* @parameter
* @required
*/
@Parameter(required = true)
private String id;

/**
* version of the feature
*
* @parameter
* @required
*/
@Parameter(required = true)
private String version;

/**
* @parameter default-value="${project}"
*/
@Parameter(defaultValue = "${project}")
private MavenProject project;

private boolean versionReplaced = false;
Expand Down
Loading

0 comments on commit f9f15c4

Please sign in to comment.