Artifact has not been packaged yet - maven-dependency-plugin - maven

When I build a multi module maven project(using mvn clean compile) where one dependency(part of the build reactor) is copied into another using dependency:copy, then maven complains with the below error.
Artifact has not been packaged yet. When used on reactor artifact, copy should be executed after packaging: see MDEP-187 is thrown
This is perfectly fine, Maven can't copy the dependent jar because it has not been packaged yet and the dependency has to be resolved from the local project and not from the repository.
Lets say project A is being copied into project B using the dependency:copy goal.
Now if I import the projects into eclipse,with the lifecycle mapping set in such a way that the maven-jar-plugin is executed on project A(which means that A is packaged), still project B complains with the same error. How can I get rid of this.I can't ignore dependency:copy in the m2e lifecycle as it's a crucial phase in the build.
ProjectA's pom file :
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>projecta</artifactId>
<packaging>jar</packaging>
<parent>
<groupId>com.coderplus.tests</groupId>
<artifactId>projectparent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<versionRange>[2.4,)</versionRange>
<goals>
<goal>jar</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Project B's pom file
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>projectb</artifactId>
<packaging>jar</packaging>
<parent>
<groupId>com.coderplus.tests</groupId>
<artifactId>projectparent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<id>copy-plugins</id>
<phase>compile</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>projecta</artifactId>
<version>${project.version}</version>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/classes/jars</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<versionRange>[2.8,)</versionRange>
<goals>
<goal>copy-dependecies</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute/>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
and the Parent pom wrapping these 2 modules
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.coderplus.tests</groupId>
<artifactId>projectparent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<modules>
<module>projecta</module>
<module>projectb</module>
</modules>
</project>
I need a ProjectB's jar to contain ProjectA's jar in the jars directory(This is required by a custom class-loader part of a home-grown framework)

With m2eclipse, the artifactItems or dependencies will be resolved to the outputDirectory of the corresponding workspace project if the Resolve dependencies from workspace Projects setting is turned on. This is the root cause for the error in my question.
I ended up forking the existing m2e configurator for this plugin so that it can fetch these dependencies/artifactItems from the respository instead of picking it from the workspace project's outputDirectories .
Though this works with few tests which I had done, it is pretty much a work in progress and in case someone wants to help or contribute, the GitHub URL is
https://github.com/coderplus/m2e-maven-dependency-plugin

Related

How to access a plugin in a maven child module from the parent module

I have a maven multi-module setup, which includes the fabric8 plugin in a profile defined in a child module to build a Docker image if the profile is active, see below
Root pom
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>root</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>control</name>
<packaging>pom</packaging>
<modules>
<module>parent</module>
<module>docker</module>
<module>...</module>
<module>...</module>
<module>...</module>
</modules>
</project>
Child pom
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>docker</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<profiles>
<profile>
<id>Docker</id>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.34.1</version>
<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-core</artifactId>
<version>${aws.version}</version>
</dependency>
</dependencies>
<configuration>
<registry>${aws.ecr.registry}</registry>
<images>
<image>
<name>${aws.ecr.registry}/${aws.ecr.repository}:${project.artifactId}-${project.version}</name>
<build>
<contextDir>${project.build.directory}/docker.tmp/</contextDir>
</build>
</image>
</images>
</configuration>
<executions>
<execution>
<id>docker-build</id>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
<execution>
<id>docker-push</id>
<phase>install</phase>
<goals>
<goal>push</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Runing a normal build, i.e. mvn clean install -PDocker completes successfully, but if I call one of the docker goals from the parent module directly, e.g. mvn -PDocker docker:help it fails with this error
No plugin found for prefix 'docker' in the current project and in the plugin groups
Running the same command from the docker directory completes successfully.
What changes are needed so the command completes successfully in the root directory?

maven Return code is: 409, ReasonPhrase: Conflict

