[Maven2] immer Build failed für Projekt

robert82

Mitglied
Hallo Community,
erst einmal Hallo - ich bin hier neu bei euch und habe auch schon gleiche eine Frage zu einem Problem, welches ich nicht gelöst bekomme.

Vorne weg muss ich sagen, dass mein Projekt vor einer Woche mit den gleichen Einstellungen builden konnte und auch andere dies machen können, bloss seit dem ich mein komplettes Betriebssystem, und somit auch den Rest, neu aufgesetzt habe, geht nix mehr.

Wie der Titel schon sagt, kann ich mein Projekt nicht mehr builden. Maven spuckt mir immer folgenden Log aus. Ich nutze Eclipse mit m2eclipse, aber habe auch schon Maven 2.2.1 standalone ausprobiert.

Der Log:
Code:
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building CIS
[INFO]    task-segment: [org.apache.maven.plugins:maven-clean-plugin:2.3:clean,
compile, org.apache.maven.plugins:maven-dependency-plugin:2.1:list, org.apache.a
xis2:axis2-aar-maven-plugin:1.4:aar]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-cli}]
[INFO] Deleting file set: C:\Users\Robert\Studium\shk - CRUISe\space\CIS\target
(included: [**], excluded: [])
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] Copying 1 resource
[WARNING] POM for 'org.apache.ws.commons.axiom:axiom-api:pom:1.2.7:compile' is i
nvalid.

Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'org.apache.maven:maven-plugin-api:pom:2.0.7:compile' is inval
id.

Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'org.apache.maven:maven-project:pom:2.0.7:compile' is invalid.


Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'commons-httpclient:commons-httpclient:pom:3.1:compile' is inv
alid.

Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'org.codehaus.woodstox:wstx-asl:pom:3.2.4:compile' is invalid.


Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'org.apache.ws.commons.axiom:axiom-impl:pom:1.2.7:compile' is
invalid.

Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'org.apache.ws.commons.axiom:axiom-dom:pom:1.2.7:compile' is i
nvalid.

Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'javax.mail:mail:pom:1.4:compile' is invalid.

Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'xalan:xalan:pom:2.7.0:compile' is invalid.

Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:pom:1.0.
1:compile' is invalid.

Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'xerces:xercesImpl:pom:2.8.1:compile' is invalid.

Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'commons-io:commons-io:pom:1.4:compile' is invalid.

Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'org.codehaus.plexus:plexus-utils:pom:1.4.9:compile' is invali
d.

Its dependencies (if any) will NOT be available to the current build.
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 42 source files to C:\Users\Robert\Studium\shk - CRUISe\space\C
IS\target\classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure

error: error reading C:\Users\Robert\.m2\repository\org\apache\ws\commons\axiom\
axiom-api\1.2.7\axiom-api-1.2.7.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\maven\maven-plugi
n-api\2.0.7\maven-plugin-api-2.0.7.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\maven\maven-proje
ct\2.0.7\maven-project-2.0.7.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\axis2\axis2-codeg
en\1.4\axis2-codegen-1.4.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\axis2\axis2-kerne
l\1.4\axis2-kernel-1.4.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\javax\servlet\servlet-api\2.
3\servlet-api-2.3.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\commons-httpclient\commons-h
ttpclient\3.1\commons-httpclient-3.1.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\commons-fileupload\commons-f
ileupload\1.2\commons-fileupload-1.2.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\httpcomponents\ht
tpcore\4.0-beta1\httpcore-4.0-beta1.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\httpcomponents\ht
tpcore-nio\4.0-beta1\httpcore-nio-4.0-beta1.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\backport-util-concurrent\bac
kport-util-concurrent\3.1\backport-util-concurrent-3.1.jar; error in opening zip
 file
