Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b63c8fb
commit 1d79214
Showing
6 changed files
with
108 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,37 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" output="target/classes" path="src/main/java"/> | ||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/> | ||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/> | ||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> | ||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/> | ||
<classpathentry kind="output" path="target/classes"/> | ||
</classpath> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" output="target/classes" path="src/main/java"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JRE-7"/> | ||
<classpathentry kind="output" path="target/classes"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/java/com/shri/eclipsetomaven/classpathentry/LocalLibDependencyCreator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.shri.eclipsetomaven.classpathentry; | ||
|
||
import static com.shri.eclipsetomaven.ApplicationPropertyConstants.MAVEN_DEPENDENCY_GROUP_ID_DEFAULT; | ||
|
||
import org.w3c.dom.Document; | ||
import org.w3c.dom.Element; | ||
|
||
import com.shri.eclipsetomaven.pom.PomDependencyCreator; | ||
import com.shri.eclipsetomaven.pom.PomDependencyCreatorImpl; | ||
import com.shri.eclipsetomaven.util.ApplicationConfig; | ||
|
||
public class LocalLibDependencyCreator { | ||
|
||
public void createLocalLibDependency(Element classpathEntryElement, Element dependenciesElement, Document pomDoc ){ | ||
PomDependencyCreator pomDependencyCreator = new PomDependencyCreatorImpl( | ||
pomDoc); | ||
String pathAttribute = classpathEntryElement | ||
.getAttribute(ClasspathConstants.PATH_ATTR); | ||
String groupId = ApplicationConfig.INSTANCE.getValue(MAVEN_DEPENDENCY_GROUP_ID_DEFAULT); | ||
String artifactId = pathAttribute.substring(1); | ||
artifactId = artifactId.replaceAll("\\s", ""); | ||
pomDependencyCreator.createPomDependencyFromClasspathEntry( | ||
dependenciesElement, pathAttribute, groupId, artifactId); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
#If true, converts entire eclipse workspace into Maven workspace | ||
convert.to.maven=false | ||
convert.to.maven=true | ||
|
||
#If true will remove the spaces from the project directory name. So project name say "a b c" will become "abc" | ||
workspace.projectname.remove.space=false | ||
workspace.projectname.remove.space=true | ||
|
||
#If true prints, dependency graph. In order to just print the dependency graph you may want to switch off the convert.to.maven property | ||
print.dependency.graph=true | ||
print.dependency.graph=false | ||
#default to file. other iotype available is "file" | ||
print.dependency.graph.iotype=file | ||
|
||
print.dependency.graph.filepath=/tmp/dependency.txt | ||
|
||
|
||
maven.dependency.groupId.default=au.com.bankwest.lendnet | ||
maven.pom.groupId.default=au.com.bankwest.lendnet | ||
maven.dependency.groupId.default=com.github.vashishthask | ||
maven.pom.groupId.default=com.github.vashishthask | ||
maven.pom.version.default |