I have problem to deploy my multi-module python project with following structure
parent pom.xml # common pom for others project
project/
pom.xml # project pom
common_features/
sub-project-1/pom.xml # sub project 1 pom
sub-project-2/pom.xml # sub project 2 pom
For deployment I use maven
Settings.xml
General maven setting use for build
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<!-- others options -->
<servers>
<server>
<id>artifacts-SNAPSHOTS</id>
<username>user</username>
<password>password</password>
</server>
</servers>
<!-- others options -->
</settings>
parent pom.xml
In this case we have the same URL for SNAPSHOT and RELEASE repository
<!-- others options -->
<groupId>com.project.common.group.id</groupId>
<artifactId>project-pom</artifactId>
<version>0.0.1</version>
<packaging>pom</packaging>
<!-- others options -->
<distributionManagement>
<repository>
<id>artifacts-RELEASES</id>
<url>${dist.repository.releases}</url>
</repository>
<snapshotRepository>
<id>artifacts-SNAPSHOTS</id>
<url>${dist.repository.snapshots}</url>
</snapshotRepository>
</distributionManagement>
<!-- others sections-->
<properties>
<dist.repository.releases>${artifacts.repository.url}</dist.repository.releases>
<dist.repository.snapshots>${artifacts.repository.url}</dist.repository.snapshots>
<artifacts.repository.url>https://domain/artifactory/mvn-repo-dev</artifacts.repository.url>
</properties>
project pom.xml
There you can see that project consists two modules
sub-project-1
sub-project-2
Parent is general parent.
Also I sue maven assembly plugin in order to deploy project into artifactory
<!-- anothers options -->
<parent>
<groupId>com.project.common.group.id</groupId>
<artifactId>project-pom</artifactId>
<version>0.0.1</version>
</parent>
<groupId>com.project.group.id</groupId>
<artifactId>project-pom</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>common_features/sub-project-1</module>
<module>common_features/sub-project-2</module>
</modules>
build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>deploy/artifact-description.xml</descriptor>
</descriptors>
<tarLongFileMode>posix</tarLongFileMode>
</configuration>
<executions>
<execution>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>2.6.1</version>
<inherited>false</inherited>
<executions>
<execution>
<id>build-info</id>
<goals>
<goal>publish</goal>
</goals>
<configuration>
<publisher>
<contextUrl>https://domain/artifactory</contextUrl>
<repoKey>mvn-repo-dev</repoKey>
<snapshotRepoKey>mvn-repo-dev</snapshotRepoKey>
<publishArtifacts>true</publishArtifacts>
<publishBuildInfo>true</publishBuildInfo>
<username>deployUser</username>
<password>deployPwd</password>
</publisher>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
artifact-description.xml
I want to deploy only some section therefore I define the following deployment file. With this I ensure that into package will be deploy only common features and project specific scripts/codes
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly- plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
<id>${distributionId}</id>
<formats>
<format>tar.gz</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<outputDirectory>project/${subProjectName}/</outputDirectory>
<directory>${basedir}/..</directory>
<fileMode>0755</fileMode>
<lineEnding>unix</lineEnding>
<includes>
<include>/*.*</include>
<include>/sub-${subProjectName}/*</include>
</includes>
<excludes>
<exclude>**/*.pyc</exclude>
<exclude>**/*.xls</exclude>
<exclude>**/*.xlsx</exclude>
<exclude>**/pom.xml</exclude>
<exclude>**/target</exclude>
<exclude>**/deploy</exclude>
<exclude>**/.venv</exclude>
</excludes>
</fileSet>
</fileSets>
</assembly>
sub-project-1 pom.xml
This is only simple pom without others plugins and build options
<parent>
<groupId>com.project.group.id</groupId>
<artifactId>project-pom</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<packaging>pom</packaging>
<groupId>com.project.group.id</groupId>
<artifactId>sub-project-1</artifactId>
<version>1.0.0-SNAPSHOT</version>
<properties>
<subProjectName>project-1</subProjectName>
</properties>
sub-project-2 pom.xml
The same pom.xml as for sub-project-1
<parent>
<groupId>com.project.group.id</groupId>
<artifactId>project-pom</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<packaging>pom</packaging>
<groupId>com.project.group.id</groupId>
<artifactId>sub-project-2</artifactId>
<version>1.0.0-SNAPSHOT</version>
<properties>
<subProjectName>project-2</subProjectName>
</properties>
Now I want to build and upload only sub-project-1 it into artifactory and therefore I will use the following maven command:
mvn -e -B -U -X clean deploy --projects :sub-project-1 -DskipIntegrationTests=false -DskipCoverageReport=false
But then following error occur:
Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: https://domain/artifactory/mvn-repo-dev/com/project/group/id/project/project-1/1.0.0-SNAPSHOT/sub-project-1-1.0.0-20190723.081454-1.pom. Return code is: 409, ReasonPhrase: Conflict.
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:627)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:541)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:523)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:517)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:497)
at org.eclipse.aether.transport.wagon.WagonTransporter$PutTaskRunner.run(WagonTransporter.java:644)
at org.eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.java:427)
at org.eclipse.aether.transport.wagon.WagonTransporter.put(WagonTransporter.java:410)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$PutTaskRunner.runTask(BasicRepositoryConnector.java:510)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
... 32 more
Now I am not sure what is wrong and I spend a lot of hours of investigation this issue but nothing found. Please do you have some suggestions what is wrong here? Thanks a lot
I found where is the problem. Within parent pom.xml there was the following plugin which change artifactId. I do not know why I got error 409 but finally this was a reason:
<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
<executions>
<execution>
<phase>pre-clean</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<source>
project.getModel().setArtifactId(project.properties["someProperty"].replaceAll('_',
'-'))
project.getArtifact().setArtifactId(project.properties["someProperty"].replaceAll('_',
'-'))
</source>
</configuration>
</execution>
</executions>
</plugin>

