You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by tbar0711 <th...@kaufland.de> on 2009/10/06 17:45:12 UTC

Maven2 Pom Configuration

Hi there,

I actually have 2 Maven Projects in Eclipse. The one contains JUnit Tests
(let's call it Test). The other (let's call it Core) contains session beans,
entities etc. (everything that has to be tested by the JUnit Tests).

In my Test project I have added a source folder named bootstrap to the build
path. Also I have got a user library with some jars. In my build path I have
defined a reference to the Core project (required project on the build path
in Projects).

All tests are successful (green). Everything's all right.

Now I don't want to use my user library any more. I want to realize it via
Maven Dependencies. I already put the jars as Maven Dependencies into my pom
file and they are all available. 

If I start my JUnit tests with mvn test within my console I get some errors.
The reason for this I think is that I have to inform Maven about my source
folder bootstrap and the reference to the Core project. Exactly this is my
problem.

What I have to write into my pom file to inform Maven about my source folder
and the reference to the Core project?

Thanks in advance.

Kindly regards
Tom
-- 
View this message in context: http://www.nabble.com/Maven2-Pom-Configuration-tp25771284p25771284.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven2 Pom Configuration

Posted by Barrie Treloar <ba...@gmail.com>.
On Wed, Oct 7, 2009 at 3:00 AM, Entner Harald <En...@afb.de> wrote:
> You can use the build-helper-maven-plugin to add additional source folders.
[del]
> -----Ursprüngliche Nachricht-----
> Von: tbar0711 [mailto:thomas.bartsch@kaufland.de]
> Gesendet: Dienstag, 6. Oktober 2009 17:45
> An: users@maven.apache.org
[del]

> In my Test project I have added a source folder named bootstrap to the build
> path. Also I have got a user library with some jars. In my build path I have
> defined a reference to the Core project (required project on the build path
> in Projects).
>

Alternatively move the stuff in your bootstrap folder into a directory
maven knows about?

What is in this folder?
Based on the answer choose one of the following:

src/main/java - your java code
src/main/resources - the resources on the classpath that your java code needs.

src/test/java - your test java code
src/test/resources - the resources on the test classpath that your
test java code needs.

I suspect that you want src/test/resources

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


AW: Maven2 Pom Configuration

Posted by Entner Harald <En...@afb.de>.
You can use the build-helper-maven-plugin to add additional source folders.

e.g. 

<plugin>
	<groupId>org.codehaus.mojo</groupId>
	<artifactId>build-helper-maven-plugin</artifactId>
	<version>1.3</version>
	<executions>
		<execution>
			<id>add-source</id>
			<phase>generate-sources</phase>
			<goals>
				<goal>add-source</goal>
			</goals>
			<configuration>
				<sources>
					<source>target/generated-sources/generated</source>
				</sources>
			</configuration>
		</execution>
	</executions>
</plugin>

with regards,

harald 

-----Ursprüngliche Nachricht-----
Von: tbar0711 [mailto:thomas.bartsch@kaufland.de] 
Gesendet: Dienstag, 6. Oktober 2009 17:45
An: users@maven.apache.org
Betreff: Maven2 Pom Configuration


Hi there,

I actually have 2 Maven Projects in Eclipse. The one contains JUnit Tests
(let's call it Test). The other (let's call it Core) contains session beans,
entities etc. (everything that has to be tested by the JUnit Tests).

In my Test project I have added a source folder named bootstrap to the build
path. Also I have got a user library with some jars. In my build path I have
defined a reference to the Core project (required project on the build path
in Projects).

All tests are successful (green). Everything's all right.

Now I don't want to use my user library any more. I want to realize it via
Maven Dependencies. I already put the jars as Maven Dependencies into my pom
file and they are all available. 

If I start my JUnit tests with mvn test within my console I get some errors.
The reason for this I think is that I have to inform Maven about my source
folder bootstrap and the reference to the Core project. Exactly this is my
problem.

What I have to write into my pom file to inform Maven about my source folder
and the reference to the Core project?

Thanks in advance.

Kindly regards
Tom
-- 
View this message in context: http://www.nabble.com/Maven2-Pom-Configuration-tp25771284p25771284.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
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