You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by David Whitehurst <dl...@comcast.net> on 2004/01/26 03:25:51 UTC
Can't get project.xml to work ...
Hi:
I installed maven, point to /bin and MAVEN_HOME is there too. I can run
"maven test' it downloads a bunch of things, but creates no classes or
docs, just folders in target dir.
I setup a project.xml in my workspace/DBPirate dir for my project. When
I run I keep getting the following error:
java.lang.NullPointerException
at
org.apache.maven.project.Project.standardToLegacyId(Project.java:1566
I changed the project name, and the cvs point, because my project is on
java.net at /cvs level but the project is actually at
/cvs/dbpirate/DBPirate because my web is at /cvs/dbpirate/www.
I use no JUnit yet, but I installed that too.
Anyhow, heres my project.xml ... I'm stumped.
<project>
<pomVersion>1</pomVersion>
<name>dbpirate</name>
<id>dbpirate</id>
<currentVersion>1.0a</currentVersion>
-
<organization>
<name>PiratePete Software Group</name>
<url>http://www.piratepetesoftware.com/</url>
</organization>
<inceptionYear>2003</inceptionYear>
<package>com.piratepete.dbpirate</package>
-
<shortDescription>
DBPirate is a Multi-Database Query and Browsing Tool
</shortDescription>
<!-- Gump integration -->
<gumpRepositoryId/>
<description>
Later a description will be provided.
</description>
<url>https://dbpirate.dev.java.net/</url>
<issueTrackingUrl>
</issueTrackingUrl>
<siteAddress>localhost</siteAddress>
<siteDirectory>
/var/www/html/maven/
</siteDirectory>
<distributionDirectory>
/var/www/html/builds/
</distributionDirectory>
-
<repository>
-
<connection>
cvs:pserver:anoncvs@cvs.dev.java.net:/cvs:dbpirate
</connection>
-
<url>
https://dbpirate.dev.java.net/source/browse/dbpirate/DBPirate/
</url>
</repository>
-
<versions>
-
<version>
<id>1.0a</id>
<name>1.0a</name>
<tag>DBPirate v1.0a</tag>
</version>
-
<version>
<id>1.0a</id>
<name>1.0a</name>
<tag>HEAD</tag>
</version>
</versions>
-
<mailingLists>
-
<mailingList>
<name>DBPirate User List</name>
<subscribe>
announce@dbpirate.dev.java.net
</subscribe>
<unsubscribe>
users-unsubscribe@maven.apache.org
</unsubscribe>
-
<archive>
http://www.mail-archive.com/users@maven.apache.org/
</archive>
</mailingList>
-
<mailingList>
<name>Maven Developer List</name>
<subscribe>
dev-subscribe@maven.apache.org
</subscribe>
<unsubscribe>
dev-unsubscribe@maven.apache.org
</unsubscribe>
-
<archive>
http://www.mail-archive.com/dev@maven.apache.org/
</archive>
</mailingList>
</mailingLists>
-
<developers>
-
<developer>
<name>David Whitehurst</name>
<id>piratepete</id>
<email>piratepete@dev.java.net</email>
<organization/>
</developer>
-
<developer>
<name>Jeremy Whitlock</name>
<id>jcscoobyrs</id>
<email>jcscoobyrs@dev.java.net</email>
<organization/>
</developer>
</developers>
-
<dependencies>
-
<dependency>
<groupId/>
<artifactId/>
<version/>
<url/>
</dependency>
</dependencies>
-
<build>
<nagEmailAddress>
dev@dbpirate.dev.java.net
</nagEmailAddress>
<sourceDirectory>/src</sourceDirectory>
<unitTestSourceDirectory/>
<aspectSourceDirectory/>
<!-- Unit test cases -->
-
<unitTest>
-
<includes>
<include/>
</includes>
-
<excludes>
<exclude/>
</excludes>
</unitTest>
<!-- J A R R E S O U R C E S -->
-
<!--
Resources that are packaged up inside the JAR file
-->
-
<resources>
-
<resource>
<directory>${basedir}/lib</directory>
-
<includes>
<include>*.zip</include>
<include>*.jar</include>
</includes>
</resource>
</resources>
<!-- Integration unit test cases -->
<integrationUnitTest/>
<jars>
</jars>
</build>
</project>
Thanks for any help,
David
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Can't get project.xml to work ...
Posted by David Whitehurst <dl...@comcast.net>.
John:
Thanks. I got things to run. It didn't pick up my source and compile,
but it did find e.g. the jdom.jar I went to their site to get the
goodies and use in the dependency tag. I have to now figure why the JAR
got build with only my jars inside, the src did not compile nor did the
classes get built and put in the JAR. Anyhow, I am closer. I like what
Maven can do because we have a new Open Source project on java.net and I
want to do the Maven thing on my server and then mail a letter, with
links to the Maven reports daily. Excellent idea.
Thanks
David
John Casey wrote:
>You may need to read a little more in-depth on the maven purpose. The
>idea is that everything in your /lib directory will not actually be
>stored with your project, at least w.r.t. version management. Instead,
>these dependency libraries should be maintained in a central repository
>(or set of repositories...), where the owner of each project can post
>his/her artifacts (jars, etc.) for all to use. Then, when you use maven
>to build your project, it will pick up the information on each
>dependency (from the <dependencies/> element structure), download it,
>and add it to the build classpath. When you use maven to build a binary
>distribution, it will bundle these jars with the rest.
>
>I really can't do justice to the elegance of this system, though.
>Reading the docs (don't forget the WIKI...it's pretty important, too) is
>really the only way to properly understand the goals of maven. It is not
>simply a drop-in replacement for Ant; it encapsulates and enforces a lot
>more of the best practices out there for maintaining working codebases.
>At first it may seem hard to get the hang of, but once you do you'll
>probably realize like most of the rest of us that this thing is pretty
>revolutionary...
>
>Cheers,
>john
>
>On Sun, 2004-01-25 at 23:02, David Whitehurst wrote:
>
>
>>I'm confused, what does my project depend on other than the JAR's that
>>are in my /lib folder, but that's on CVS too along with /src. Am I
>>supposed to be looking for the java sdk jar? I only depend on the /lib
>>jars and the /conf folder, but each are on CVS, where would I download
>>that from? I'm really confused now.
>>
>>
>>David
>>
>>John Casey wrote:
>>
>>
>>
>>><snip>
>>>
>>>
>>>
>>>
>>>> <dependencies>
>>>>-
>>>> <dependency>
>>>><groupId/>
>>>><artifactId/>
>>>><version/>
>>>><url/>
>>>></dependency>
>>>></dependencies>
>>>>
>>>>
>>>>
>>>>
>>></snip>
>>>
>>>This would do the trick...this is actually a section in which you're
>>>supposed to list the dependencies upon which your
>>>project...well...depends. As such, it should be a set of entries that
>>>look something like this:
>>>
>>><dependency>
>>> <groupId>commons-jelly</groupId>
>>> <artifactId>common-jelly-tags-xml</artifactId>
>>> <version>20030211.142729</version>
>>></dependency>
>>>
>>>or some such. The group id is a grouping mechanism, which helps to
>>>determine the directory structure on the remote repository where the
>>>dependency jar can be downloaded. The artifact id is the the name of the
>>>jar file itself, minus the version and the '.jar' suffix. The above
>>>specification would translate to the following download URL on the
>>>remote repository:
>>>
>>>http://the.remote.repository.url/base/path/commons-jelly/jars/commons-jelly-tags-xml-20030211.142729.jar
>>>
>>>Leaving any of the above element bodies empty will no doubt result in a
>>>NPE, since there is literally no value for something that expects one.
>>>
>>>Hope that helps.
>>>
>>>-john
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Can't get project.xml to work ...
Posted by John Casey <jd...@commonjava.org>.
You may need to read a little more in-depth on the maven purpose. The
idea is that everything in your /lib directory will not actually be
stored with your project, at least w.r.t. version management. Instead,
these dependency libraries should be maintained in a central repository
(or set of repositories...), where the owner of each project can post
his/her artifacts (jars, etc.) for all to use. Then, when you use maven
to build your project, it will pick up the information on each
dependency (from the <dependencies/> element structure), download it,
and add it to the build classpath. When you use maven to build a binary
distribution, it will bundle these jars with the rest.
I really can't do justice to the elegance of this system, though.
Reading the docs (don't forget the WIKI...it's pretty important, too) is
really the only way to properly understand the goals of maven. It is not
simply a drop-in replacement for Ant; it encapsulates and enforces a lot
more of the best practices out there for maintaining working codebases.
At first it may seem hard to get the hang of, but once you do you'll
probably realize like most of the rest of us that this thing is pretty
revolutionary...
Cheers,
john
On Sun, 2004-01-25 at 23:02, David Whitehurst wrote:
> I'm confused, what does my project depend on other than the JAR's that
> are in my /lib folder, but that's on CVS too along with /src. Am I
> supposed to be looking for the java sdk jar? I only depend on the /lib
> jars and the /conf folder, but each are on CVS, where would I download
> that from? I'm really confused now.
>
>
> David
>
> John Casey wrote:
>
> ><snip>
> >
> >
> >> <dependencies>
> >>-
> >> <dependency>
> >><groupId/>
> >><artifactId/>
> >><version/>
> >><url/>
> >></dependency>
> >></dependencies>
> >>
> >>
> ></snip>
> >
> >This would do the trick...this is actually a section in which you're
> >supposed to list the dependencies upon which your
> >project...well...depends. As such, it should be a set of entries that
> >look something like this:
> >
> ><dependency>
> > <groupId>commons-jelly</groupId>
> > <artifactId>common-jelly-tags-xml</artifactId>
> > <version>20030211.142729</version>
> ></dependency>
> >
> >or some such. The group id is a grouping mechanism, which helps to
> >determine the directory structure on the remote repository where the
> >dependency jar can be downloaded. The artifact id is the the name of the
> >jar file itself, minus the version and the '.jar' suffix. The above
> >specification would translate to the following download URL on the
> >remote repository:
> >
> >http://the.remote.repository.url/base/path/commons-jelly/jars/commons-jelly-tags-xml-20030211.142729.jar
> >
> >Leaving any of the above element bodies empty will no doubt result in a
> >NPE, since there is literally no value for something that expects one.
> >
> >Hope that helps.
> >
> >-john
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Can't get project.xml to work ...
Posted by David Whitehurst <dl...@comcast.net>.
I'm confused, what does my project depend on other than the JAR's that
are in my /lib folder, but that's on CVS too along with /src. Am I
supposed to be looking for the java sdk jar? I only depend on the /lib
jars and the /conf folder, but each are on CVS, where would I download
that from? I'm really confused now.
David
John Casey wrote:
><snip>
>
>
>> <dependencies>
>>-
>> <dependency>
>><groupId/>
>><artifactId/>
>><version/>
>><url/>
>></dependency>
>></dependencies>
>>
>>
></snip>
>
>This would do the trick...this is actually a section in which you're
>supposed to list the dependencies upon which your
>project...well...depends. As such, it should be a set of entries that
>look something like this:
>
><dependency>
> <groupId>commons-jelly</groupId>
> <artifactId>common-jelly-tags-xml</artifactId>
> <version>20030211.142729</version>
></dependency>
>
>or some such. The group id is a grouping mechanism, which helps to
>determine the directory structure on the remote repository where the
>dependency jar can be downloaded. The artifact id is the the name of the
>jar file itself, minus the version and the '.jar' suffix. The above
>specification would translate to the following download URL on the
>remote repository:
>
>http://the.remote.repository.url/base/path/commons-jelly/jars/commons-jelly-tags-xml-20030211.142729.jar
>
>Leaving any of the above element bodies empty will no doubt result in a
>NPE, since there is literally no value for something that expects one.
>
>Hope that helps.
>
>-john
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Can't get project.xml to work ...
Posted by John Casey <jd...@commonjava.org>.
<snip>
> <dependencies>
> -
> <dependency>
> <groupId/>
> <artifactId/>
> <version/>
> <url/>
> </dependency>
> </dependencies>
</snip>
This would do the trick...this is actually a section in which you're
supposed to list the dependencies upon which your
project...well...depends. As such, it should be a set of entries that
look something like this:
<dependency>
<groupId>commons-jelly</groupId>
<artifactId>common-jelly-tags-xml</artifactId>
<version>20030211.142729</version>
</dependency>
or some such. The group id is a grouping mechanism, which helps to
determine the directory structure on the remote repository where the
dependency jar can be downloaded. The artifact id is the the name of the
jar file itself, minus the version and the '.jar' suffix. The above
specification would translate to the following download URL on the
remote repository:
http://the.remote.repository.url/base/path/commons-jelly/jars/commons-jelly-tags-xml-20030211.142729.jar
Leaving any of the above element bodies empty will no doubt result in a
NPE, since there is literally no value for something that expects one.
Hope that helps.
-john
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Can't get project.xml to work ...
Posted by Tim Reilly <ti...@consultant.com>.
I'm a newbie myself, but I've generated the same error when my depencies
were not right.
<dependency>
<groupId/>
<artifactId/>
<version/>
<url/>
</dependency>
should not be empty, I believe.
hth
> -----Original Message-----
> From: David Whitehurst [mailto:dlwhitehurst@comcast.net]
> Sent: Sunday, January 25, 2004 9:26 PM
> To: users@maven.apache.org
> Subject: Can't get project.xml to work ...
>
>
> Hi:
>
> I installed maven, point to /bin and MAVEN_HOME is there too. I can run
> "maven test' it downloads a bunch of things, but creates no classes or
> docs, just folders in target dir.
>
> I setup a project.xml in my workspace/DBPirate dir for my project. When
> I run I keep getting the following error:
>
> java.lang.NullPointerException
> at
> org.apache.maven.project.Project.standardToLegacyId(Project.java:1566
>
> I changed the project name, and the cvs point, because my project is on
> java.net at /cvs level but the project is actually at
> /cvs/dbpirate/DBPirate because my web is at /cvs/dbpirate/www.
>
> I use no JUnit yet, but I installed that too.
>
> Anyhow, heres my project.xml ... I'm stumped.
>
> <project>
> <pomVersion>1</pomVersion>
> <name>dbpirate</name>
> <id>dbpirate</id>
> <currentVersion>1.0a</currentVersion>
> -
> <organization>
> <name>PiratePete Software Group</name>
> <url>http://www.piratepetesoftware.com/</url>
> </organization>
> <inceptionYear>2003</inceptionYear>
> <package>com.piratepete.dbpirate</package>
> -
> <shortDescription>
> DBPirate is a Multi-Database Query and Browsing Tool
> </shortDescription>
> <!-- Gump integration -->
> <gumpRepositoryId/>
> <description>
> Later a description will be provided.
> </description>
> <url>https://dbpirate.dev.java.net/</url>
> <issueTrackingUrl>
>
> </issueTrackingUrl>
> <siteAddress>localhost</siteAddress>
> <siteDirectory>
> /var/www/html/maven/
> </siteDirectory>
> <distributionDirectory>
> /var/www/html/builds/
> </distributionDirectory>
> -
> <repository>
> -
> <connection>
>
> cvs:pserver:anoncvs@cvs.dev.java.net:/cvs:dbpirate
>
> </connection>
> -
> <url>
>
> https://dbpirate.dev.java.net/source/browse/dbpirate/DBPirate/
>
> </url>
> </repository>
> -
> <versions>
> -
> <version>
> <id>1.0a</id>
> <name>1.0a</name>
> <tag>DBPirate v1.0a</tag>
> </version>
> -
> <version>
> <id>1.0a</id>
> <name>1.0a</name>
> <tag>HEAD</tag>
> </version>
> </versions>
> -
> <mailingLists>
> -
> <mailingList>
> <name>DBPirate User List</name>
> <subscribe>
> announce@dbpirate.dev.java.net
> </subscribe>
> <unsubscribe>
> users-unsubscribe@maven.apache.org
> </unsubscribe>
> -
> <archive>
>
> http://www.mail-archive.com/users@maven.apache.org/
>
> </archive>
> </mailingList>
> -
> <mailingList>
> <name>Maven Developer List</name>
> <subscribe>
> dev-subscribe@maven.apache.org
> </subscribe>
> <unsubscribe>
> dev-unsubscribe@maven.apache.org
> </unsubscribe>
> -
> <archive>
>
> http://www.mail-archive.com/dev@maven.apache.org/
>
> </archive>
> </mailingList>
> </mailingLists>
> -
> <developers>
> -
> <developer>
> <name>David Whitehurst</name>
> <id>piratepete</id>
> <email>piratepete@dev.java.net</email>
> <organization/>
> </developer>
> -
> <developer>
> <name>Jeremy Whitlock</name>
> <id>jcscoobyrs</id>
> <email>jcscoobyrs@dev.java.net</email>
> <organization/>
> </developer>
> </developers>
> -
> <dependencies>
> -
> <dependency>
> <groupId/>
> <artifactId/>
> <version/>
> <url/>
> </dependency>
> </dependencies>
> -
> <build>
> <nagEmailAddress>
> dev@dbpirate.dev.java.net
> </nagEmailAddress>
> <sourceDirectory>/src</sourceDirectory>
> <unitTestSourceDirectory/>
> <aspectSourceDirectory/>
> <!-- Unit test cases -->
> -
> <unitTest>
> -
> <includes>
> <include/>
> </includes>
> -
> <excludes>
> <exclude/>
> </excludes>
> </unitTest>
> <!-- J A R R E S O U R C E S -->
> -
> <!--
> Resources that are packaged up inside the JAR file
> -->
> -
> <resources>
> -
> <resource>
> <directory>${basedir}/lib</directory>
> -
> <includes>
> <include>*.zip</include>
> <include>*.jar</include>
> </includes>
> </resource>
> </resources>
> <!-- Integration unit test cases -->
> <integrationUnitTest/>
> <jars>
> </jars>
> </build>
> </project>
>
> Thanks for any help,
>
> David
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org