1.8 is a long way back but I think I used this article as a starting point: https://crunchify.com/how-to-create-build-java-project-including-all-dependencies-using-maven-maven-resources-maven-dependency-maven-jar-plugin-tutorial/
Dave On Thu, Aug 11, 2022 at 6:22 PM M. Hagen <mph1...@yahoo.com.invalid> wrote: > Hello, > > I am fairly new to NetBeans and a novice user of Java 1.8... (Most of my > Java programming has been done with Notepad at the command prompt.) > > While attempting to created a packaged JAR file for distribution with > NetBeans Maven, I get an error of "No MANIFEST.MF attributes found" when > running the Jar file. However NetBeans Jar worked with Ant on other > projects. > > I did and still researching the internet on how to create a working > MANIFEST.MF file for Maven. > > I tried modifying the pom.xml file to get a good MANIFEST.MF file. > > After modifying the pom.xml file I get error: > 1 problem was encountered while building the effective model [FATAL] > Non-parseable POM > C:\Users\elect\Documents\NetBeansProjects\Tutorials\TestJarmavenproject1\pom.xml: > TEXT must be immediately followed by END_TAG and not START_TAG (position: > START_TAG seen ... \r\n ... @15:26) @ line 15, column 26 for project at > C:\Users\elect\Documents\NetBeansProjects\Tutorials\TestJarmavenproject1\pom.xml > > 2 the below pom.xml file errors at "<plugins> with a red line. So I get > "TestJarmavenproject1 (Unloadable)" in NetBeans. > Error Message: > Non-parsable POM > C:\Users\elect\Documents\NetBeansProjects\Tutorials\TestJarmavenproject1\pom.xml: > TEXT must be immediately followed by END_TAG and not START_TAG (position: > START-TAG seen ... </execmainClass>\n<build>\n plugins> ... @14:12 > I tried several different attempt to stop this error and failed. > > <!-- This is not the original pom file but the 2nd Try modification --> > <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>com.electronicrepair.testjarmavenproject1</groupId> > <artifactId>TestJarmavenproject1</artifactId> > <version>1.0-SNAPSHOT</version> > <packaging>jar</packaging> > <properties> > <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> > <maven.compiler.source>1.8</maven.compiler.source> > <maven.compiler.target>1.8</maven.compiler.target> > > <exec.mainClass>com.electronicrepair.testjarmavenproject1.TestJarmavenproject1</exec.mainClass> > <!-- I added the lines beloew: > https://techglimpse.com/create-maven-jar-file-netbeans-tutorial/ --> > <build> > <plugins> > <plugin> > <!-- Build an executable JAR --> > <!-- This line below wasnot in second file copied from the Web... --> > > <groupId>com.electronicrepair.testjarmavenproject1</groupId> > <!-- <artifactId>TestJarmavenproject1</artifactId> I added line below to > replace tgis line --> > <artifactId>maven-assembly-plugin</artifactId> > <version>1.0-SNAPSHOT</version> > <configuration> > <descriptorRefs> > > <descriptorRef>jar-with-dependencies</descriptorRef> > </descriptorRefs> > <archive> > <manifest> > <addClasspath>true</addClasspath> > <classpathPrefix>lib/</classpathPrefix> > > <mainClass>com.electronicrepair.testjarmavenproject1.TestJarmavenproject1</mainClass> > </manifest> > </archive> > </configuration> > <executions> > <execution> > <id>make-assembly</id> > <phase>package</phase> > <goals> > <goal>single</goal> > </goals> > </execution> > </executions> > </plugin> > </plugins> > </build> > <!-- I added the lines above: > https://techglimpse.com/create-maven-jar-file-netbeans-tutorial/ --> > </properties> > </project> > > * > Other error messages about the pom.xml file are: > * > cd > C:\Users\elect\Documents\NetBeansProjects\Tutorials\TestJarmavenproject1; > "JAVA_HOME=C:\\Program Files\\Java\\jdk1.8.0_333" cmd /c "\"C:\\Program > Files\\NetBeans-14\\netbeans\\java\\maven\\bin\\mvn.cmd\" -DskipTests=true > \"-Dmaven.ext.class.path=C:\\Program > Files\\NetBeans-14\\netbeans\\java\\maven-nblib\\netbeans-eventspy.jar\" > --fail-at-end package" > Scanning for projects... > [ERROR] Some problems were encountered while processing the POMs: > Non-parseable POM > C:\Users\elect\Documents\NetBeansProjects\Tutorials\TestJarmavenproject1\pom.xml: > TEXT must be immediately followed by END_TAG and not START_TAG (position: > START_TAG seen ...<build>\r\n <plugins>... @15:26) @ line > 15, column 26 > @ > The build could not read 1 project -> [Help 1] > > The project > (C:\Users\elect\Documents\NetBeansProjects\Tutorials\TestJarmavenproject1\pom.xml) > has 1 error > Non-parseable POM > C:\Users\elect\Documents\NetBeansProjects\Tutorials\TestJarmavenproject1\pom.xml: > TEXT must be immediately followed by END_TAG and not START_TAG (position: > START_TAG seen ...<build>\r\n <plugins>... @15:26) @ line > 15, column 26 -> [Help 2] > > To see the full stack trace of the errors, re-run Maven with the -e switch. > Re-run Maven using the -X switch to enable full debug logging. > > For more information about the errors and possible solutions, please read > the following articles: > [Help 1] > http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException > [Help 2] > http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException > > * > ProjectBuildingException > Skip to end of metadata > * > Location: > C:\Users\elect\Documents\NetBeansProjects\Tutorials\TestJarmavenproject1 > GroupID: error > ArtifactID error > Version: 0 > Packaging pom > Discription: This project could not be loaded by the > NetBeans Connector. That usually means something is wrong > with your pom.xml, or plugins are missing. Select > :Show and Resolve Problems" from the projects's context > menu for additional information. > > Problem: > Unable to properly load project > > Created by Benjamin Bentmann, last modified on Oct 20, 2009 > > Go to start of metadata > > This is a rather general error which indicates one or more problems with > the POMs themselves like: > > A POM can't be parsed because its XML is not well-formed or contains > invalid elements, see also ModelParseException. > A parent POM can't be resolved, e.g. because the POM is neither > present locally at the path denoted by <relativePath> nor available in any > of the <repositories> declared in the POM or the settings.xml, see also > UnresolvableModelException. > The contents of a POM is incomplete or otherwise semantically invalid. > A child module of an aggregator project could not be found at the > specified location. > > The problem listing that accompanies the error should already indicate > what and in which POMs needs to be fixed. For a detailed description of the > POM, please consult the POM Reference. > 3 people like this > * > ModelParseException > Skip to end of metadata > > Created by Benjamin Bentmann, last modified on Oct 20, 2009 > > Go to start of metadata > > This error indicates a bad syntax of your POM. In more detail, this could > mean: > > The POM contains invalid/unknown elements that Maven does not > understand. > The POM is not even well-formed XML, e.g. the XML elements are not > properly nested. > > In most cases, all those problems are due to simple typos that can be > easily fixed. You should also verify that your POM complies to the POM > Reference. > * > > Please help: > The original project built and run successfully with the original pom.xml > file. > I am having trouble with the modified pom.xml for a good MAINFEST.MF file > to create a good packaged jar file for distribution. > Even if you can help me get by the <plugins> error I may be able to load > my project. > > Thanks, > Mike Hagen > TD: 11aug2022, Thursday, 7:10 PM EDT > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org > For additional commands, e-mail: users-h...@netbeans.apache.org > > For further information about the NetBeans mailing lists, visit: > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > > -- Sent from a mobile device. Please excuse any typos.