This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
depending on what i read on web to compile the only thing is to change to the directory and typing:
maven java:compile
with this 'm gettin:
C:\Documents and Settings\Solar>maven java:compile
'maven' is not recognized as an internal or external command,
operable program or batch file.
changing this command to:
mvn java:compile
C:\Documents and Settings\Solar>mvn java:compile
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'java'.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-java-plugin' does not exist or
no valid version could be found
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Fri Jan 22 09:23:44 PST 2010
[INFO] Final Memory: 1M/254M
[INFO] ------------------------------------------------------------------------
what is this? how can i compile and run? what jar(s) and where to get/put them i need?
Your JAVA_HOME is set incorrectly, it should be "C:\Program Files\Java\jdk1.6.0"
You are using Maven 2, but the directory structure is not a standard Maven 2 structure (it looks like a Maven 1 project). You should have this (assuming c:\daven is the project's base directory, and smartsoft.daven.Box is the class' full package name)
First and last it’s an honor hearing from you, so purely thank you,
Peter Johnson wrote:Your JAVA_HOME is set incorrectly, it should be "C:\Program Files\Java\jdk1.6.0"
well, I don’t know what is this ‘JAVA_HOME ... jre’ for, in fact tried to set environment variable by:
System Properties > Advanced > Environment Variables > (User, System) Variable like:
System Variable:
JAVA_HOME=C:\Program Files\Java\jdk1.6.0
MAVEN2_HOME= D:\apache-maven-2.2.1
Path=.....; %MAVEN2_HOME%\bin;%JAVA_HOME%\bin;
but I’m getting like that peculiar JAVA_HOME ... jre form!!! what is this odd don’t know and lead me to this result:
Peter Johnson wrote:
You are using Maven 2, but the directory structure is not a standard Maven 2 structure (it looks like a Maven 1 project). You should have this (assuming c:\daven is the project's base directory, and smartsoft.daven.Box is the class' full package name)
...
3.3. Building a Simple Project @echo off
set JAVA_HOME="C:\Program Files\Java\jdk1.6.0"
set MAVEN2_HOME="D:\apache-maven-2.2.1"
set PATH=%PATH%;%JAVA_HOME%\bin;%MAVEN2_HOME%\bin
cd D:\simple
mvn install
pause
but bat don’t stand still to show at least Press any key to continue . . ., no result , even when you wanna check maven per se (e.g. mvn -v),
Regarding "jre", I now understand. You originally posted the result of "mvn --version" which adds the 'jre' to JAVA_HOME. Apparently I was not paying close enough attention. Your setting is correct.
Do this. Open a Command Prompt, cd to the project directory (c:\simple), and enter:
mvn package
Then post the full output that appears on the command prompt.
but bat don’t stand still to show at least Press any key to continue . . .
Of course it will not pause. 'mvn' is actually 'mvn.bat'. When one batch file calls another, the first batch file stops processing and there is no "return". If you want the first batch file to continue to run after the second batch file finishes, you must use the "call" command:
no result
Are you sure? Did you check the c:\simple\target directory?
A. S. Georgie
Ranch Hand
Joined: Dec 25, 2009
Posts: 72
posted
0
Peter Johnson wrote:
Do this. Open a Command Prompt, cd to the project directory (c:\simple), and enter:
mvn package
Then post the full output that appears on the command prompt.
very robust message , on your command here it is the full prompt:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Solar>cd D:\simple
C:\Documents and Settings\Solar>mvn package [INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [package]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Cannot execute mojo: resources. It requires a project with an existing p
m.xml, but the build is not using one.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Sat Jan 23 08:17:14 PST 2010
[INFO] Final Memory: 3M/7M
[INFO] ------------------------------------------------------------------------
C:\Documents and Settings\Solar>
Peter Johnson wrote:
Of course it will not pause. 'mvn' is actually 'mvn.bat'. When one batch file calls another, the first batch file stops processing and there is no "return". If you want the first batch file to continue to run after the second batch file finishes, you must use the "call" command: ...
doing this having that again, see:
@echo off
set JAVA_HOME="C:\Program Files\Java\jdk1.6.0"
set MAVEN2_HOME="D:\apache-maven-2.2.1"
set PATH=%PATH%;%JAVA_HOME%\bin;%MAVEN2_HOME%\bin
cd D:\simple
call mvn install pause
Peter Johnson wrote:
Are you sure? Did you check the c:\simple\target directory?
see it yourself, like i said no result in the name of 'target' at all. (attached)
best regards...
A. S. Georgie
Ranch Hand
Joined: Dec 25, 2009
Posts: 72
posted
0
simple
A. S. Georgie
Ranch Hand
Joined: Dec 25, 2009
Posts: 72
posted
0
lately tried other versions, too, some different reaction, look:
apache-maven-3.0-alpha-6:
C:\Documents and Settings\Solar>cd D:\simple
C:\Documents and Settings\Solar>mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.094s
[INFO] Finished at: Sun Jan 24 04:00:46 PST 2010
[INFO] Final Memory: 1M/4M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.3
:install (default-install): Goal requires a project to execute but there is no P
OM in this build.
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
C:\Documents and Settings\Solar>
and maven-2.0.4:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Solar>cd D:\simple
C:\Documents and Settings\Solar>mvn install [INFO] Scanning for projects...
[INFO] -------------------------------------------------------------------------
---
[INFO] Building Maven Default Project
[INFO] task-segment: [install]
[INFO] -------------------------------------------------------------------------
---
[INFO] Ignoring available plugin update: 2.4.1 as it requires Maven version 2.0.
6
[INFO] Ignoring available plugin update: 2.4 as it requires Maven version 2.0.6
[INFO] Ignoring available plugin update: 2.3 as it requires Maven version 2.0.6
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-resour ces-plugin/2.2/maven-resources-plugin-2.2.jar
13K downloaded
[INFO] artifact org.apache.maven.plugins:maven-compiler-plugin: checking for upd
ates from central
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-compil er-plugin/2.1/maven-compiler-plugin-2.1.pom
5K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugin s/16/maven-plugins-16.pom
12K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-parent/15/mave n-parent-15.pom
23K downloaded
[INFO] Ignoring available plugin update: 2.1 as it requires Maven version 2.0.9
[INFO] artifact org.apache.maven.plugins:maven-surefire-plugin: checking for upd
ates from central
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-surefi re-plugin/2.5/maven-surefire-plugin-2.5.pom
7K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/surefire/surefire/2.
5/surefire-2.5.pom
6K downloaded
[INFO] Ignoring available plugin update: 2.5 as it requires Maven version 2.0.9
[INFO] Ignoring available plugin update: 2.4.3 as it requires Maven version 2.0.
6
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-surefi re-plugin/2.4.2/maven-surefire-plugin-2.4.2.pom
6K downloaded
_
but gets stuck an' don't move ...
also i wanna check for Mobicents installation if this is cause, i don't know what else do next anyway...
an just now this one last gave me this error: (new install, actually)
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Solar>cd D:\simple
C:\Documents and Settings\Solar>mvn install
[INFO] Scanning for projects...
[INFO] -------------------------------------------------------------------------
---
[INFO] Building Maven Default Project
[INFO] task-segment: [install]
[INFO] -------------------------------------------------------------------------
---
[INFO] Ignoring available plugin update: 2.4.1 as it requires Maven version 2.0.
6
[INFO] Ignoring available plugin update: 2.4 as it requires Maven version 2.0.6
[INFO] Ignoring available plugin update: 2.3 as it requires Maven version 2.0.6
[INFO] Ignoring available plugin update: 2.1 as it requires Maven version 2.0.9
[INFO] Ignoring available plugin update: 2.5 as it requires Maven version 2.0.9
[INFO] Ignoring available plugin update: 2.4.3 as it requires Maven version 2.0.
6
[INFO] Ignoring available plugin update: 2.3 as it requires Maven version 2.0.6
[INFO] Ignoring available plugin update: 2.2 as it requires Maven version 2.0.6
[INFO] Ignoring available plugin update: 2.3 as it requires Maven version 2.0.6
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Cannot execute mojo: resources. It requires a project with an existing po
m.xml, but the build is not using one.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Sun Jan 24 06:37:28 PST 2010
[INFO] Final Memory: 5M/9M
[INFO] ------------------------------------------------------------------------
be sure to have properly defined a pom.xml file in the root directory of you project : D:\simple\pom.xml
A. S. Georgie
Ranch Hand
Joined: Dec 25, 2009
Posts: 72
posted
0
Evan Caballero wrote:be sure to have properly defined a pom.xml file in the root directory of you project : D:\simple\pom.xml
thank you, but that's there already ...
Evan Caballero
Ranch Hand
Joined: Dec 10, 2009
Posts: 59
posted
0
can you post the content of your pom.xml file ?
A. S. Georgie
Ranch Hand
Joined: Dec 25, 2009
Posts: 72
posted
0
Evan Caballero wrote:can you post the content of your pom.xml file ?
'course, here it is:
Evan Caballero
Ranch Hand
Joined: Dec 10, 2009
Posts: 59
posted
0
Looks fine.
But, I found what is going wrong !!
C:\Documents and Settings\Solar>cd D:\simple
C:\Documents and Settings\Solar>mvn install
On windows, when you type cd D:\simple from a directory which is on another disk (here, C, it doesn't work. You should before change the disk by simply typing its letter in the command prompt.
try this :
C:\Documents and Settings\Solar>D:
D:\>cd simple
D:\simple>mvn install
should work fine now ;)
A. S. Georgie
Ranch Hand
Joined: Dec 25, 2009
Posts: 72
posted
0
Evan Caballero wrote:
C:\Documents and Settings\Solar>D:
very thank you, this looks very find, but look:
C:\Documents and Settings\Solar>C:\Documents and Settings\Solar>D:
[color=red]Access is denied.
C:\Documents and Settings\Solar>[/color]
Evan Caballero
Ranch Hand
Joined: Dec 10, 2009
Posts: 59
posted
0
well, you missed something ;)
open a command prompt, and type :
D:
cd simple
mvn package
A. S. Georgie
Ranch Hand
Joined: Dec 25, 2009
Posts: 72
posted
0
Evan Caballero wrote:well, you missed something ;)
open a command prompt, and type :
D:
cd simple
mvn package
okay , here it is:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Solar>D:
D:\>cd simple
D:\simple>mvn package
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: null:simple:jar:null
Reason: Cannot find parent: org.sonatype.mavenbook.simple:parent for project: nu
ll:simple:jar:null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Cannot find parent: org.sonaty
pe.mavenbook.simple:parent for project: null:simple:jar:null
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:373)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:286)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:123)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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.ProjectBuildingException: Cannot find parent
: org.sonatype.mavenbook.simple:parent for project: null:simple:jar:null
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(D
efaultMavenProjectBuilder.java:1198)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(Def
aultMavenProjectBuilder.java:697)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFi
leInternal(DefaultMavenProjectBuilder.java:431)
at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMave
nProjectBuilder.java:195)
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:523)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:455)
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:359)
... 11 more
Caused by: org.apache.maven.project.ProjectBuildingException: POM 'org.sonatype.
mavenbook.simple:parent' not found in repository: Unable to download the artifac
t from any repository
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepo
sitory(DefaultMavenProjectBuilder.java:528)
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(D
efaultMavenProjectBuilder.java:1194)
... 17 more
Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable
to download the artifact from any repository
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
faultArtifactResolver.java:197)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
faultArtifactResolver.java:73)
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepo
sitory(DefaultMavenProjectBuilder.java:482)
... 18 more
Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to downl
oad the artifact from any repository
at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(Def
aultWagonManager.java:308)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
faultArtifactResolver.java:185)
... 20 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Sun Jan 24 07:35:29 PST 2010
[INFO] Final Memory: 1M/4M
[INFO] ------------------------------------------------------------------------
A. S. Georgie
Ranch Hand
Joined: Dec 25, 2009
Posts: 72
posted
0
i was thinking about your reply of how it's wrong when two disk is different, then with the following maven at C:,
C:\Program Files\apache-maven-3.0-alpha-6
and copied simple project in C:, doing this again i got this:
C:\Documents and Settings\Solar>cd C:\simple
C:\simple>mvn install
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR] The project org.sonatype.mavenbook.simple:simple:0.8-SNAPSHOT (C:\simp
le\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM org.sonatype.mavenbook.simple:parent:0.8-S
NAPSHOT for org.sonatype.mavenbook.simple:simple:0.8-SNAPSHOT: Failed to resolve
POM for org.sonatype.mavenbook.simple:parent:0.8-SNAPSHOT due to Missing:
----------
1) org.sonatype.mavenbook.simple:parent:pom:0.8-SNAPSHOT
----------
1 required artifact is missing.
for artifact:
org.sonatype.mavenbook.simple:parent:pom:0.8-SNAPSHOT
the problem is that your pom refers to a parent pom (<parent>....</parent>). I suppose you don't need it at the moment.
try this pom.xml :
A. S. Georgie
Ranch Hand
Joined: Dec 25, 2009
Posts: 72
posted
0
Evan Caballero wrote:the problem is that your pom refers to a parent pom (<parent>....</parent>). I suppose you don't need it at the moment.
try this pom.xml :
........
you must be THE, i mean, that should've been written 'Je Cherche Après Evan' already, really really my best appreciation, i seee thee just wonderfullllllllll, i'll write a piece just for theeeeeeeeeee...
Evan Caballero
Ranch Hand
Joined: Dec 10, 2009
Posts: 59
posted
0
lol, you are welcome ;)
A. S. Georgie
Ranch Hand
Joined: Dec 25, 2009
Posts: 72
posted
0
at last i'm thankful for Peter Johnson, for lots of help, too, and especial thanks towards Mrs. Evan Caballero
Evan and A., I will have to ask you to either remove your foreign language posts or replace them with the English translation - Java Ranch has a strict English-only policy. Thank you for your cooperation.
[I removed the posts...]
Evan Caballero
Ranch Hand
Joined: Dec 10, 2009
Posts: 59
posted
0
Ok Peter, sorry for that
A. S. Georgie
Ranch Hand
Joined: Dec 25, 2009
Posts: 72
posted
0
yes, at full tilt you’re right it’s the place merely, and this is what I like about you telling rules frankly,
and I like to obey rules, an’ thank you no less, I know I’m novice here with mistakes that time would make it profound.
I've always been a restless rover, in search of femininity.
I've met the pretty girls all over, but only one appealed to me.
My loving heart I gayly tossed her, this Spanish kid in old Madrid,
She captured me and then I lost her, and ever since I'm off my lid.
I never will forget her face,
I'm searching for her ev'ry place.
I'm looking for Titina, Titina, my Titina,
I've searched from Palistina, to London and Peru.
I'll die without Titina, I can't eat my farina,
I don't want Rose or Lena, Titina I want you.
Ah! Mama! Ah! Papa!
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.