You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ashley Williams <ag...@mac.com> on 2005/09/21 17:47:43 UTC
[m2] changing target directory
I'm trying to change the name and location of the target directory
but not quite sure which pom tag controls it. I did try:
<directory>../output</directory>
ie create the directory one parent higher and call it output instead
of target. This resulted in an artifact jar file under the ../output
directory so I was pleased about that, _but_ I still got a generated
target/ directory as per usual with the class files under there.
The pom descriptor docs state that:
"directory - The directory where all files generated by the build is
placed.", which doesn't seem to be verified by my test. Any ideas
whether this might be a bug??
Thanks
AW
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] changing target directory
Posted by John Casey <jd...@commonjava.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
this is a bug where interpolated expressions are not used by default for
the POM defaults that nest inside one another. For example, directory is
specified by default as "/target" but outputDirectory is specified as
"/target/classes" instead of "${build.directory}/classes". There is a
JIRA filed to fix this, but I forget the issue number. It's on the
roadmap for -beta-2, though.
- -john
Ashley Williams wrote:
| I'm trying to change the name and location of the target directory but
| not quite sure which pom tag controls it. I did try:
|
| <directory>../output</directory>
|
| ie create the directory one parent higher and call it output instead of
| target. This resulted in an artifact jar file under the ../output
| directory so I was pleased about that, _but_ I still got a generated
| target/ directory as per usual with the class files under there.
|
| The pom descriptor docs state that:
|
| "directory - The directory where all files generated by the build is
| placed.", which doesn't seem to be verified by my test. Any ideas
| whether this might be a bug??
|
| Thanks
| AW
|
| ---------------------------------------------------------------------
| To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
| For additional commands, e-mail: users-help@maven.apache.org
|
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
iD8DBQFDMYb+K3h2CZwO/4URAi9RAJ9Y7sDhHGGIVwohLDkdu0POzp/9GQCgkOiA
UODOw2p9DtenjdlCUT2QFsM=
=RvmU
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] changing target directory
Posted by Jesse McConnell <je...@gmail.com>.
keep in mind that ../ will be evaluated from wherever you are executing
this..
so if you have a root pom and execute from there then you'll probably end up
putting it someplace other then you think it should be going..
if you need to do that you might want to do $[basedir}/../output maybe...
at least that is what I have seen doing that kinda stuff in the past.
Jesse
On 9/21/05, Ashley Williams <ag...@mac.com> wrote:
>
> Yes, class files went under target/classes. Here are the results of
> m2 install:
>
> Compiling 1 source file to /Users/ashley/projects/proj1/single-source/
> com/acme/util/target/classes
> [INFO] [resources:testResources]
> [INFO] [compiler:testCompile]
> [INFO] No sources to compile
> [INFO] [surefire:test]
> [INFO] Setting reports dir: /Users/ashley/projects/proj1/single-
> source/com/acme/util/../output/surefire-reports
>
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> There are no test to run.
>
> Results :
> [surefire] Tests run: 0, Failures: 0, Errors: 0
>
> [INFO] [jar:jar]
> [INFO] Building jar: /Users/ashley/projects/proj1/single-source/com/
> acme/util/../output/util-1.0-SNAPSHOT.jar
> [INFO] [install:install]
> [INFO] Installing /Users/ashley/projects/proj1/single-source/com/acme/
> util/../output/util-1.0-SNAPSHOT.jar to /Users/ashley/
>
>
> and here is my pom:
>
> project>
> <modelVersion>4.0.0</modelVersion>
> <groupId>com.acme</groupId>
> <artifactId>util</artifactId>
> <packaging>jar</packaging>
> <version>1.0-SNAPSHOT</version>
> <name>Acme util artifact</name>
> <build>
> <sourceDirectory>.</sourceDirectory>
> <directory>../output</directory>
> </build>
> </project>
>
> The pom.xml file is located in with the java source files ie at com/
> acme/util/pom.xml
>
>
> On 21 Sep 2005, at 16:50, Kenney Westerhof wrote:
>
> > On Wed, 21 Sep 2005, Ashley Williams wrote:
> >
> > Yes, this sounds like a bug. Is it the output of the compiler plugin
> > i.e. target/classes/ ?
> >
> >
> >> I'm trying to change the name and location of the target directory
> >> but not quite sure which pom tag controls it. I did try:
> >>
> >> <directory>../output</directory>
> >>
> >> ie create the directory one parent higher and call it output instead
> >> of target. This resulted in an artifact jar file under the ../output
> >> directory so I was pleased about that, _but_ I still got a generated
> >> target/ directory as per usual with the class files under there.
> >>
> >> The pom descriptor docs state that:
> >>
> >> "directory - The directory where all files generated by the build is
> >> placed.", which doesn't seem to be verified by my test. Any ideas
> >> whether this might be a bug??
> >>
> >> Thanks
> >> AW
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
> > --
> > Kenney Westerhof
> > http://www.neonics.com
> > GPG public key: http://www.gods.nl/~forge/kenneyw.key
> >
> > ---------------------------------------------------------------------
> > 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
>
>
--
jesse mcconnell
Re: [m2] changing target directory
Posted by Ashley Williams <ag...@mac.com>.
Yes, class files went under target/classes. Here are the results of
m2 install:
Compiling 1 source file to /Users/ashley/projects/proj1/single-source/
com/acme/util/target/classes
[INFO] [resources:testResources]
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] Setting reports dir: /Users/ashley/projects/proj1/single-
source/com/acme/util/../output/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no test to run.
Results :
[surefire] Tests run: 0, Failures: 0, Errors: 0
[INFO] [jar:jar]
[INFO] Building jar: /Users/ashley/projects/proj1/single-source/com/
acme/util/../output/util-1.0-SNAPSHOT.jar
[INFO] [install:install]
[INFO] Installing /Users/ashley/projects/proj1/single-source/com/acme/
util/../output/util-1.0-SNAPSHOT.jar to /Users/ashley/
and here is my pom:
project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.acme</groupId>
<artifactId>util</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>Acme util artifact</name>
<build>
<sourceDirectory>.</sourceDirectory>
<directory>../output</directory>
</build>
</project>
The pom.xml file is located in with the java source files ie at com/
acme/util/pom.xml
On 21 Sep 2005, at 16:50, Kenney Westerhof wrote:
> On Wed, 21 Sep 2005, Ashley Williams wrote:
>
> Yes, this sounds like a bug. Is it the output of the compiler plugin
> i.e. target/classes/ ?
>
>
>> I'm trying to change the name and location of the target directory
>> but not quite sure which pom tag controls it. I did try:
>>
>> <directory>../output</directory>
>>
>> ie create the directory one parent higher and call it output instead
>> of target. This resulted in an artifact jar file under the ../output
>> directory so I was pleased about that, _but_ I still got a generated
>> target/ directory as per usual with the class files under there.
>>
>> The pom descriptor docs state that:
>>
>> "directory - The directory where all files generated by the build is
>> placed.", which doesn't seem to be verified by my test. Any ideas
>> whether this might be a bug??
>>
>> Thanks
>> AW
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
> --
> Kenney Westerhof
> http://www.neonics.com
> GPG public key: http://www.gods.nl/~forge/kenneyw.key
>
> ---------------------------------------------------------------------
> 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: [m2] changing target directory
Posted by Kenney Westerhof <ke...@apache.org>.
On Wed, 21 Sep 2005, Ashley Williams wrote:
Yes, this sounds like a bug. Is it the output of the compiler plugin
i.e. target/classes/ ?
> I'm trying to change the name and location of the target directory
> but not quite sure which pom tag controls it. I did try:
>
> <directory>../output</directory>
>
> ie create the directory one parent higher and call it output instead
> of target. This resulted in an artifact jar file under the ../output
> directory so I was pleased about that, _but_ I still got a generated
> target/ directory as per usual with the class files under there.
>
> The pom descriptor docs state that:
>
> "directory - The directory where all files generated by the build is
> placed.", which doesn't seem to be verified by my test. Any ideas
> whether this might be a bug??
>
> Thanks
> AW
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org