error: error reading C:\Users\Robert\.m2\repository\org\codehaus\woodstox\wstx-a
sl\3.2.4\wstx-asl-3.2.4.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\ws\commons\schema
\XmlSchema\1.4.2\XmlSchema-1.4.2.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\neethi\neethi\2.0
.4\neethi-2.0.4.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\ws\commons\axiom\
axiom-impl\1.2.7\axiom-impl-1.2.7.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\commons-logging\commons-logg
ing\1.1.1\commons-logging-1.1.1.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\woden\woden-api\1
.0M8\woden-api-1.0M8.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\ant\ant\1.7.0\ant
-1.7.0.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\ant\ant-launcher\
1.7.0\ant-launcher-1.7.0.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\woden\woden-impl-
dom\1.0M8\woden-impl-dom-1.0M8.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\annogen\annogen\0.1.0\annoge
n-0.1.0.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\geronimo\specs\ge
ronimo-jms_1.1_spec\1.1\geronimo-jms_1.1_spec-1.1.jar; error in opening zip file

error: error reading C:\Users\Robert\.m2\repository\org\apache\ws\commons\axiom\
axiom-dom\1.2.7\axiom-dom-1.2.7.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\javax\mail\mail\1.4\mail-1.4
.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\xalan\xalan\2.7.0\xalan-2.7.
0.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\geronimo\specs\ge
ronimo-stax-api_1.0_spec\1.0.1\geronimo-stax-api_1.0_spec-1.0.1.jar; error in op
ening zip file
error: error reading C:\Users\Robert\.m2\repository\xerces\xercesImpl\2.8.1\xerc
esImpl-2.8.1.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\commons-io\commons-io\1.4\co
mmons-io-1.4.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\axis2\axis2-adb\1
.4\axis2-adb-1.4.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\geronimo\specs\ge
ronimo-activation_1.1_spec\1.0.1\geronimo-activation_1.1_spec-1.0.1.jar; error i
n opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\axis2\axis2-adb-c
odegen\1.4\axis2-adb-codegen-1.4.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\axis2\axis2-java2
wsdl\1.4\axis2-java2wsdl-1.4.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\geronimo\specs\ge
ronimo-javamail_1.4_spec\1.2\geronimo-javamail_1.4_spec-1.2.jar; error in openin
g zip file
error: error reading C:\Users\Robert\.m2\repository\jaxen\jaxen\1.1.1\jaxen-1.1.
1.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\axis2\axis2-xmlbe
ans\1.4\axis2-xmlbeans-1.4.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\xmlbeans\xmlbeans
\2.3.0\xmlbeans-2.3.0.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\codehaus\jettison\jettis
on\1.0-RC2\jettison-1.0-RC2.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\axis2\axis2-saaj-
api\1.4.1\axis2-saaj-api-1.4.1.jar; error in opening zip file

[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: Compilation failure
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:715)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:556)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:535)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:348)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6
0)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation fail
ure
        at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompiler
Mojo.java:516)
        at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:490)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694)
        ... 17 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Tue Jan 05 08:55:31 CET 2010
[INFO] Final Memory: 15M/28M
[INFO] ------------------------------------------------------------------------

Ich habe auch schon mein lokales Repository von Maven gelöscht und versucht alle Ressources neuzuladen, aber es kommt das gleiche Problem.

