niedenzu

Hints and tricks for developers

Martins Amazon Wunschliste

Maven-Konfiguration mit Eclipse 6. December 2016

Damit Eclipse mit der Maven-Verzeichnisstruktur arbeitetn kann muß man Maven innerhalb von Eclipse kongigurieren.

Als erstes muß man maven auf sein Sytem kopieren und ein paar Umgebungsvariablen einstellen.

M2_HOME: C:/Programme/Apache Software Foundation/apache-maven-2.2.1
JAVA_HOME: C:/Programme/IBM/SDP/jdk
Path: %M2_HOME%bin

Installation von Maven muß ein einem Verzeichnis ein.

das zweite bild

zweites bild

No Comments on Maven-Konfiguration mit Eclipse
Tags: ,
Categories: Maven

Maven 5. February 2016

validate – validate the project is correct and all necessary information is available
compile – compile the source code of the project
test – test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed
package – take the compiled code and package it in its distributable format, such as a JAR.
integration-test – process and deploy the package if necessary into an environment where integration tests can be run
verify – run any checks to verify the package is valid and meets quality criteria
install – install the package into the local repository, for use as a dependency in other projects locally
deploy – done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.

create eclipse project of your pom.xml

mvn eclipse:eclipse
No Comments on Maven
Categories: Java Maven

Cross join 13. February 2015

Cross join mostly used:

By learning sql you will soon get in touch with joins.
The following examples show this type of join which is called cross join.
The result is a Cartesian product between the two tables.

select * from a, b

In more complex queries you have to use the ansi syntax to make the query more readable.
This makes it easier to understand the query later – or if someone else tries to understand what
you are doing.

ansi syntax of cross join

select * from a
cross join b

This was just an example the see how it works.
This is an example where you about what I’m taking about

select * from a
cross join b
join c
on b.id = c.b_id
join d
on c.id = d.c_id

So don’t forget. That there are not only

  • joins (with join condition)
  • left joins
  • left outer joins

but also the cross join.

No Comments on Cross join
Categories: Maven

Maven Release Plugin 11. February 2015

mvn release:clean
mvn release:prepare
mvn release:perform

-DskiptTests

m2_release_plugin
Installation eine hpi_Datei- die hat den gleichen Aufbau wie ein war.

No Comments on Maven Release Plugin
Categories: Maven

maven-scm-provider-svnjava 3. February 2015

If you whant to use a pure java implementation of a cvs client you got to download
the latest version of it.


  
    com.google.code.maven-scm-provider-svnjava
    maven-scm-provider-svnjava
    2.1.1
    compile
  

https://oss.sonatype.org/content/repositories/releases

https://oss.sonatype.org/content/repositories/releases/com/google/code/maven-scm-provider-svnjava/maven-scm-provider-svnjava/2.1.1/

No Comments on maven-scm-provider-svnjava
Categories: Maven

repo.maven.org repo1.maven.org 29. January 2015

Apache maven is searching in the wrong repository.

https://repo.maven.org/maven2/

But it should point to
https://repo1.maven.org/maven2/

If you call https://repo.maven.org/maven2/ with a browser you will be redirected to https://repo1.maven.org/maven2/ .
But other programs can’t follow the redirect.
In my case it was maven itself who wanted to download a plugin.

To fix this issue you have got to patch a dowanloaded jar.

The file you got to fix is called pom-4.0.0.xml.
It’S location $M2_HOME/lib/maven-model-builder-3.0.3.jar:org/apache/maven/model/pom-4.0.0.xml


  4.0.0

  
    
      central
      Central Repository
      https://repo.maven.apache.org/maven2
      default
      
        false
      
    
  

  
    
      central
      Central Repository
      https://repo.maven.apache.org/maven2
      default
      
        false
      
      
        never
      
    
  

No Comments on repo.maven.org repo1.maven.org
Categories: Java Maven

Maven and Eclipse 24. January 2015

Previous steps to make:

  • Install Maven
  • Install Eclipse (luna)
mvn archetype:generate -DgroupId=org.apache.maven.archetypes 
    -DartifactId=wwsservices -DarchetypeArtifactId=maven-archetype-webapp 
    -DinteractiveMode=false

mvn archetype:generate -DgroupId=com.porsche.wwsp 
    -DartifactId=wwsframework -DarchetypeArtifactId=maven-archetype-quickstart 
    -DinteractiveMode=false
- src
  - main
    - java
    - resources
    - webapp
  - test
    - java
    - resources

- target

create a maven projekt

A pom.xml-File is created

create eclipse projekt

mvn eclipse:eclipse

import

Convert to Maven Projekt

convert_to_maven

Remove legacy build-path entries

No Comments on Maven and Eclipse
Categories: Java Maven
Martin Rocks