Skip to content
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

feat: support scanning configuration in maven plugin #21125

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions flow-plugins/flow-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
@@ -107,6 +107,7 @@
<localRepositoryPath>target/local-repo</localRepositoryPath>
<extraArtifacts>
<artifact>com.vaadin:flow-client:${project.version}</artifact>
<artifact>com.vaadin:flow-react:${project.version}</artifact>
</extraArtifacts>
<streamLogsOnFailures>true</streamLogsOnFailures>
<settingsFile>src/it/settings.xml</settingsFile>
Original file line number Diff line number Diff line change
@@ -21,3 +21,5 @@ invoker.goals=package
invoker.profiles.1=
invoker.profiles.2=fake-flow-resources
invoker.profiles.3=fake-flow-plugin-resources
invoker.profiles.4=alpha-addon
invoker.profiles.5=beta-addon
51 changes: 51 additions & 0 deletions flow-plugins/flow-maven-plugin/src/it/flow-addon/pom.xml
Original file line number Diff line number Diff line change
@@ -21,8 +21,31 @@
<maven.compiler.source>${maven.compiler.release}</maven.compiler.source>
<maven.compiler.target>${maven.compiler.release}</maven.compiler.target>
<maven.test.skip>true</maven.test.skip>
<custom.source.directory>src/main/java</custom.source.directory>
</properties>

<build>
<sourceDirectory>${custom.source.directory}</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<id>clean-only-classes</id>
<goals>
<goal>clean</goal>
</goals>
<phase>initialize</phase>
<configuration>
<directory>${project.build.outputDirectory}</directory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
@@ -59,6 +82,34 @@
</resources>
</build>
</profile>
<profile>
<id>alpha-addon</id>
<properties>
<custom.source.directory>src/main/alpha-addon/java</custom.source.directory>
</properties>
<build>
<finalName>alpha-addon-${project.version}</finalName>
<resources>
<resource>
<directory>${project.basedir}/src/main/alpha-addon/resources</directory>
</resource>
</resources>
</build>
</profile>
<profile>
<id>beta-addon</id>
<properties>
<custom.source.directory>src/main/beta-addon/java</custom.source.directory>
</properties>
<build>
<finalName>beta-addon-${project.version}</finalName>
<resources>
<resource>
<directory>${project.basedir}/src/main/beta-addon/resources</directory>
</resource>
</resources>
</build>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright 2000-2025 Vaadin Ltd.
*
* Licensed 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.
*/

package com.vaadin.addon.alpha;

import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.Tag;
import com.vaadin.flow.component.dependency.JsModule;

@Tag("alpha-addon")
@JsModule("./alpha.js")
public class AlphaComponent extends Component {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright 2000-2025 Vaadin Ltd.
*
* Licensed 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.
*/

package com.vaadin.addon.alpha;

import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.HasComponents;
import com.vaadin.flow.component.Tag;
import com.vaadin.flow.router.Route;

@Route("alpha-addon")
@Tag("div")
public class AlphaRoute extends Component implements HasComponents {

public AlphaRoute() {
add(new AlphaComponent());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright 2000-2025 Vaadin Ltd.
*
* Licensed 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.
*/

package com.vaadin.addon.alpha;

import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.Tag;
import com.vaadin.flow.component.dependency.JsModule;

@Tag("alpha-addon")
@JsModule("./not-used.js")
public class UnusedComponent extends Component {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
window.alpha = 1;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log("never imported");
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright 2000-2025 Vaadin Ltd.
*
* Licensed 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.
*/

package com.vaadin.addon.beta;

import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.Tag;
import com.vaadin.flow.component.dependency.JsModule;

@Tag("beta-addon")
@JsModule("./beta.js")
public class BetaComponent extends Component {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright 2000-2025 Vaadin Ltd.
*
* Licensed 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.
*/

package com.vaadin.addon.beta;

import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.HasComponents;
import com.vaadin.flow.component.Tag;
import com.vaadin.flow.router.Route;

@Route("beta-addon")
@Tag("div")
public class BetaRoute extends Component implements HasComponents {

public BetaRoute() {
add(new BetaComponent());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
window.beta = 1;
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#
# Copyright 2000-2025 Vaadin Ltd.
#
# Licensed 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.
#

invoker.goals=clean verify -DskipTests
invoker.profiles.1=
invoker.profiles.2=disable-optimized-bundle
invoker.profiles.3=exclude
invoker.profiles.4=exclude,disable-optimized-bundle
invoker.profiles.5=include
invoker.profiles.6=include,disable-optimized-bundle
invoker.profiles.7=exclude-all
invoker.profiles.8=exclude-all,disable-optimized-bundle
invoker.profiles.9=disabled-scan-config
invoker.profiles.10=disabled-scan-config,disable-optimized-bundle
invoker.profiles.11=exclude-target
invoker.profiles.12=exclude-target,disable-optimized-bundle
Loading