Könnte ihr mir weiterhelfen? Zumal das alles vor einer Woche bei meinem alten System noch geklappt hat. ;(

NACHTRAG: Die betroffenen jar-Files lassen sich auch nicht mit WinRAR öffnen. Sie sind beschädigt. Wie kann denn das sein?
 
Zuletzt bearbeitet:

kama

Top Contributor
Hallo,

ist ein Proxy in Verwendung für den Zugang zum Internet oder hast Du einen Repository Manager ? Ist Deine /home/.m2/settings.xml richtig konfiguriert ?

Hast Du nach der Neuinstallation Maven 2.2.1 verwendet und vorher eventuelle eine ältere Version ?

Kannst Du die POM hier posten ?

Gruß
Karl Heinz Marbaise
 

robert82

Mitglied
Hallo,
ich nutze kein Proxy oder Repository Manager. Nicht das ich wüsste.
Eine settings.xml exitsiert bei mir nicht.

Nach meiner Neuinstallation hatte ich auch nur das m2eclipse Plugin genutzt und keine extra Maven-Version. Diese habe ich diesmal nur installiert um zu checken, ob es an dem Eclipse-Plugin liegt.
Das Plugin wirft mir zusätzlich folgende Fehler (nur ein Auszug, weil es zu viel ist):

Code:
[WARNING] POM for 'org.apache.ws.commons.axiom:axiom-impl:pom:1.2.7:compile' is invalid. 
It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project org.apache.ws.commons.axiom:axiom-impl at 
C:\Users\Robert\.m2\repository\org\apache\ws\commons\axiom\axiom-impl\1.2.7\axiom-impl-1.2.7.pom
[WARNING] POM for 'org.apache.ws.commons.axiom:axiom-dom:pom:1.2.7:compile' is invalid. 
It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project org.apache.ws.commons.axiom:axiom-dom at 
C:\Users\Robert\.m2\repository\org\apache\ws\commons\axiom\axiom-dom\1.2.7\axiom-dom-1.2.7.pom
[WARNING] POM for 'javax.mail:mail:pom:1.4:compile' is invalid. 
It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project javax.mail:mail at 
C:\Users\Robert\.m2\repository\javax\mail\mail\1.4\mail-1.4.pom
[WARNING] POM for 'xalan:xalan:pom:2.7.0:compile' is invalid. 
It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project xalan:xalan at 
C:\Users\Robert\.m2\repository\xalan\xalan\2.7.0\xalan-2.7.0.pom
[WARNING] POM for 'org.codehaus.woodstox:wstx-asl:pom:3.2.4:compile' is invalid. 
It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project org.codehaus.woodstox:wstx-asl at 
C:\Users\Robert\.m2\repository\org\codehaus\woodstox\wstx-asl\3.2.4\wstx-asl-3.2.4.pom
[WARNING] POM for 'org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:pom:1.0.1:compile' is invalid. 
It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project org.apache.geronimo.specs:geronimo-stax-api_1.0_spec at 
C:\Users\Robert\.m2\repository\org\apache\geronimo\specs\geronimo-stax-api_1.0_spec\1.0.1\geronimo-stax-api_1.0_spec-1.0.1.pom
[WARNING] POM for 'xerces:xercesImpl:pom:2.8.1:compile' is invalid. 
It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project xerces:xercesImpl at 
C:\Users\Robert\.m2\repository\xerces\xercesImpl\2.8.1\xercesImpl-2.8.1.pom
[WARNING] POM for 'commons-io:commons-io:pom:1.4:compile' is invalid. 
It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project commons-io:commons-io at 
C:\Users\Robert\.m2\repository\commons-io\commons-io\1.4\commons-io-1.4.pom
[INFO] [compiler:compile]
[INFO] Compiling 42 source files to C:\Users\Robert\Studium\space\CIS\target\classes
[ERROR] 

Mojo: 

    org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile

FAILED for project: 

    CIS:CIS:jar:0.2.0

Reason:

error: error reading C:\Users\Robert\.m2\repository\org\apache\ws\commons\axiom\axiom-impl\1.2.7\axiom-impl-1.2.7.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\org\apache\ws\commons\axiom\axiom-dom\1.2.7\axiom-dom-1.2.7.jar; error in opening zip file
error: error reading C:\Users\Robert\.m2\repository\javax\mail\mail\1.4\mail-1.4.jar; error in opening zip file


meine POM vom Projekt sieht wie folgt aus:

[XML]<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>CIS</groupId>
<artifactId>CIS</artifactId>
<name>CIS</name>
<version>0.2.0</version>
<description>
The Integration System for integrating User Interface
Services. For creating a runnable service the following maven
goals should be used (in the given order):
org.apache.maven.plugins:maven-clean-plugin:2.3:clean compile
org.apache.maven.plugins:maven-dependency-plugin:2.1:list
org.apache.axis2:axis2-aar-maven-plugin:1.4:aar
</description>
<build>
<sourceDirectory>${basedir}/src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-aar-maven-plugin</artifactId>
<version>1.4.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.3</version>
<executions>
<!-- for every target resource an execution is needed -->
<execution>
<id>copy-config-to-class-root</id>
<phase>compile</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<encoding>UTF-8</encoding>
<outputDirectory>${basedir}/target/classes/de/inf/cruise/util</outputDirectory>
<resources>
<resource>
<directory>${basedir}/src/main/config</directory>
<includes>
<include>Config.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-config-to-target-dir</id>
<phase>compile</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<encoding>UTF-8</encoding>
<outputDirectory>${basedir}/target</outputDirectory>
<resources>
<resource>
<directory>${basedir}/src/main/config</directory>
<includes>
<include>Config.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-log4j-data</id>
<phase>compile</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<encoding>UTF-8</encoding>
<outputDirectory>${basedir}/target/classes</outputDirectory>
<resources>
<resource>
<directory>${basedir}/src/main/config</directory>
<includes>
<include>log4j.*</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-api</artifactId>
<version>1.2.7</version>
</dependency>
<!-- prevents runtime exception of the IntegrationManager -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-wsdl2code-maven-plugin</artifactId>
<version>1.4</version>
<type>maven-plugin</type>
</dependency>
<!-- needed for maven-jar-plugin -->
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.1</version>
</dependency>
<!-- needed for maven-jar-plugin -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-json</artifactId>
<version>1.4.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-saaj</artifactId>
<version>1.4.1</version>
</dependency>
</dependencies>
</project>[/XML]

Dabei handelt es sich um die POM vom Projekt, die auch von anderen genutzt wird, weil es ein Projekt ist, an dem mehrere Leute sitzen. Wie gesagt, das hat auch alles ohne Probleme vorher geklappt. Nun sind aber die ganzen jar-Files, welche nicht geöffnet werden können irgendwie defekt nach dem Download.
 
Zuletzt bearbeitet:

kama

Top Contributor
Hallo,

Hallo,
ich nutze kein Proxy oder Repository Manager. Nicht das ich wüsste.
Eine settings.xml exitsiert bei mir nicht.
Also Default repositories...

Nach meiner Neuinstallation hatte ich auch nur das m2eclipse Plugin genutzt und keine extra Maven-Version. Diese habe ich diesmal nur installiert um zu checken, ob es an dem Eclipse-Plugin liegt.
Welche Version von Maven nutzt Du ?
Wichtig ist, dass das Eclipse Plugin bereits Maven 3 ist ...

Das Plugin wirft mir zusätzlich folgende Fehler (nur ein Auszug, weil es zu viel ist):
Also basierend auf Deiner POM ist das kein Plugin sondern ein simpler jar....(packaging ist nicht angegeben?)

[XML]<?xml version="1.0" encoding="UTF-8"?>[/XML]
<project>
Da fehlt meiner Meinung zuerst einmal noch folgendens[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/maven-v4_0_0.xsd">

[/XML]


[XML] <modelVersion>4.0.0</modelVersion>
<groupId>CIS</groupId>
<artifactId>CIS</artifactId>
<name>CIS</name>
<version>0.2.0</version>
.....
<build>
<sourceDirectory>${basedir}/src</sourceDirectory>
<plugins>
....[/XML]
Mal Grundsätzliche sollte man in Maven nichts konfigurieren was nicht unbedingt notwendig ist (Konvention über Konfiguration)...
Das src Verzeichnis ist der default und ist somit unnötig...

[XML]
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
[/XML]
Wichtig ist, um den Build Reproduzierbar zu halten ist, dass man die Versionen der Plugins die man verwendet in die POM reinschreibt...<verison>...</version>...

[XML]
<executions>
<!-- for every target resource an execution is needed -->
<execution>
<id>copy-config-to-class-root</id>
<phase>compile</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<encoding>UTF-8</encoding>
<outputDirectory>${basedir}/target/classes/de/inf/cruise/util</outputDirectory>
<resources>
<resource>
<directory>${basedir}/src/main/config</directory>
<includes>
<include>Config.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-config-to-target-dir</id>
<phase>compile</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<encoding>UTF-8</encoding>
<outputDirectory>${basedir}/target</outputDirectory>
<resources>
<resource>
<directory>${basedir}/src/main/config</directory>
<includes>
<include>Config.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-log4j-data</id>
<phase>compile</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<encoding>UTF-8</encoding>
<outputDirectory>${basedir}/target/classes</outputDirectory>
<resources>
<resource>
<directory>${basedir}/src/main/config</directory>
<includes>
<include>log4j.*</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
[/XML]
Dir ist die Konvention von src/main/resources bekannt und damit wäre dann die Konfiguration des resources plugins völlig überflüssig....

Wichtig ist auch, dass bei der Verwendung von JUNIT etc. auch ein scope "test" angegeben ist, da der ja nur für Tests nötig ist...

[XML] <!-- prevents runtime exception of the IntegrationManager -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-wsdl2code-maven-plugin</artifactId>
<version>1.4</version>
<type>maven-plugin</type>
</dependency>
[/XML]
Was hat hier ein Plugin zu suchen ? Willst Du ein Plugin schreiben für Maven, dann ist der Ansatz etwas daneben...

Wie rufst Du denn Maven für das Projekt auf ?

Code:
mvn install

EDIT: Was passiert nachdem Du das lokale Repository gelöscht hast...werden dann die Dependencies wieder downgeloaded ? Hast Du mal händisch versucht ein paar von den dependencies downzuloaden um eventuelle andere Problem auszuschliessen ?
Gruß
Karl Heinz Marbaise
 
Zuletzt bearbeitet:

ARadauer

Top Contributor
ja ja Maven... mit Maven ist alles besser...


  • Maven is broken and wrong if it assumes humans never make mistakes.
  • Maven is broken and wrong if it requires users to explicitly specify every version of every dependency, and every dependency’s dependencies, to reduce the likelihood of downloading incompatible artifacts.
  • Maven is broken and wrong if it requires a third-party tool to prevent it connecting to the big, bad internets and automatically downloading random crap.
  • Maven is broken and wrong if it thinks nothing of slowing down every build by connecting to the network and checking every dependency for any updates, and automatically downloading them.
  • Maven is broken and wrong if it behaves differently on my laptop at the office and at home.
  • Maven is broken and wrong if it requires an internet connection to delete a directory.
  • Maven is broken and wrong.
aus "Maven - eine Ausgeburt der Hölle" || IT-Republik - JAXenter - News
 

kama

Top Contributor
Hallo,

ja ja Maven... mit Maven ist alles besser...
Ich würde forumlieren...nicht alles aber vieles...


  • Maven is broken and wrong if it assumes humans never make mistakes.
  • Maven is broken and wrong if it requires users to explicitly specify every version of every dependency, and every dependency’s dependencies, to reduce the likelihood of downloading incompatible artifacts.
  • Maven is broken and wrong if it requires a third-party tool to prevent it connecting to the big, bad internets and automatically downloading random crap.
  • Maven is broken and wrong if it thinks nothing of slowing down every build by connecting to the network and checking every dependency for any updates, and automatically downloading them.
  • Maven is broken and wrong if it behaves differently on my laptop at the office and at home.
  • Maven is broken and wrong if it requires an internet connection to delete a directory.
  • Maven is broken and wrong.
aus "Maven - eine Ausgeburt der Hölle" || IT-Republik - JAXenter - News
Leider enthält der Original Artikel sehr viel Polemik und leider auch einige Unwahrheiten....über den Sinn- und Zweck der Konzepte etc. kann man sicher streiten....

Gruß
Karl Heinz Marbaise
 

madboy

Top Contributor
Ich würde mal die jars, die sich nicht mit einem Packprogramm anzeigen lassen mit einem Texteditor öffnen. Bei mir stand da mal was von "301 Moved Permanently" drin. Abhilfe schafft dann wohl eine settings.xml mit korrekten Repos.
 

robert82

Mitglied
@maki
Den Vorschlag mit dem Löschen hatte ich schon probiert. Leider immer das selbe Problem.

@madboy
Was für Einstellungen kann ich für Repositories machen?
Bis jetzt lädt m2eclipse immer von repo1.maven.org

Ich hab mal folgendes in der settings.xml probiert, aber er lädt immer noch vom repo1
[XML]
<settings 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/settings-1.0.0.xsd">
<repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
<layout>default</layout>
</repository>

</settings>
[/XML]

In den jars wird wirklich immer angegeben
Code:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://download.java.net/maven/1/org.apache.axis2/jars/axis2-saaj-api-1.4.1.jar">here</a>.</p>
<hr>
<address>Apache Server at maven-repository.dev.java.net Port 443</address>
</body></html>

Warum erkennt Maven nicht automatisch den Wechsel? Wo bekomme ich die genauen Repo-URLs für die Settings.xml her? BIs jetzt scheint bei mir immer nur repo1 genutzt zu werden.
 

Wladimir

Mitglied
Dein Project sieht danach aus als würd es JavaCode aus WSDL Datein generieren.

Ich hab es selbst noch nicht geschafft über Maven Axis2 Projekte mit dependecies aus repos im internet zu bauen. Viele Links können nicht aufgelöst werden oder sind falsch. Hab schon mehrere probiert.

Mein Lösung war:
1) Die Dependencies im Projekt auf die wenigst notwendigen zu reduzieren
2) Alle händisch runterladen (finden sich aber sowieso im axis2 lib verzeichnis)
3) Im eigenen repo deployed