Deploying Ant-generated jar to Nexus using maven-deploy-plugin

I have a multi-module project with war and ear module. In war's pom I'm generating jar using maven-antrun-plugin. Now I'm trying to deploy that jar to my Nexus using maven-deploy-plugin.
Here's my war's pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.example</groupId>
<artifactId>test</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>test-war</artifactId>
<packaging>war</packaging>
<properties>
...
</properties>
<dependencies>
...
</dependencies>
<!-- <distributionManagement>
<repository>
<id>nexus-releases</id>
<url><nexus_releases_repo_url></url>
</repository>
<snapshotRepository>
<id>nexus-snapshots</id>
<url><nexus_snapshots_repo_url></url>
</snapshotRepository>
</distributionManagement> -->
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>ant-build</id>
<phase>prepare-package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<ant antfile="<path_to_build_xml>" target="run" />
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<executions>
<execution>
<id>deploy-file</id>
<phase>deploy</phase>
<goals>
<goal>deploy-file</goal>
</goals>
<configuration>
<repositoryId>nexus-snapshots</repositoryId>
<file>fileToDeploy.jar</file>
<url>http://<path_to_my_repo></url>
<groupId>${project.parent.groupId}</groupId>
<artifactId>${project.parent.artifactId}-tmp</artifactId>
<version>${project.parent.version}</version>
<packaging>jar</packaging>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
When I run clean deploy on parent pom, I'm getting the following error:
Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project test: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]
Ok, so I've added distributionManagement section in war's pom, but I'm getting the same error. If I run the same command on war module, there's no error, but there's also war file deployed on Nexus next to jar file.
Is there a way to deploy just jar file using deploy command?

How to share a filtered resource at generate-sources phase in a multi module project?

