Note that there are some explanatory texts on larger screens.

plurals
  1. POEssential tags for building the java project using maven in pom.xml
    primarykey
    data
    text
    <p>I am building my java project using maven but couldn't succeed. So, can anyone please tell me the essential tags and their corresponding values required in pom.xml to build a project? Also, how do i add the storm dependencies manually from command line? </p> <p>My directory structure of project :</p> <pre><code>ROOT | |----com---&gt;test-----&gt;newpackage----&gt;*.class |--- META-INF------&gt;MANIFEST.MF |----resource-----&gt;words.txt |----pom.xml |-----*.jar </code></pre> <p>Initially i tried <a href="https://stackoverflow.com/questions/10568275/noclassdeffounderror-on-maven-dependency">Maven Link</a> and create the <code>pom.xml</code> like this :</p> <pre><code>&lt;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"&gt; &lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-shade-plugin&lt;/artifactId&gt; &lt;version&gt;1.6&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;phase&gt;com.test.newpackage&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;shade&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;/project&gt; </code></pre> <p>But, after that i use <code>mvn package</code>. It throw this exception :</p> <pre><code>[INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error building POM (may not be this project's POM). Project ID: unknown POM Location: /home/naresh/Desktop/SharedFolder/StormEclipse/pom.xml Reason: Not a v4.0.0 POM. for project unknown at /home/naresh/Desktop/SharedFolder/StormEclipse/pom.xml [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.reactor.MavenExecutionException: Not a v4.0.0 POM. for project unknown at /home/naresh/Desktop/SharedFolder/StormEclipse/pom.xml at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:404) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:272) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.project.InvalidProjectModelException: Not a v4.0.0 POM. for project unknown at /home/naresh/Desktop/SharedFolder/StormEclipse/pom.xml at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1599) at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1571) at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:506) at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200) at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:604) at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:487) at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:391) ... 12 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: &lt; 1 second [INFO] Finished at: Mon Jul 22 14:38:24 IST 2013 [INFO] Final Memory: 1M/15M [INFO] ------------------------------------------------------------------------ </code></pre> <p>After that i used this link <a href="https://github.com/nathanmarz/storm/wiki/Running-topologies-on-a-production-cluster" rel="nofollow noreferrer">Maven link 2</a> and created the pom.xml like this :</p> <pre><code> &lt;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"&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;groupId&gt;com.test.newpackage&lt;/groupId&gt; &lt;artifactId&gt;wordcount&lt;/artifactId&gt; &lt;version&gt;0.0.1&lt;/version&gt; &lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;descriptorRefs&gt; &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt; &lt;/descriptorRefs&gt; &lt;archive&gt; &lt;manifest&gt; &lt;mainClass&gt;com.test.newpackage&lt;/mainClass&gt; &lt;/manifest&gt; &lt;/archive&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;repositories&gt; &lt;!-- Repository where we can found the storm dependencies &lt;repository&gt; &lt;id&gt;clojars.org&lt;/id&gt; &lt;url&gt;http://clojars.org/repo&lt;/url&gt; &lt;/repository&gt; --&gt; &lt;/repositories&gt; &lt;dependencies&gt; &lt;!-- Storm Dependency --&gt; &lt;dependency&gt; &lt;groupId&gt;storm&lt;/groupId&gt; &lt;artifactId&gt;storm&lt;/artifactId&gt; &lt;version&gt;0.8.1&lt;/version&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;/project&gt; </code></pre> <p>This time it throw this exception :</p> <pre><code>[ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to resolve artifact. Missing: ---------- 1) storm:storm:jar:0.8.1 Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=storm -DartifactId=storm -Dversion=0.8.1 -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=storm -DartifactId=storm -Dversion=0.8.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) com.test.newpackage:wordcount:jar:0.0.1 2) storm:storm:jar:0.8.1 ---------- 1 required artifact is missing. for artifact: com.test.newpackage:wordcount:jar:0.0.1 from the specified remote repositories: central (http://repo1.maven.org/maven2) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload