I sorted it .
I  deleted and recreated the class.

Backbutton.co.uk
¯\_(ツ)_/¯
♡۶Java♡۶RMI ♡۶
Make Use Method {MUM}
makeuse.org
<http://www.backbutton.co.uk>


On Thu, 16 Apr 2020 at 20:37, Zahid Rahman <zahidr1...@gmail.com> wrote:

> Hi,
>
> I want to replicate this in pom.xml
> mvn -q exec:java -Dexec.mainClass=org.makeuse.avro.Test
>
> I wish to make my org.makeuse.avro.Test  as the main class in pom.xml.
>
> When I run project from Netbeans it keeps picking up another class or
> expect the main method to be in that class.
> I can only run Test.java if I use the option *run file* Shift + F6 from
> inside netbeans.
>
> I have tried a number of syntax' from but no luck at run time.
> Can you please give me the pom.xml syntax for this task.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <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>
>     <groupId>org.makeuse</groupId>
>     <artifactId>avro</artifactId>
>     <version>1.0-SNAPSHOT</version>
>     <packaging>jar</packaging>
>
>     <properties>
>         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>         <maven.compiler.source>11</maven.compiler.source>
>         <maven.compiler.target>11</maven.compiler.target>
>     </properties>
>
>     <dependencies>
> <!-- https://mvnrepository.com/artifact/org.apache.avro/avro -->
>         <dependency>
>             <groupId>org.apache.avro</groupId>
>             <artifactId>avro</artifactId>
>             <version>1.9.2</version>
>         </dependency>
>
>     </dependencies>
> <build>
>     <plugins>
> <plugin>
>   <groupId>org.apache.avro</groupId>
>   <artifactId>avro-maven-plugin</artifactId>
>   <version>1.9.2</version>
>   <executions>
>     <execution>
>       <phase>generate-sources</phase>
>       <goals>
>         <goal>schema</goal>
>       </goals>
>       <configuration>
>
> <sourceDirectory>${project.basedir}/src/main/avro/</sourceDirectory>
>
> <outputDirectory>${project.basedir}/src/main/java/</outputDirectory>
>       </configuration>
>     </execution>
>   </executions>
> </plugin>
> <plugin>
>   <groupId>org.apache.maven.plugins</groupId>
>   <artifactId>maven-compiler-plugin</artifactId>
>   <version>${maven.compiler.target}</version>
>   <configuration>
>     <source>11</source>
>     <target>11</target>
>   </configuration>
> </plugin>
>     </plugins>
> </build>
> </project>
>
>
>
>
> Backbutton.co.uk
> ¯\_(ツ)_/¯
> ♡۶Java♡۶RMI ♡۶
> Make Use Method {MUM}
> makeuse.org
> <http://www.backbutton.co.uk>
>

Reply via email to