0

I had been searching for an answer to help me solve this issue but couldn't find one, maybe because I am a maven semi-beginner.

My case is as follows:

I have Eclipse and maven 3.1.1 installed with no additional plug-ins.

I had developed a project in eclipse (a plug-in development project) with defining a specific target platform. I wrote 3 java classes under one package and a pom.xml file, I saved the project and went to the command line and issued "mvn clean install" in the project directory, and it ran with no errors but one warning "[WARNING] No explicit target runtime environment configuration. Build is platform dependent"

my main problem is that I couldn't locate neither the target directory nor the generated jar files. Now my specific questions are:

1- I want to go to the target directory and copy the generated jar files to a specific location, how can I do this in the command line?? something like (cd /target) 2- is there another way to open the target directory from a windows explorer and copy the generated jar files??

my pom.xml is as follows

<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>sharjah.app</groupId>
<artifactId>Ali</artifactId>
<version>1.0.0-SNAPSHOT</version>
<description>Example Application</description>
<packaging>eclipse-plugin</packaging>
<name>Ali</name>


<properties>
    <tycho-version>0.17.0</tycho-version>
</properties>

<repositories>
  <repository>
    <id>dai-open</id>
    <url>http://repositories.dai-labor.de/extern/content/repositories/dai-open/</url>
  </repository>
  <repository>
    <id>dai-open-p2</id>
    <url>http://repositories.dai-labor.de/extern/content/unzip/p2-    releases/de/dailab/nessi/nessi.repository/2.1.1/nessi.repository-2.1.1.zip-unzip</url>
    <layout>p2</layout>
  </repository>
</repositories>

<build>
<plugins>
  <plugin>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>tycho-maven-plugin</artifactId>
    <version>${tycho-version}</version>
    <extensions>true</extensions>
  </plugin>
  <plugin>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>target-platform-configuration</artifactId>
    <version>${tycho-version}</version>
    <configuration>
      <target>
        <artifact>
        <groupId>de.dailab.acs</groupId>
        <artifactId>nessi.target</artifactId>
        <version>2.1.1</version>
        </artifact>
      </target>
    </configuration>
  </plugin>
</plugins>
</build>
</project>

the output after mvn clen install is as follows

C:\Users\Zahraa\workspace\Ali110>mvn clean install
[INFO] Scanning for projects...
[WARNING] No explicit target runtime environment configuration. Build is platform dependent.
---------------------------------------------------
constituent[0]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3.
1.1/lib/aether-api-0.9.0.M2.jar
constituent[1]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3.
1.1/lib/aether-connector-wagon-0.9.0.M2.jar
constituent[2]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3.
1.1/lib/aether-impl-0.9.0.M2.jar
constituent[3]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3.
1.1/lib/aether-spi-0.9.0.M2.jar
constituent[4]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3.
1.1/lib/aether-util-0.9.0.M2.jar
constituent[5]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3.
1.1/lib/aopalliance-1.0.jar
constituent[6]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3.
1.1/lib/cdi-api-1.0.jar
constituent[7]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3.
1.1/lib/commons-cli-1.2.jar
constituent[8]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3.
1.1/lib/guava-11.0.2.jar
constituent[9]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3.
1.1/lib/javax.inject-1.jar
constituent[10]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/jsr250-api-1.0.jar
constituent[11]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/jsr305-1.3.9.jar
constituent[12]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/maven-aether-provider-3.1.1.jar
constituent[13]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/maven-artifact-3.1.1.jar
constituent[14]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/maven-compat-3.1.1.jar
constituent[15]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/maven-core-3.1.1.jar
constituent[16]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/maven-embedder-3.1.1.jar
constituent[17]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/maven-model-3.1.1.jar
constituent[18]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/maven-model-builder-3.1.1.jar
constituent[19]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/maven-plugin-api-3.1.1.jar
constituent[20]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/maven-repository-metadata-3.1.1.jar
constituent[21]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/maven-settings-3.1.1.jar
constituent[22]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/maven-settings-builder-3.1.1.jar
constituent[23]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/org.eclipse.sisu.inject-0.0.0.M5.jar
constituent[24]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/org.eclipse.sisu.plexus-0.0.0.M5.jar
constituent[25]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/plexus-cipher-1.7.jar
constituent[26]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/plexus-component-annotations-1.5.5.jar
constituent[27]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/plexus-interpolation-1.19.jar
constituent[28]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/plexus-sec-dispatcher-1.3.jar
constituent[29]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/plexus-utils-3.0.15.jar
constituent[30]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/sisu-guice-3.1.3-no_aop.jar
constituent[31]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/slf4j-api-1.7.5.jar
constituent[32]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/slf4j-simple-1.7.5.jar
constituent[33]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/wagon-file-2.4.jar
constituent[34]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
1.1/lib/wagon-http-2.4-shaded.jar
constituent[35]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/lib/wagon-provider-api-2.4.jar
constituent[36]: file:/C:/Progra~1/Apache%20Software%20Foundation/apache-maven-3
.1.1/conf/logging/
---------------------------------------------------
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.maven.executi
on.MavenSession.getRepositorySession()Lorg/sonatype/aether/RepositorySystemSessi
on;
        at org.eclipse.tycho.core.maven.utils.PluginRealmHelper.execute(PluginRe
 almHelper.java:92)
         at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.getDependencyM
etadata(P2TargetPlatformResolver.java:144)
         at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.setupProjects(
P2TargetPlatformResolver.java:126)
        at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.setupP
roject(DefaultTychoDependencyResolver.java:87)
        at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProj
ectsRead(TychoMavenLifecycleParticipant.java:77)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:271)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
 cher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at       org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
 356)
'cmd' is not recognized as an internal or external command,
 operable program or batch file.

Thanks for your kind answers, Regards,

1 Answers1

2

That version of Maven is not compatible with TychoMavenLifecycleParticipant. See this post to the mailing list for the same problem. It has been reported and fixed as bug 406056 in version 0.18.1 of the plugin.

(If you're unable to upgrade the plugin, the advice given should still apply: "Best thing is to downgrade to 3.0.5, which works for me.".)

Joe
  • 29,416
  • 12
  • 68
  • 88
  • Thanks Sir, I will let you know as soon as I try this. Any way, can you kindly guide me to the way to go to the target directory from the command line if it exists? (the goal is to copy jar files) – user3356086 Feb 28 '14 at 02:41
  • The build was success and the target directory was generated. The solution was to downgrade Maven to 3.0.5 as @joe advised. Thanks Again joe for your clear and simple solution. – user3356086 Mar 01 '14 at 12:23