I have a parent project with 3 child projects:
parent
project-1
/src/main/resources/config.xml
project-2
/src/main/resources/config.xml
project-3
/src/main/resources/config.xml
The configuration config.xml is used during the generate-sources phase. For the three projects, the config.xml is exactly the same. However, the usage of this config.xml is different for each project.
In project-X, I am referring to config.xml as following:
<build>
<plugins>
<plugin>
<groupId>some-group</groupId>
<artifactId>some-artifact</artifactId>
<executions>
<execution>
<goals>
<goal>some-goal</goal>
</goals>
<configuration>
<input>src/main/resources/config.xml</input>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
What is the best way to share this common config.xml between all 3 projects?
You can use the build-helper-maven-plugin here.
PROJECT STRUCTURE
shared-resources-project
+-src
+-main
+-resources
`config.xml
+-project-A
`pom.xml
+-project-B
`pom.xml
+-project-C
`pom.xml
`pom.xml
shared-resources-project/pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>my</groupId>
<artifactId>shared-resources-project</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<modules>
<module>project-A</module>
<module>project-B</module>
<module>project-C</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.10</version>
<executions>
<execution>
<id>add-resource</id>
<phase>generate-sources</phase>
<goals>
<goal>add-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<filtering>true</filtering>
<directory>${project.parent.basedir}/src/main/resources</directory>
<includes>
<include>config.xml</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>some-group</groupId>
<artifactId>some-artifact</artifactId>
<executions>
<execution>
<id>some-plugin-job</id>
<phase>generate-sources</phase>
<goals>
<goal>some-goal</goal>
</goals>
<configuration>
<input>${project.build.outputDirectory}/config.xml</input>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
shared-resources-project/src/main/resources/config.xml
<config>
<parameter>${custom-value}</parameter>
</config>
project-X/pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>my</groupId>
<artifactId>shared-resources-project</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>project-X</artifactId>
<properties>
<custom-value>Project-X Value</custom-value>
</properties>
</project>
Now, let's build the project:
D:\workspaces> cd shared-resources-project
D:\workspaces\java\shared-resources-project> mvn clean install
Some notes:
The build-helper-maven-plugin will add the common config.xml file as a resource to Project-X.
Then the Maven resources plugin (MRP) will copy config.xml to the project output directory (target directory by default). During the copy, MRP will also replace ${custom-value} with the specific value provided by Project-X.
The final config.xml will be available to another plugin as long as the other plugin is bound to the generate-source phase AND its declaration appears AFTER the build-helper-maven-plugin declaration. Maven (3.0.4+ at least) calls the plugins in their order of apparition in the pom.xml.

Referring dependencies that don't yet exist in Maven

I need to install a whole bunch of 3rd party jar files in my local repository, using maven-install plugin. That part is done with the following pom:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sap</groupId>
<artifactId>sdk</artifactId>
<version>${sap.version}</version>
<build>
<plugins>
<plugin>
<groupId>com.soebes.maven.plugins</groupId>
<artifactId>iterator-maven-plugin</artifactId>
<version>0.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>iterator</goal>
</goals>
<configuration>
<items>
<item>cecore</item>
<item>cesession</item>
<item>celib</item>
</items>
<pluginExecutors>
<pluginExecutor>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.4</version>
</plugin>
<goal>install-file</goal>
<configuration>
<file>${bo.lib.dir}/#item#.jar</file>
<groupId>${sap.group}</groupId>
<artifactId>#item#</artifactId>
<version>${sap.version}</version>
<packaging>jar</packaging>
</configuration>
</pluginExecutor>
</pluginExecutors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<bo.lib.dir>C:\Program Files\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\java\lib</bo.lib.dir>
<sap.group>com.sap</sap.group>
<sap.artifact>sdk</sap.artifact>
<sap.version>4.1</sap.version>
</properties>
<packaging>pom</packaging>
In a nutshell, I'm looping through these three items (cecore,celib, and cesession) to perform the actual installation.
I would like to then add these three items as dependencies, but since these won't exist before the package phase, Maven complains about that.
Ideally, I would like to instruct Maven to resolve the dependencies after the packaging, or to instruct Maven to trust that the dependencies will in fact become available.
Any ideas/suggestions?
Thanks!
Eric

Resources