Falls du nur ein Lokales Repo hast dann hiermit:
Maven Install Plugin - Introduction

Falls ihr ein eigenes Remote Repo habt (viel empfehlenswerter), dann mit deploy:
Maven Deploy Plugin - Introduction

Und groupId, artifactId, version nah am original wählen.
 
Zuletzt bearbeitet:
Ähnliche Java Themen
  Titel Forum Antworten Datum
A [maven2] Goals Projektabhängig auswählen Tools - Maven, Gradle, Ant & mehr 4
RaoulDuke Maven2 - Anfängerprobleme Tools - Maven, Gradle, Ant & mehr 9
P [Maven2] Globale Properties Tools - Maven, Gradle, Ant & mehr 5
P [Maven2] Deploy auf Artifactory mit LDAP Authentication Tools - Maven, Gradle, Ant & mehr 10
P [Maven2] Projectdoku direkt auf Webserver deployen Tools - Maven, Gradle, Ant & mehr 7
M Maven2 Axis2 Tools - Maven, Gradle, Ant & mehr 2
T [MAVEN2] Wo Saple-code zur Lib platzieren? Tools - Maven, Gradle, Ant & mehr 9
P [Maven2] Wie Blacklists löschen? Tools - Maven, Gradle, Ant & mehr 8
P [Maven2] Wie kann man das "Updating Indexes" verhindern? Tools - Maven, Gradle, Ant & mehr 4
M Maven2 - Ant execution einmalig ausführen Tools - Maven, Gradle, Ant & mehr 8
byte Maven2: Test und Prod Builds Tools - Maven, Gradle, Ant & mehr 11
K Maven2 inherited docs nachladen Tools - Maven, Gradle, Ant & mehr 4
P Maven2 - wie mache ich externe Jar Dateien zu Artifacts? Tools - Maven, Gradle, Ant & mehr 15
N Maven2 Projekt unter Hudson mit SVN Repository erstellen Tools - Maven, Gradle, Ant & mehr 4
H Maven2 -> Nachladen der Dependencies Tools - Maven, Gradle, Ant & mehr 4
J Anfängerfragen zu maven2 Tools - Maven, Gradle, Ant & mehr 2
U Maven2 WAR Plugin doppelte Dependencies Tools - Maven, Gradle, Ant & mehr 4
G Shortcuts werden unter Java 1.6 immer neu erstellt Tools - Maven, Gradle, Ant & mehr 3
G Frame immer im Hintegrund Tools - Maven, Gradle, Ant & mehr 4
T Die Pixel-höhe ist immer mindestens 225 Tools - Maven, Gradle, Ant & mehr 3
I Applet funktioniert im Browser nicht immer Tools - Maven, Gradle, Ant & mehr 18
H Maven build.plugins.plugin.version fehlt Tools - Maven, Gradle, Ant & mehr 0
thor_norsk Maven Build Failed: kann nicht von start.spring.io generiertes Projekt auf IntelliJ IDE starten Tools - Maven, Gradle, Ant & mehr 8
Gradle build funktioniert nicht Tools - Maven, Gradle, Ant & mehr 10
ExceptionOfExpectation Maven Build Failed: kann nicht von start.spring.io generiertes Projekt auf Eclipse starten Tools - Maven, Gradle, Ant & mehr 20
Moman2022 Hauptklasse kann nicht gefunden werden gradle build Tools - Maven, Gradle, Ant & mehr 3
L Jenkins Build mit git Hashwert Tools - Maven, Gradle, Ant & mehr 2
OnDemand Jenkins Pipeline Build > Send Info Jira Tools - Maven, Gradle, Ant & mehr 3
H Maven Verbindung Java Projekt und Jenkins Build job Tools - Maven, Gradle, Ant & mehr 21
D Maven Maven und die Build-Geschwindigkeit Tools - Maven, Gradle, Ant & mehr 11
E Gradle Build Tools - Maven, Gradle, Ant & mehr 1
G Maven Build Prozess lädt Modul aus Nexus statt es zu bauen Tools - Maven, Gradle, Ant & mehr 3
reibi Maven Build unter anderen Namen Tools - Maven, Gradle, Ant & mehr 3
T build job läuft nicht mit findBugs...WARUM? Tools - Maven, Gradle, Ant & mehr 1
T test schlägt im build fehl, lokal nicht, warum? Tools - Maven, Gradle, Ant & mehr 2
D Maven Multi Module Build Tools - Maven, Gradle, Ant & mehr 8
reibi Maven Build ohne netz Tools - Maven, Gradle, Ant & mehr 2
S Maven project build error (String index out of range: 1) Tools - Maven, Gradle, Ant & mehr 2
B Ant Build File, wie ist der Java3D Native Code einzubinden? Tools - Maven, Gradle, Ant & mehr 6
H RCP Build mit Buckminster (headless) - unresolved node Tools - Maven, Gradle, Ant & mehr 7
M Maven Maven Build Geschwindigkeit Tools - Maven, Gradle, Ant & mehr 4
T Maven Build-Fehler, NoClassDefFoundError Exception Tools - Maven, Gradle, Ant & mehr 5
ruutaiokwu eclipse web project - warum in den "build"-ordner kompilieren ??? Tools - Maven, Gradle, Ant & mehr 10
P Maven Download-Probleme beim Build Tools - Maven, Gradle, Ant & mehr 5
B Maven build-helper-maven-plugin mit Eclipse Tools - Maven, Gradle, Ant & mehr 3
L Ant RCP Build? Tools - Maven, Gradle, Ant & mehr 35
T Buckminster Build JRE mitliefern Tools - Maven, Gradle, Ant & mehr 2
T Buckminster-Hudson RCP-Build "CSpec source required" Tools - Maven, Gradle, Ant & mehr 9
P Ant build.xml, danach wird ein srcpackage vergessen Tools - Maven, Gradle, Ant & mehr 4
ModellbahnerTT Unterschied build und deploy Tools - Maven, Gradle, Ant & mehr 3
X ANT - Build Reihenfolge? Tools - Maven, Gradle, Ant & mehr 3
T Jar erstellen mit Build Version? Tools - Maven, Gradle, Ant & mehr 2
F build time eines applet Tools - Maven, Gradle, Ant & mehr 13

Ähnliche Java Themen

Neue Themen


Oben