You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Michael Hüttermann <mi...@huettermann.net> on 2008/10/07 14:37:29 UTC
Installing a checked-out JAR, not the packaged one
Hello experts,
during a build lifecycle I want to checkout a whole eclipse project from
SVN which also contains an already available and packaged JAR. I copy this
JAR from outside the checkout-directory to the root of my Maven project.
This copied jar must be distributed by install/deploy. The Maven project
itself neither contains business classes nor contains test classes, it is
just a wrapper for the checked-out JAR. How would you archieve this?
One try you can see below. The checked-out JAR is placed correctly to the
root folder of my Maven project but the wrong jar is installed. "mvn
install" installs the empty jar (the project has no classes) describing my
Maven project itself. Why? How can I install/deploy the final checked-out
JAR (only)? Thanks !!!!
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<artifactId>abc</artifactId>
<packaging>pom</packaging>
<version>0.0.1-SNAPSHOT</version>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<finalName>todelete</finalName>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<executions>
<execution>
<phase>compile</phase>
<configuration>
<connectionUrl>check the eclipse project out
...</connectionUrl>
<scmVersion>...</scmVersion>
<scmVersionType>...</scmVersionType>
</configuration>
<goals>
<goal>checkout</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<configuration>
<tasks>
<echo>copy just the jar from outside the checkout-folder
to the Maven-project root directory</echo>
<copy .../>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Thanks !!!!
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Installing a checked-out JAR, not the packaged one
Posted by Heinrich Nirschl <he...@gmail.com>.
On Tue, Oct 7, 2008 at 9:25 PM, Michael Hüttermann
<mi...@huettermann.net> wrote:
> Thanks! Isn't there any way to jump into the lifecycle and prevent Maven
> to deploy the packaged jar ?? Or: to prevent Maven to package the jar?
>
As far as I know, the "pom" lifecycle does not have plugins bound to
phases. So you could change the packaging type of the module to pom
and bind the plugins you want to run explicitly. You´ll probably have
to experiment a bit but I think it might work.
Btw. is this jar some sort of library (in that case it is better to
deploy it to a repository) or is it built by eclipse? In the latter
case you should consider to let maven compile the classes and assemble
the jar. This leads to more reproducible results.
Henry
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Installing a checked-out JAR, not the packaged one
Posted by Michael Hüttermann <mi...@huettermann.net>.
I setup a comprehensive integration build. One part of it is retrieving
some legacy artifacts (which are not Maven-enabled) and deploy them into a
proxy repository. I do not want to do this only a single time by hand, I
want to do this continuously as part of the reproducable full-fledged
enterprise build. Checking out the legacy artifact from SVN and all this
stuff is pretty generic. Is this so odd? Would you deploy them one after
the other by hand nevertheless?
Michael
> There may be a way to accomplish this, but this is simply not a use
> case I've ever encountered myself, so I have no idea if its possible
> or how to do so.
>
> To be honest, I don't understand your use case here either. I would
> probably use install:install-file and deploy:deploy-file rather than
> what you are attempting.
>
> Wayne
>
> On Tue, Oct 7, 2008 at 12:25 PM, Michael Hüttermann
> <mi...@huettermann.net> wrote:
>> Thanks! Isn't there any way to jump into the lifecycle and prevent Maven
>> to deploy the packaged jar ?? Or: to prevent Maven to package the jar?
>>
>>
>>
>>> Use build-helper plugin to attach the checked-out jar to your build,
>>> so it is installed and deployed alongside other artifacts.
>>>
>>> This will not, however, prevent Maven from deploying your packaged jar
>>> as
>>> well.
>>>
>>> Wayne
>>>
>>> On Tue, Oct 7, 2008 at 5:37 AM, Michael Hüttermann
>>> <mi...@huettermann.net> wrote:
>>>> Hello experts,
>>>>
>>>> during a build lifecycle I want to checkout a whole eclipse project
>>>> from
>>>> SVN which also contains an already available and packaged JAR. I copy
>>>> this
>>>> JAR from outside the checkout-directory to the root of my Maven
>>>> project.
>>>> This copied jar must be distributed by install/deploy. The Maven
>>>> project
>>>> itself neither contains business classes nor contains test classes, it
>>>> is
>>>> just a wrapper for the checked-out JAR. How would you archieve this?
>>>>
>>>> One try you can see below. The checked-out JAR is placed correctly to
>>>> the
>>>> root folder of my Maven project but the wrong jar is installed. "mvn
>>>> install" installs the empty jar (the project has no classes)
>>>> describing
>>>> my
>>>> Maven project itself. Why? How can I install/deploy the final
>>>> checked-out
>>>> JAR (only)? Thanks !!!!
>>>>
>>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>>>> http://maven.apache.org/maven-v4_0_0.xsd"
>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>>>> <modelVersion>4.0.0</modelVersion>
>>>> <artifactId>abc</artifactId>
>>>> <packaging>pom</packaging>
>>>> <version>0.0.1-SNAPSHOT</version>
>>>>
>>>> <build>
>>>> <pluginManagement>
>>>> <plugins>
>>>> <plugin>
>>>> <groupId>org.apache.maven.plugins</groupId>
>>>> <artifactId>maven-jar-plugin</artifactId>
>>>> <configuration>
>>>> <finalName>todelete</finalName>
>>>> </configuration>
>>>> </plugin>
>>>> <plugin>
>>>> <groupId>org.apache.maven.plugins</groupId>
>>>> <artifactId>maven-scm-plugin</artifactId>
>>>> <executions>
>>>> <execution>
>>>> <phase>compile</phase>
>>>> <configuration>
>>>> <connectionUrl>check the eclipse project out
>>>> ...</connectionUrl>
>>>> <scmVersion>...</scmVersion>
>>>> <scmVersionType>...</scmVersionType>
>>>> </configuration>
>>>> <goals>
>>>> <goal>checkout</goal>
>>>> </goals>
>>>> </execution>
>>>> </executions>
>>>> </plugin>
>>>> <plugin>
>>>> <groupId>org.apache.maven.plugins</groupId>
>>>> <artifactId>maven-antrun-plugin</artifactId>
>>>> <executions>
>>>> <execution>
>>>> <phase>package</phase>
>>>> <configuration>
>>>> <tasks>
>>>> <echo>copy just the jar from outside the
>>>> checkout-folder
>>>> to the Maven-project root directory</echo>
>>>> <copy .../>
>>>> </tasks>
>>>> </configuration>
>>>> <goals>
>>>> <goal>run</goal>
>>>> </goals>
>>>> </execution>
>>>> </executions>
>>>> </plugin>
>>>> </plugins>
>>>> </pluginManagement>
>>>> </build>
>>>>
>>>> </project>
>>>>
>>>>
>>>>
>>>>
>>>> Thanks !!!!
>>>>
>>>> Michael
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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: Installing a checked-out JAR, not the packaged one
Posted by Wayne Fay <wa...@gmail.com>.
There may be a way to accomplish this, but this is simply not a use
case I've ever encountered myself, so I have no idea if its possible
or how to do so.
To be honest, I don't understand your use case here either. I would
probably use install:install-file and deploy:deploy-file rather than
what you are attempting.
Wayne
On Tue, Oct 7, 2008 at 12:25 PM, Michael Hüttermann
<mi...@huettermann.net> wrote:
> Thanks! Isn't there any way to jump into the lifecycle and prevent Maven
> to deploy the packaged jar ?? Or: to prevent Maven to package the jar?
>
>
>
>> Use build-helper plugin to attach the checked-out jar to your build,
>> so it is installed and deployed alongside other artifacts.
>>
>> This will not, however, prevent Maven from deploying your packaged jar as
>> well.
>>
>> Wayne
>>
>> On Tue, Oct 7, 2008 at 5:37 AM, Michael Hüttermann
>> <mi...@huettermann.net> wrote:
>>> Hello experts,
>>>
>>> during a build lifecycle I want to checkout a whole eclipse project from
>>> SVN which also contains an already available and packaged JAR. I copy
>>> this
>>> JAR from outside the checkout-directory to the root of my Maven project.
>>> This copied jar must be distributed by install/deploy. The Maven project
>>> itself neither contains business classes nor contains test classes, it
>>> is
>>> just a wrapper for the checked-out JAR. How would you archieve this?
>>>
>>> One try you can see below. The checked-out JAR is placed correctly to
>>> the
>>> root folder of my Maven project but the wrong jar is installed. "mvn
>>> install" installs the empty jar (the project has no classes) describing
>>> my
>>> Maven project itself. Why? How can I install/deploy the final
>>> checked-out
>>> JAR (only)? Thanks !!!!
>>>
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>>> http://maven.apache.org/maven-v4_0_0.xsd"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>>> <modelVersion>4.0.0</modelVersion>
>>> <artifactId>abc</artifactId>
>>> <packaging>pom</packaging>
>>> <version>0.0.1-SNAPSHOT</version>
>>>
>>> <build>
>>> <pluginManagement>
>>> <plugins>
>>> <plugin>
>>> <groupId>org.apache.maven.plugins</groupId>
>>> <artifactId>maven-jar-plugin</artifactId>
>>> <configuration>
>>> <finalName>todelete</finalName>
>>> </configuration>
>>> </plugin>
>>> <plugin>
>>> <groupId>org.apache.maven.plugins</groupId>
>>> <artifactId>maven-scm-plugin</artifactId>
>>> <executions>
>>> <execution>
>>> <phase>compile</phase>
>>> <configuration>
>>> <connectionUrl>check the eclipse project out
>>> ...</connectionUrl>
>>> <scmVersion>...</scmVersion>
>>> <scmVersionType>...</scmVersionType>
>>> </configuration>
>>> <goals>
>>> <goal>checkout</goal>
>>> </goals>
>>> </execution>
>>> </executions>
>>> </plugin>
>>> <plugin>
>>> <groupId>org.apache.maven.plugins</groupId>
>>> <artifactId>maven-antrun-plugin</artifactId>
>>> <executions>
>>> <execution>
>>> <phase>package</phase>
>>> <configuration>
>>> <tasks>
>>> <echo>copy just the jar from outside the
>>> checkout-folder
>>> to the Maven-project root directory</echo>
>>> <copy .../>
>>> </tasks>
>>> </configuration>
>>> <goals>
>>> <goal>run</goal>
>>> </goals>
>>> </execution>
>>> </executions>
>>> </plugin>
>>> </plugins>
>>> </pluginManagement>
>>> </build>
>>>
>>> </project>
>>>
>>>
>>>
>>>
>>> Thanks !!!!
>>>
>>> Michael
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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: Installing a checked-out JAR, not the packaged one
Posted by Michael Hüttermann <mi...@huettermann.net>.
Thanks! Isn't there any way to jump into the lifecycle and prevent Maven
to deploy the packaged jar ?? Or: to prevent Maven to package the jar?
> Use build-helper plugin to attach the checked-out jar to your build,
> so it is installed and deployed alongside other artifacts.
>
> This will not, however, prevent Maven from deploying your packaged jar as
> well.
>
> Wayne
>
> On Tue, Oct 7, 2008 at 5:37 AM, Michael Hüttermann
> <mi...@huettermann.net> wrote:
>> Hello experts,
>>
>> during a build lifecycle I want to checkout a whole eclipse project from
>> SVN which also contains an already available and packaged JAR. I copy
>> this
>> JAR from outside the checkout-directory to the root of my Maven project.
>> This copied jar must be distributed by install/deploy. The Maven project
>> itself neither contains business classes nor contains test classes, it
>> is
>> just a wrapper for the checked-out JAR. How would you archieve this?
>>
>> One try you can see below. The checked-out JAR is placed correctly to
>> the
>> root folder of my Maven project but the wrong jar is installed. "mvn
>> install" installs the empty jar (the project has no classes) describing
>> my
>> Maven project itself. Why? How can I install/deploy the final
>> checked-out
>> JAR (only)? Thanks !!!!
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>> http://maven.apache.org/maven-v4_0_0.xsd"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>> <modelVersion>4.0.0</modelVersion>
>> <artifactId>abc</artifactId>
>> <packaging>pom</packaging>
>> <version>0.0.1-SNAPSHOT</version>
>>
>> <build>
>> <pluginManagement>
>> <plugins>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-jar-plugin</artifactId>
>> <configuration>
>> <finalName>todelete</finalName>
>> </configuration>
>> </plugin>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-scm-plugin</artifactId>
>> <executions>
>> <execution>
>> <phase>compile</phase>
>> <configuration>
>> <connectionUrl>check the eclipse project out
>> ...</connectionUrl>
>> <scmVersion>...</scmVersion>
>> <scmVersionType>...</scmVersionType>
>> </configuration>
>> <goals>
>> <goal>checkout</goal>
>> </goals>
>> </execution>
>> </executions>
>> </plugin>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-antrun-plugin</artifactId>
>> <executions>
>> <execution>
>> <phase>package</phase>
>> <configuration>
>> <tasks>
>> <echo>copy just the jar from outside the
>> checkout-folder
>> to the Maven-project root directory</echo>
>> <copy .../>
>> </tasks>
>> </configuration>
>> <goals>
>> <goal>run</goal>
>> </goals>
>> </execution>
>> </executions>
>> </plugin>
>> </plugins>
>> </pluginManagement>
>> </build>
>>
>> </project>
>>
>>
>>
>>
>> Thanks !!!!
>>
>> Michael
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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: Installing a checked-out JAR, not the packaged one
Posted by Wayne Fay <wa...@gmail.com>.
Use build-helper plugin to attach the checked-out jar to your build,
so it is installed and deployed alongside other artifacts.
This will not, however, prevent Maven from deploying your packaged jar as well.
Wayne
On Tue, Oct 7, 2008 at 5:37 AM, Michael Hüttermann
<mi...@huettermann.net> wrote:
> Hello experts,
>
> during a build lifecycle I want to checkout a whole eclipse project from
> SVN which also contains an already available and packaged JAR. I copy this
> JAR from outside the checkout-directory to the root of my Maven project.
> This copied jar must be distributed by install/deploy. The Maven project
> itself neither contains business classes nor contains test classes, it is
> just a wrapper for the checked-out JAR. How would you archieve this?
>
> One try you can see below. The checked-out JAR is placed correctly to the
> root folder of my Maven project but the wrong jar is installed. "mvn
> install" installs the empty jar (the project has no classes) describing my
> Maven project itself. Why? How can I install/deploy the final checked-out
> JAR (only)? Thanks !!!!
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <modelVersion>4.0.0</modelVersion>
> <artifactId>abc</artifactId>
> <packaging>pom</packaging>
> <version>0.0.1-SNAPSHOT</version>
>
> <build>
> <pluginManagement>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-jar-plugin</artifactId>
> <configuration>
> <finalName>todelete</finalName>
> </configuration>
> </plugin>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-scm-plugin</artifactId>
> <executions>
> <execution>
> <phase>compile</phase>
> <configuration>
> <connectionUrl>check the eclipse project out
> ...</connectionUrl>
> <scmVersion>...</scmVersion>
> <scmVersionType>...</scmVersionType>
> </configuration>
> <goals>
> <goal>checkout</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-antrun-plugin</artifactId>
> <executions>
> <execution>
> <phase>package</phase>
> <configuration>
> <tasks>
> <echo>copy just the jar from outside the checkout-folder
> to the Maven-project root directory</echo>
> <copy .../>
> </tasks>
> </configuration>
> <goals>
> <goal>run</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </pluginManagement>
> </build>
>
> </project>
>
>
>
>
> Thanks !!!!
>
> Michael
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>