Hi,

On 05.01.20 21:31, zahid wrote:

mvn -version
Apache Maven 3.6.0
Maven home: /usr/share/maven
Java version: 11.0.5, vendor: Private Build, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux", version: "5.0.0-37-generic", arch: "amd64", family: "unix"

*ls -l
*total 24
-rw-rw-r-- 1 kub18 kub18 4770 Jan  3 15:02 nbactions.xml
-rw-rw-r-- 1 kub18 kub18  455 Jan  1 21:58 pom_old.xml
-rwxrwxrwx 1 kub18 kub18 2520 Jan  3 15:17 pom.xml
drwxrwxr-x 3 kub18 kub18 4096 Jan  1 21:45 src
drwxrwxr-x 7 kub18 kub18 4096 Jan  5 09:24 target

*
*

*consol output**
*

kub18@UB18:~/javafx/helloapp$ mvn javafx:run
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< co.uk.backbutton:HelloFX >----------------------
[INFO] Building HelloFX 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- javafx-maven-plugin:0.0.3:run (default-cli) @ HelloFX ---
[WARNING] Can't extract module name from plexus-container-default-1.0-alpha-6.jar: plexus.container.default: Invalid module name: 'default' is not a Java identifier [WARNING] Can't extract module name from plexus-container-default-1.0-alpha-30.jar: plexus.container.default: Invalid module name: 'default' is not a Java identifier [WARNING] Some dependencies encountered issues while attempting to be resolved as modules and will not be included in the classpath; you can change this behavior via the 'includePathExceptionsInClasspath' configuration parameter. [INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  15.673 s
[INFO] Finished at: 2020-01-05T20:20:17Z
[INFO] ------------------------------------------------------------------------
*
*

*kub18@UB18:~/javafx/helloapp$ cat pom.xml*

<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>
     <groupId>co.uk.backbutton</groupId>
     <artifactId>HelloFX</artifactId>
     <version>1.0-SNAPSHOT</version>
     <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
     </properties>
     <dependencies>

         <dependency>
             <groupId>org.openjfx</groupId>
             <artifactId>javafx-controls</artifactId>
             <version>14-ea+6</version>
         </dependency>
         <dependency>
             <groupId>org.openjfx</groupId>
             <artifactId>javafx-fxml</artifactId>
             <version>13</version>
         </dependency>
         <dependency>
     <groupId>plexus</groupId>
     <artifactId>plexus-container-default</artifactId>
     <version>1.0-alpha-6</version>
</dependency>
         <dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
             <version>3.2.1</version>
         </dependency>
         <dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
             <version>3.1.1</version>
         </dependency>

         <dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
                 <version>3.0.0-M1</version>
         </dependency>

     </dependencies>
     <build>
         <plugins>
             <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
                 <version>3.8.0</version>
                 <configuration>
                     <release>11</release>
                 </configuration>
             </plugin>

             <plugin>
                 <groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
                 <version>0.0.3</version>
                 <configuration>
                     <mainClass>HelloFX</mainClass>
                 </configuration>
             </plugin>
         </plugins>
     </build>




Never use maven plugins as dependencies....
also do not use plexus-container-default as a dependency.


So remove the dependency definition:

maven-source-plugin
maven-javadoc-plugin
maven-deploy-plugin

also remove the dependency:

plexus-container-default from your pom file...

If you want to define your plugins in your pom which is a good idea you should use pluginManagement instead ...

This will remove the warnings you have gotten

The issue had been the wrong dependencies..


Kind regards
Karl Heinz Marbaise




*kub18@UB18:~/javafx/helloapp$ cat nbactions.xml
*<?xml version="1.0" encoding="UTF-8"?>
<actions>
         <action>
             <actionName>rebuild</actionName>
             <packagings>
                 <packaging>*</packaging>
             </packagings>
             <goals>
                 <goal>clean</goal>
                 <goal>install</goal>
                 <goal>javafx:run</goal>
             </goals>
         </action>
         <action>
             <actionName>build</actionName>
             <packagings>
                 <packaging>*</packaging>
             </packagings>
             <goals>
                 <goal>install</goal>
                 <goal>javafx:run</goal>
             </goals>
         </action>
         <action>
<actionName>build-with-dependencies</actionName>
             <reactor>also-make</reactor>
             <packagings>
                 <packaging>*</packaging>
             </packagings>
             <goals>
                 <goal>clean</goal>
                 <goal>install</goal>
                 <goal>javafx:run</goal>
             </goals>
         </action>
         <action>
             <actionName>run</actionName>
             <packagings>
                 <packaging>jar</packaging>
             </packagings>
             <goals>
                 <goal>clean</goal>
                 <goal>install</goal>
                 <goal>javafx:run</goal>
             </goals>
             <properties>
                <exec.args>-classpath %classpath ${packageClassName}</exec.args>
<exec.executable>java</exec.executable>
             </properties>
         </action>
         <action>
             <actionName>run.single.main</actionName>
             <packagings>
                 <packaging>*</packaging>
             </packagings>
             <goals>
                 <goal>clean</goal>
                 <goal>install</goal>
                 <goal>javafx:run</goal>
             </goals>
             <properties>
                <exec.args>-classpath %classpath ${packageClassName}</exec.args>
<exec.executable>java</exec.executable>
<exec.classpathScope>${classPathScope}</exec.classpathScope>
             </properties>
         </action>
         <action>
             <actionName>debug</actionName>
             <packagings>
                 <packaging>jar</packaging>
             </packagings>
             <goals>
                 <goal>clean</goal>
                 <goal>build</goal>
                 <goal>install</goal>
                 <goal>javafx:run</goal>
             </goals>
             <properties>
<exec.args>-agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath ${packageClassName}</exec.args>
<exec.executable>java</exec.executable>
                 <jpda.listen>true</jpda.listen>
             </properties>
         </action>
         <action>
             <actionName>debug.single.main</actionName>
             <packagings>
                 <packaging>*</packaging>
             </packagings>
             <goals>
                 <goal>build</goal>
                 <goal>clean</goal>
                 <goal>install</goal>
                 <goal>javafx:run</goal>
             </goals>
             <properties>
<exec.args>-agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath ${packageClassName}</exec.args>
<exec.executable>java</exec.executable>
<exec.classpathScope>${classPathScope}</exec.classpathScope>
                 <jpda.listen>true</jpda.listen>
             </properties>
         </action>
         <action>
             <actionName>profile</actionName>
             <packagings>
                 <packaging>jar</packaging>
             </packagings>
             <goals>
                 <goal>clean</goal>
                 <goal>build</goal>
                 <goal>install</goal>
                 <goal>javafx:run</goal>
             </goals>
             <properties>
                <exec.args>-classpath %classpath ${packageClassName}</exec.args>
<exec.executable>java</exec.executable>
             </properties>
         </action>
         <action>
<actionName>profile.single.main</actionName>
             <packagings>
                 <packaging>*</packaging>
             </packagings>
             <goals>
                 <goal>clean</goal>
                 <goal>build</goal>
                 <goal>install</goal>
                 <goal>javafx:run</goal>
             </goals>
             <properties>
                <exec.args>-classpath %classpath ${packageClassName}</exec.args>
<exec.executable>java</exec.executable>
<exec.classpathScope>${classPathScope}</exec.classpathScope>
             </properties>
         </action>
     </actions>


*kub18@UB18:~/javafx/helloapp/src/main/java$ cat HelloFX.java *

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

public class HelloFX extends Application {

     @Override
     public void start(Stage stage) {
         String javaVersion = System.getProperty("java.version");
         String javafxVersion = System.getProperty("javafx.version");
         Label l = new Label("Hello, JavaFX " + javafxVersion + ","
                 + " running on Java " + javaVersion + ".");
         Scene scene = new Scene(new StackPane(l), 640, 480);
         stage.setScene(scene);
         stage.show();
     }

     public static void main(String[] args) {
         launch();
     }

}
*
*

On 05/01/2020 18:36, Karl Heinz Marbaise wrote:
Hi,

sorry but you seemed not to read my questions:

without a full pom and it's dependencies it's impossible to see where
the warning is comming from cause it looked like there is a dependency
(plexus--...) extreme old one which does not has a module information
and can't be used as it...that means there is a dependency somewhere in
your project? or maybe in the used plugin javafx ?

Furthermore the output:

Java version: 11.0.5, vendor: Private Build

is very interesting..Have you build your own JDK ? ...

As I already mentioned. It would be helpful to have a full example
project as GitHub project ...


Kind regards
Karl Heinz Marbaise
On 05.01.20 19:08, zahid wrote:
*Running in NETBEANS IDE
*

*mvn error message* "you can change this
behavior via the 'includePathExceptionsInClasspath' configuration
parameter." ......

*I would like to see an example syntax setting in pom.xml file of **
*

*'includePathExceptionsInClasspath' **
*

*then I can fix it next time this happens.*

*
*

 > Also do not change <default config> on the top menu,

 > Which menu? In Maven there is no menu? ...

*NETBEANS IDE menu at the top drop down list  below options Run Debug.**
*

*
*

**

The error was in NETBEANS IDE  when  running an archetype application.

NETBEANS IDE comes with mvn version Apache Maven 3.3.9


As you can see below I reverted back to system installation of mvn 3.3.9
same as NETBEANS IDE.

I do not  now get warning when creating command line archetypes.

*Console output of mvn -version **
*

Apache Maven 3.3.9

Maven home: /usr/share/maven
Java version: 11.0.5, vendor: Private Build
Java home: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux", version: "5.0.0-37-generic", arch: "amd64", family: "unix"


*NETBEANS ABOUT DIALOGUE*

Product Version: Apache NetBeans IDE 11.2

Java: 11.0.5; OpenJDK 64-Bit Server VM 11.0.5+10-post-Ubuntu-0ubuntu1.118.04 Runtime: OpenJDK Runtime Environment 11.0.5+10-post-Ubuntu-0ubuntu1.118.04 System: Linux version 5.0.0-37-generic running on amd64; UTF-8; en_GB (nb)
User directory: /home/kub18/.netbeans/11.2
Cache directory: /home/kub18/.cache/netbeans/11.2


openjdk version "11.0.5" 2019-10-15

*KUBUNTU KInfocentre**
*

KDE plasma version 5.12.9

Distributor ID: Ubuntu
Description:    Ubuntu 18.04.3 LTS
Release:        18.04
Codename:       bionic


On 05/01/2020 17:26, Karl Heinz Marbaise wrote:
On 05.01.20 18:06, zahid wrote:

I can't honestly remember which application I was having this problem
with.

Unfortunately this means I can't help here..


BUT all my applications are running fine without errors or warnings.
without a concrete example it's more or less impossible to help ...I
don't know what versions of Maven you exactly using, which dependencies,
which plugin versions, which JDK version etc. etc...


I found most of these kind of  *GOTCHAS* is to reset the mvn goals to
"clean install".

That is to say go to project -> properties  -> right click -> actions >
scroll through resetting the  execute goals.

Which project properties? Running in IDE? Sounds like you don't run on
plain command line? Have you checked so?...



Also do not change <default-config> on the top menu,

Which menu? In Maven there is no menu? ...


Kind regards
Karl Heinz Marbaise


that will also cause different kind of warnings or errors.

You can change it to release-profile see what happens then change it
back again :)

Also some times you have errors and warnings  when you run by selecting
the double arrows. Then you have to "run file" by being in the java
class where the  "psvm" is   and right click -> "run file" . Then the
double arrow will run correctly after that.


On 05/01/2020 15:50, Karl Heinz Marbaise wrote:
Hi,
On 03.01.20 18:57, zahid wrote:
what is the solution to solve this warning.

running form NETBEANS IDE.

module name from plexus-container-default-1.0-alpha-6.jar:
plexus.container.default: Invalid module name: 'default' is not a Java
identifier
Can't extract module name from
plexus-container-default-1.0-alpha-30.jar: plexus.container.default:
Invalid module name: 'default' is not a Java identifier
Some dependencies encountered issues while attempting to be
resolved as
modules and will not be included in the classpath; you can change this
behavior via the 'includePathExceptionsInClasspath' configuration
parameter.


Do you have a full working example of this? Best would be a GitHub
project?

Kind regards
Karl Heinz Marbaise
-------------

b/r

Zahid

--
www.backbutton.co.uk
¯\_(ツ)_/¯
Marriage between loose
and tight coupling
= healthy applications

--
www.backbutton.co.uk
¯\_(ツ)_/¯
Marriage between loose
and tight coupling
= healthy applications

Reply via email to